Skip to content

Commit

Permalink
Make smaller exam notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
tmetzl authored Mar 18, 2024
1 parent 5981cf2 commit 2d2467e
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion exam-notebook/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,29 @@
ARG IMAGE_SOURCE=ghcr.io/digiklausur/docker-stacks/notebook:latest
ARG IMAGE_SOURCE=ghcr.io/digiklausur/docker-stacks/minimal-notebook:latest
FROM $IMAGE_SOURCE

LABEL maintainer="e2x project H-BRS <[email protected]>"

USER root
# Copy nbgrader base config
COPY configs/nbgrader_config.py /etc/jupyter/nbgrader_config.py
RUN chown root:$NB_GID /etc/jupyter/nbgrader_config.py &&\
chmod g+rwX /etc/jupyter/nbgrader_config.py

USER $NB_USER

# Install grading requirements
COPY requirements.txt /tmp/requirements.txt
RUN pip install --no-cache-dir -r /tmp/requirements.txt && \
pip install --no-cache-dir e2xgrader=="0.3.0-dev2"

# Set up kernels
RUN touch /etc/ipython/ipython_config.py && \
python -m exam_kernel.install --sys-prefix && \
python -m java_syntax_kernel.install --sys-prefix

USER root
RUN rm /tmp/requirements.txt

USER $NB_USER

# Activate student exam mode by default
Expand Down

0 comments on commit 2d2467e

Please sign in to comment.