Skip to content

Commit

Permalink
Update dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
briank-git committed Aug 1, 2024
1 parent 5fe1895 commit ae44ed9
Show file tree
Hide file tree
Showing 7 changed files with 424 additions and 1,187 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
863 changes: 413 additions & 450 deletions dockerfiles/r-stat-301/conda-linux-64.lock

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion dockerfiles/r-stat-301/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ dependencies:
- jupyterlab
- jupyterlab-git
- jupyter-resource-usage
- jupyterlab_rise
- jupytext
- nbgitpuller
- python=3.11
Expand Down
Binary file not shown.
Loading

0 comments on commit ae44ed9

Please sign in to comment.