Skip to content

Commit

Permalink
Merge pull request #181 from nmfs-opensci/update-dockerfile
Browse files Browse the repository at this point in the history
Update Dockerfile
  • Loading branch information
eeholmes authored Nov 14, 2024
2 parents 3ac6c51 + 9086e28 commit a715100
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion base-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,24 @@ RUN echo "Installing Apt-get packages..." \

# Add TZ configuration - https://github.com/PrefectHQ/prefect/issues/3061
ENV TZ=UTC
#
# ========================

USER ${NB_USER}
WORKDIR ${HOME}

# Install latest mambaforge in ${CONDA_DIR}
RUN echo "Installing Miniforge..." \
&& URL="https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-$(uname -m).sh" \
&& wget --quiet ${URL} -O installer.sh \
&& /bin/bash installer.sh -u -b -p ${CONDA_DIR} \
&& rm installer.sh \
&& mamba install conda-lock -y \
&& mamba clean -afy \
# After installing the packages, we cleanup some unnecessary files
# to try reduce image size - see https://jcristharif.com/conda-docker-tips.html
# Although we explicitly do *not* delete .pyc files, as that seems to slow down startup
# quite a bit unfortunately - see https://github.com/2i2c-org/infrastructure/issues/2047
&& find ${CONDA_DIR} -follow -type f -name '*.a' -delete

EXPOSE 8888
ENTRYPOINT ["/srv/start"]

0 comments on commit a715100

Please sign in to comment.