Skip to content
Snippets Groups Projects
Commit ce786d7c authored by Steffen Vogel's avatar Steffen Vogel :santa_tone2:
Browse files

optimize building process by merging layers

parent 51beaaa0
Branches
No related tags found
No related merge requests found
......@@ -7,19 +7,10 @@ ADD environment.yml /tmp/environment.yml
USER root
RUN sed -i "s|name\: jupyter-example-profile|name\: base|g" /tmp/environment.yml # we need to replace the name of the environment with base such that we can update the base environment here
USER $NB_USER
RUN conda env update -f /tmp/environment.yml # All packages specified in environment.yml are installed in the base environment
# Execute postBuild script
ADD postBuild.sh /tmp/postBuild.sh
# Make the file executable (TODO: is this still needed?)
USER root
RUN chmod +x /tmp/postBuild.sh
#
USER $NB_USER
RUN /tmp/postBuild.sh
# Cleanup conda packages
RUN conda clean --all -f -y
# All packages specified in environment.yml are installed in the base environment
RUN conda env update -f /tmp/environment.yml && \
conda clean -a -f -y
ENV JUPYTER_ENABLE_LAB=yes
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment