Skip to content
This repository has been archived by the owner on Feb 10, 2021. It is now read-only.

Commit

Permalink
Cleanup after Miniconda install in Docker build
Browse files Browse the repository at this point in the history
To cutdown on the Docker image size, handle the install of Miniconda and
subsequent clean up in the same `RUN` step. The cleanup includes the
removal the install script, cached conda packages, and conda package
tarballs. This should cutdown the size of this Docker layer and save
memory on CI.
  • Loading branch information
jakirkham committed Feb 27, 2018
1 parent 8dd5b1e commit ce1c122
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 4 additions & 2 deletions Dockerfile-master
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ ENV LANG C.UTF-8

RUN apt-get update && apt-get install curl bzip2 git gcc -y --fix-missing

RUN curl -o miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
RUN bash miniconda.sh -f -b -p /opt/anaconda
RUN curl -o miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
bash miniconda.sh -f -b -p /opt/anaconda && \
/opt/anaconda/bin/conda clean -tipy && \
rm -f miniconda.sh
ENV PATH /opt/anaconda/bin:$PATH
RUN conda install -n root conda=4.4.11 && conda clean -tipy
RUN conda install -c conda-forge dask distributed nomkl pytest mock ipython pip psutil && conda clean -tipy
Expand Down
5 changes: 4 additions & 1 deletion Dockerfile-slave
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ ENV LANG C.UTF-8

RUN apt-get update && apt-get install curl bzip2 git gcc -y --fix-missing

RUN curl -o miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
RUN curl -o miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
bash miniconda.sh -f -b -p /opt/anaconda && \
/opt/anaconda/bin/conda clean -tipy && \
rm -f miniconda.sh
RUN bash miniconda.sh -f -b -p /opt/anaconda
ENV PATH /opt/anaconda/bin:$PATH
RUN conda install -n root conda=4.4.11 && conda clean -tipy
Expand Down

0 comments on commit ce1c122

Please sign in to comment.