Skip to content

Commit

Permalink
per #2249, add a step to Dockerfiles to remove the conda environment …
Browse files Browse the repository at this point in the history
…that was used to create a new environment to free up space
  • Loading branch information
georgemccabe committed Jul 14, 2023
1 parent 34ff190 commit 8a55791
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/scripts/docker_env/Dockerfile
Expand Up @@ -19,3 +19,8 @@ ARG METPLUS_ENV_VERSION
ARG ENV_NAME
RUN conda list --name ${ENV_NAME}.${METPLUS_ENV_VERSION} > \
/usr/local/conda/envs/${ENV_NAME}.${METPLUS_ENV_VERSION}/environments.yml

# remove base environment to free up space
ARG METPLUS_ENV_VERSION
ARG BASE_ENV=metplus_base
RUN conda env remove -y --name ${BASE_ENV}.${METPLUS_ENV_VERSION}
5 changes: 5 additions & 0 deletions internal/scripts/docker_env/Dockerfile.cartopy
Expand Up @@ -27,3 +27,8 @@ RUN apt update && apt -y upgrade \
&& rm -f cartopy_feature_download.py \
&& curl https://raw.githubusercontent.com/SciTools/cartopy/master/tools/cartopy_feature_download.py > cartopy_feature_download.py \
&& /usr/local/conda/envs/${ENV_NAME}.${METPLUS_ENV_VERSION}/bin/python3 cartopy_feature_download.py cultural physical

# remove base environment to free up space
ARG METPLUS_ENV_VERSION
ARG BASE_ENV=metplus_base
RUN conda env remove -y --name ${BASE_ENV}.${METPLUS_ENV_VERSION}

0 comments on commit 8a55791

Please sign in to comment.