Skip to content

Commit

Permalink
Relocate commented out calls to 'conda clean' and re-enable, remove o…
Browse files Browse the repository at this point in the history
…ut of date comment about camouflage
  • Loading branch information
dagardner-nv committed Jan 2, 2024
1 parent b373854 commit 031f10f
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,7 @@ RUN --mount=type=cache,id=conda_pkgs,target=/opt/conda/pkgs,sharing=locked \
conda config --set ssl_verify false &&\
conda config --add pkgs_dirs /opt/conda/pkgs &&\
# Install mamba, boa and git here. Conda build breaks with other git installs
/opt/conda/bin/mamba install -y -n base -c conda-forge "boa" "git >=2.35.3" "python=${PYTHON_VER}" "tini=0.19" &&\
source activate base
# conda clean -afy
/opt/conda/bin/mamba install -y -n base -c conda-forge "boa" "git >=2.35.3" "python=${PYTHON_VER}" "tini=0.19"

# ============ Stage: conda_env ============
# Create the conda environment and install all dependencies
Expand All @@ -127,8 +125,7 @@ RUN --mount=type=cache,id=conda_pkgs,target=/opt/conda/pkgs,sharing=locked \
# Create the environment and install as little dependencies as possible
CONDA_ALWAYS_YES=true /opt/conda/bin/mamba create -n morpheus -c conda-forge \
python=${PYTHON_VER} && \
# Clean and activate
# conda clean -afy && \
# Activate the environment automatically from .bashrc
conda init bash && \
echo "conda activate morpheus" >> ~/.bashrc

Expand Down Expand Up @@ -187,9 +184,7 @@ RUN --mount=type=cache,id=conda_pkgs,target=/opt/conda/pkgs,sharing=locked \
conda config --env --set channel_alias ${CONDA_CHANNEL_ALIAS} &&\
/opt/conda/bin/mamba env update -n morpheus --file docker/conda/environments/cuda${CUDA_MAJOR_VER}.${CUDA_MINOR_VER}_dev.yml &&\
# Remove channel_alias to use the normal channel in the container
conda config --env --remove-key channel_alias &&\
# Clean and activate
conda clean -afy
conda config --env --remove-key channel_alias

# ============ Stage: conda_bld_morpheus ============
# Now build the morpheus conda package
Expand Down Expand Up @@ -255,7 +250,8 @@ RUN --mount=type=bind,from=conda_bld_morpheus,source=/opt/conda/conda-bld,target
-c nvidia \
-c pytorch \
-c conda-forge morpheus &&\
/opt/conda/bin/mamba env update -n morpheus --file docker/conda/environments/cuda${CUDA_MAJOR_VER}.${CUDA_MINOR_VER}_runtime.yml
/opt/conda/bin/mamba env update -n morpheus --file docker/conda/environments/cuda${CUDA_MAJOR_VER}.${CUDA_MINOR_VER}_runtime.yml && \
conda clean -afy

# Only copy specific files/folders over that are necessary for runtime
COPY "${MORPHEUS_ROOT_HOST}/docker" "./docker"
Expand Down Expand Up @@ -291,10 +287,10 @@ RUN --mount=type=cache,id=apt,target=/var/cache/apt \
rm -rf /var/lib/apt/lists/*

# Install camouflage needed for unittests to mock a triton server
# Pin to v0.9 until #967 is resolved
RUN source activate morpheus && \
npm install -g [email protected] && \
npm cache clean --force
npm cache clean --force && \
conda clean -afy

# Setup git to allow other users to access /workspace. Requires git 2.35.3 or
# greater. See https://marc.info/?l=git&m=164989570902912&w=2. Only enable for
Expand Down

0 comments on commit 031f10f

Please sign in to comment.