Skip to content

Commit

Permalink
fix: Fix the install to base (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
lsetiawan authored Jun 28, 2024
1 parent 513b668 commit 35e1b28
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions base-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,6 @@ RUN echo "Installing Apt-get packages..." \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# Install conda-lock tooling
RUN echo "Installing conda-lock..." \
&& micromamba install --yes -c conda-forge \
mamba \
conda-lock \
&& micromamba clean -yaf

# Set conda alias to micromamba
RUN echo "alias conda='micromamba'" >> ${HOME}/.bashrc

Expand Down Expand Up @@ -148,7 +141,12 @@ ONBUILD RUN echo "Checking for 'jupyter_notebook_config.py'..." \
ONBUILD USER ${NB_USER}

# Create empty conda env and set auto activate
ONBUILD RUN micromamba create --yes --name $CONDA_ENV
ONBUILD RUN micromamba create \
--yes \
--name $CONDA_ENV \
--channel conda-forge \
mamba \
conda-lock
ONBUILD ENV ENV_NAME=${CONDA_ENV}

# We want to keep our images as reproducible as possible. If a lock
Expand All @@ -168,9 +166,9 @@ ONBUILD RUN echo "Checking for 'conda-lock.yml' 'conda-linux-64.lock' or 'enviro
; [ -d binder ] && cd binder \
; [ -d .binder ] && cd .binder \
; if test -f "conda-lock.yml" ; then \
conda-lock install --name ${CONDA_ENV} conda-lock.yml \
micromamba run -n ${CONDA_ENV} conda-lock install --name ${CONDA_ENV} conda-lock.yml \
; elif test -f "conda-linux-64.lock" ; then \
conda-lock install --name ${CONDA_ENV} conda-linux-64.lock \
micromamba install --yes --name ${CONDA_ENV} conda-linux-64.lock \
; elif test -f "environment.yml" ; then \
micromamba install --yes --name ${CONDA_ENV} --file environment.yml \
; else echo "No conda-lock.yml, conda-linux-64.lock, or environment.yml! *creating empty python 3.12*" ; \
Expand Down

0 comments on commit 35e1b28

Please sign in to comment.