@@ -26,11 +26,11 @@ RUN mamba env update -n base -f /tmp/environment.yml && \
2626 pip uninstall -y torch torchvision && \
2727 # Install PyTorch packages without cache - conditionally based on variant
2828 if [ "$PYTORCH_VARIANT" = "cpu" ]; then \
29- echo "Installing CPU-only PyTorch" && \
30- pip install --no-cache-dir --force-reinstall torch torchvision --index-url https://download.pytorch.org/whl/cpu; \
29+ echo "Installing CPU-only PyTorch" && \
30+ pip install --no-cache-dir --force-reinstall torch torchvision --index-url https://download.pytorch.org/whl/cpu; \
3131 else \
32- echo "Installing CUDA-enabled PyTorch" && \
33- pip install --no-cache-dir --force-reinstall torch torchvision; \
32+ echo "Installing CUDA-enabled PyTorch" && \
33+ pip install --no-cache-dir --force-reinstall torch torchvision; \
3434 fi && \
3535 # Clean up all package caches to reduce image size
3636 mamba clean --all -f -y && \
@@ -63,6 +63,17 @@ RUN apt-get update && \
6363 apt-get clean && \
6464 rm -rf /var/lib/apt/lists/*
6565
66+ # System-wide Jupyter Server config
67+ COPY docker/jupyter_server_config.py /opt/conda/etc/jupyter/
68+
69+ # Jupyter Lab settings
70+ RUN mkdir -p /opt/conda/share/jupyter/lab/settings
71+ COPY docker/overrides.json /opt/conda/share/jupyter/lab/settings/
72+
73+ # System-wide IPython profile config
74+ RUN mkdir -p /opt/conda/etc/ipython
75+ COPY docker/ipython_config.py /opt/conda/etc/ipython/
76+
6677# Switch back to the default notebook user
6778USER ${NB_UID}
6879
@@ -72,9 +83,6 @@ COPY --from=builder ${CONDA_DIR} ${CONDA_DIR}
7283# Copy home directory with configurations
7384COPY --from=builder --chown=${NB_UID}:${NB_GID} /home/${NB_USER} /home/${NB_USER}
7485
75- # Prepare IPython configuration
76- COPY --chown=${NB_UID}:${NB_GID} binder/ipython_config.py ${HOME}/.ipython/profile_default/
77-
7886# Set the working directory to user's home (repository will be cloned here by Renku)
7987WORKDIR /home/${NB_USER}
8088
0 commit comments