Skip to content

Commit

Permalink
try explicitly activating the env
Browse files Browse the repository at this point in the history
  • Loading branch information
eeholmes committed Jan 31, 2024
1 parent 9ecd493 commit 79add09
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions ci/arcgis/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,17 @@ RUN mamba install --yes 'jupyter-server-proxy' && \
mamba clean --all -f -y && \
fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}"

# Note: uncommenting this section makes "${env_name}" default both for Jupyter Notebook and Terminals
# More information here: https://github.com/jupyter/docker-stacks/pull/2047
ARG env_name=base
USER root
RUN \
# This changes a startup hook, which will activate the custom environment for the process
echo conda activate "${env_name}" >> /usr/local/bin/before-notebook.d/10activate-conda-env.sh && \
# This makes the custom environment default in Jupyter Terminals for all users which might be created later
echo conda activate "${env_name}" >> /etc/skel/.bashrc && \
# This makes the custom environment default in Jupyter Terminals for already existing NB_USER
echo conda activate "${env_name}" >> "/home/${NB_USER}/.bashrc"

USER ${NB_UID}

0 comments on commit 79add09

Please sign in to comment.