Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
eeholmes committed Feb 1, 2024
1 parent 9d2cd2f commit e07e3c9
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions ci/arcgis/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,21 @@ FROM ghcr.io/esri/arcgis-python-api-notebook
RUN mamba install --yes 'jupyter-server-proxy' && \
mamba clean --all -f -y

# Name your environment and choose the Python version
# Clone base
ARG env_name=arcgis

# You can add additional libraries here
RUN conda create --name "${CONDA_DIR}/envs/${env_name}" --clone base
RUN conda create --name "${env_name}" --clone base

# Create Python kernel and link it to jupyter
RUN "${CONDA_DIR}/envs/${env_name}/bin/python" -m ipykernel install --user --name="${env_name}" && \
fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}"

USER root
# Create dirs for startup hooks
RUN mkdir /usr/local/bin/before-notebook.d && \
fix-permissions "/usr/local/bin/before-notebook.d"
RUN echo 'eval "$(conda shell.bash hook)"' > /usr/local/bin/before-notebook.d/10activate-conda-env.sh
USER ${NB_UID}

# 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
Expand Down

0 comments on commit e07e3c9

Please sign in to comment.