Skip to content

Commit

Permalink
Move jupyter config dir from user home to /opt/conda/etc/jupyter
Browse files Browse the repository at this point in the history
  • Loading branch information
tmetzl committed Feb 18, 2025
1 parent a8acdee commit e713113
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions images/e2xgrader-notebook/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ LABEL org.opencontainers.image.source="https://github.com/DigiKlausur/docker-sta
LABEL org.opencontainers.image.licenses="MIT"
LABEL org.opencontainers.image.mode="$E2XGRADER_MODE"

ENV JUPYTER_CONFIG_DIR=/opt/conda/etc/jupyter

USER root
# Copy nbgrader base config
COPY configs/nbgrader_config.py /etc/jupyter/nbgrader_config.py
Expand All @@ -39,8 +41,8 @@ RUN pip install --no-cache-dir -r /tmp/mode_requirements.txt
COPY custom/custom-preload.js /tmp/custom-preload.js
RUN if [ "$E2XGRADER_MODE" = "student_exam" ]; then \
echo "Copying custom-preload.js for student_exam mode"; \
mkdir -p ~/.jupyter/custom && \
cp /tmp/custom-preload.js ~/.jupyter/custom/; \
mkdir -p "$JUPYTER_CONFIG_DIR"/custom/; \
cp /tmp/custom-preload.js "$JUPYTER_CONFIG_DIR"/custom/; \
fi

USER root
Expand Down

0 comments on commit e713113

Please sign in to comment.