Skip to content
Snippets Groups Projects
Commit fcd322bc authored by Nathan Bockisch's avatar Nathan Bockisch
Browse files

Resolve workflow Dockerfile conflicts after docker revisions

parent 99a6f974
No related branches found
No related tags found
2 merge requests!1452Merge 2.8.2 to main,!1387WS-1849: Added RADIAL setup to the workflow container
Pipeline #10390 failed
......@@ -2,6 +2,10 @@
ARG LOCAL_OR_SERVER_PEX=local-pex
FROM python:3.10-slim-buster as base
ARG WS_VERSION=unknown-version
ARG DEPLOY_ENV
ENV DEPLOY_ENV=${DEPLOY_ENV}
ARG ENV_HOST
ENV ENV_HOST=${ENV_HOST}
# Environment variables
ENV PIP_NO_CACHE_DIR false
......@@ -29,33 +33,43 @@ RUN addgroup --gid 9233 almapipe && \
# Allow the workflow container to reach the RADIAL cluster for jobs that require it
RUN echo "10.64.1.77 radialhead.nrao.radial.local" >> /etc/hosts
# Switch to appuser and set ownership of docker.properties to vlapipe and the vlapipe group
# needed for unit tests
USER vlapipe
WORKDIR /home/ssa/capo
COPY --chown=vlapipe:vlapipe docker.properties docker.properties
USER root
WORKDIR /code/
RUN chown vlapipe . && chgrp vlapipe .
# Switch to appuser and set ownership of docker.properties to vlapipe and the vlapipe group
USER vlapipe
WORKDIR /packages/
RUN curl -sSL https://install.python-poetry.org | python3 -
ENV PATH "${PATH}:/home/vlapipe/.local/bin"
COPY --chown=vlapipe:vlapipe ./shared ./shared
COPY --chown=vlapipe:vlapipe ./apps/cli ./apps/cli
ENV PATH "${PATH}:/home/vlapipe/.local/bin"
RUN pip install --upgrade pip
FROM base as local-pex
COPY --chown=vlapipe:vlapipe ./services/workflow/requirements.txt ./requirements.txt
COPY --chown=vlapipe:vlapipe ./test-requirements.txt ./test-requirements.txt
RUN SETUPTOOLS_SCM_PRETEND_VERSION=${WS_VERSION} pip install --user -r requirements.txt
RUN SETUPTOOLS_SCM_PRETEND_VERSION=${WS_VERSION} pip install --user -r test-requirements.txt
FROM base as server-pex
USER root
COPY --chown=vlapipe:vlapipe ./services/workflow/bin/install-pexes.sh ./install-pexes.sh
RUN . ./install-pexes.sh
COPY --chown=vlapipe:vlapipe ./services/workflow/requirements.txt ./requirements.txt
COPY --chown=vlapipe:vlapipe ./test-requirements.txt ./test-requirements.txt
RUN SETUPTOOLS_SCM_PRETEND_VERSION=${WS_VERSION} pip install --user -r requirements.txt
RUN SETUPTOOLS_SCM_PRETEND_VERSION=${WS_VERSION} pip install --user -r test-requirements.txt
#COPY --chown=vlapipe:vlapipe ./services/workflow/bin/install-pexes.sh ./install-pexes.sh
#RUN . ./install-pexes.sh
FROM ${LOCAL_OR_SERVER_PEX} as pex-base
ARG DEPLOY_ENV=dev
# HTCondor install
USER root
RUN apt update && apt install -y curl gnupg apt-transport-https
......@@ -66,7 +80,7 @@ RUN apt update && apt install -y procps htcondor nano
# HTCondor setup
# Copy over HTCondor submit node config
COPY /config/htcondor/00-htcondor-9.0.config /etc/condor/config.d/00-htcondor-9.0.config
# 00-htcondor-9.0.config is environment specific, copy handled later
COPY /config/htcondor/submit/99-workspaces-submit.${DEPLOY_ENV}.conf /etc/condor/config.d/99-workspaces-submit.${DEPLOY_ENV}.conf
COPY /config/htcondor/submit/nrao-nofile.conf /etc/security/limits.d/nrao-nofile.conf
......@@ -77,23 +91,28 @@ RUN chown vlapipe . && chgrp vlapipe .
# Copy service directory to /code in the image
# set ownership of content to vlapipe and the vlapipe group
USER vlapipe
COPY --chown=vlapipe:vlapipe ./services/workflow ./
COPY --chown=vlapipe:vlapipe ./services/workflow ./services/workflow
WORKDIR /code/services/workflow
RUN poetry install
FROM pex-base as prod
ARG WS_VERSION=unknown-version
ENV PYTHONPATH "${PYTHONPATH}:/home/vlapipe/.local"
ENV PATH "${PATH}:/home/vlapipe/.local/bin"
RUN SETUPTOOLS_SCM_PRETEND_VERSION=${WS_VERSION} pip install -e .
USER root
CMD /code/bin/boot-condor-and-workflow.sh
COPY /config/htcondor/00-htcondor-9.0.config /etc/condor/config.d/00-htcondor-9.0.config
CMD /code/services/workflow/bin/boot-condor-and-workflow.sh
FROM pex-base as dev
ARG WS_VERSION=unknown-version
RUN SETUPTOOLS_SCM_PRETEND_VERSION=${WS_VERSION} pip install -e .
ENV PYTHONPATH "${PYTHONPATH}:/home/vlapipe/.local"
ENV PATH "${PATH}:/home/vlapipe/.local/bin"
ENV PATH $PATH:/lustre/aoc/pipeline/$CAPO_PROFILE/workflow
USER root
COPY /config/htcondor/00-htcondor-9.0.local.config /etc/condor/config.d/00-htcondor-9.0.config
RUN condor_master
CMD /code/bin/boot-condor-and-workflow.sh
CMD /code/services/workflow/bin/boot-condor-and-workflow.sh
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment