Skip to content

Commit

Permalink
Merge pull request #13 from UBC-STAT/dockerfile-updates-2024W1
Browse files Browse the repository at this point in the history
Update dockerfile
  • Loading branch information
briank-git authored Aug 15, 2024
2 parents 8d7c9ba + ae44ed9 commit 90a4ba6
Show file tree
Hide file tree
Showing 6 changed files with 424 additions and 463 deletions.
1 change: 1 addition & 0 deletions .github/workflows/publish_docker_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
paths:
- 'dockerfiles/r-stat-301/Dockerfile'
- 'dockerfiles/r-stat-301/conda-linux-64.lock'
- 'dockerfiles/r-stat-301-grading/Dockerfile'
jobs:
build:
Expand Down
10 changes: 2 additions & 8 deletions dockerfiles/r-stat-301-grading/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
# Copyright (c) UBC-DSCI Development Team.
# Distributed under the terms of the Modified BSD License.

# TODO: For testing purposes only, change back to ubcdsci/r-stat-301:latest
FROM ubcstatit/r-stat-301-student:latest
FROM ubcdsci/r-stat-301:latest

LABEL maintainer="Brian Kim <[email protected]>"

# install rise slides extension, nbgrader, clean cache
RUN mamba install --quiet --yes \
'nbgrader=0.8.2' && \
mamba clean --all -f -y

# re-upgrade jupyter-server (mamba downgrades it)
RUN pip install --upgrade jupyter-server
RUN pip install --no-cache nbgrader

# Allow all shortcuts
RUN rm -f /home/${NB_USER}/.jupyter/lab/user-settings/\@jupyterlab/shortcuts-extension/shortcuts.jupyterlab-settings
12 changes: 8 additions & 4 deletions dockerfiles/r-stat-301/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ RUN mamba update --quiet --file /tmp/conda-linux-64.lock && \
mamba clean --all -y -f && \
fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}" && \
Rscript -e "install.packages('faux', repos='http://cran.us.r-project.org')" && \
Rscript -e "install.packages('moderndive', repos='http://cran.us.r-project.org')"
Rscript -e "lib <- 'faux'; install.packages(lib, repos='http://cran.us.r-project.org'); if ( ! library(lib,character.only=TRUE,logical.return=TRUE)){quit(status=1,save='no')}" && \
Rscript -e "lib <- 'moderndive'; install.packages(lib, repos='http://cran.us.r-project.org'); if ( ! library(lib,character.only=TRUE,logical.return=TRUE)){quit(status=1,save='no')}"

# Install pexpect from main branch to fix asyncio issue with jupyterlab_git
RUN pip install --ignore-installed git+https://github.com/pexpect/pexpect.git@master
# Install latest pexpect to fix asyncio issue with jupyterlab_git
RUN pip install --no-cache pexpect==4.9.0

# Disable the cell toolbar (which ignores metadata and students often accidentally click + delete grading cells)
RUN jupyter labextension disable @jupyterlab/cell-toolbar-extension
Expand All @@ -56,6 +56,10 @@ COPY config/jupyter_server_config.py /home/${NB_USER}/.jupyter
# Copy gitconfig that sets default pull strategy to rebase
COPY config/.gitconfig /home/${NB_USER}/

# install rise from fork wheel with fixed CSS
COPY jupyterlab_rise-0.42.0-py3-none-any.whl ./
RUN pip install wheel && pip install jupyterlab_rise-0.42.0-py3-none-any.whl && rm -f jupyterlab_rise-0.42.0-py3-none-any.whl

# Make sure everything in the home folder is owned by NB_USER for running docker image locally.
USER root
RUN chown -R ${NB_USER} /home/${NB_USER}
Expand Down
Loading

0 comments on commit 90a4ba6

Please sign in to comment.