Skip to content

Commit

Permalink
Merge pull request #43 from UBC-DSCI/dockerfile-updates
Browse files Browse the repository at this point in the history
Update R and Py Dockerfiles
  • Loading branch information
briank-git authored Apr 19, 2024
2 parents 7b8916c + 515164b commit e29b623
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
3 changes: 3 additions & 0 deletions docker/py-dsci-100-grading/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ FROM ubcdsci/py-dsci-100:latest
# install nbgrader and the rise slides extension
RUN pip install jupyterlab-rise nbgrader

# Allow all shortcuts
RUN rm -f /home/${NB_USER}/.jupyter/lab/user-settings/\@jupyterlab/shortcuts-extension/shortcuts.jupyterlab-settings

# Clean the cache
RUN mamba clean --all -f -y

9 changes: 6 additions & 3 deletions docker/py-dsci-100/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,19 @@ RUN mamba install --quiet --yes \
'nodejs' \
'psycopg2' \
'jupyter-resource-usage' \
'altair-all' \
'pandas' \
&& mamba clean --all -f -y \
&& fix-permissions "${CONDA_DIR}" \
&& fix-permissions "/home/${NB_USER}"

# Install some recent python package that might not be on conda yet
RUN pip install pandas"<2.1" altair"==5.0.1" "vegafusion[embed]" vl-convert-python

# Install nbgitpuller, jlab-git, newest pexpect 4.9.0
RUN pip install nbgitpuller jupyterlab-git==0.50.0 pexpect==4.9.0 \
&& jupyter lab build

# Disable announcement pop-up on start
RUN jupyter labextension disable "@jupyterlab/apputils-extension:announcements"

# 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 @@ -49,6 +51,7 @@ COPY jupyter_server_config.py /home/${NB_USER}/.jupyter
COPY .gitconfig /home/${NB_USER}/

USER root

# Install zip package
RUN apt install zip

Expand Down
3 changes: 3 additions & 0 deletions docker/r-dsci-100-grading/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ FROM ubcdsci/r-dsci-100:latest
# install nbgrader and the rise slides extension
RUN pip install jupyterlab-rise nbgrader

# Allow all shortcuts
RUN rm -f /home/${NB_USER}/.jupyter/lab/user-settings/\@jupyterlab/shortcuts-extension/shortcuts.jupyterlab-settings

# Clean the cache
RUN mamba clean --all -f -y

4 changes: 4 additions & 0 deletions docker/r-dsci-100/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ RUN mamba install --quiet --yes \
'r-kknn' \
'r-testthat' \
'r-rpostgres' \
'r-themis' \
'jupyter-resource-usage' \
&& mamba clean --all -f -y \
&& fix-permissions "${CONDA_DIR}" \
Expand All @@ -41,6 +42,9 @@ RUN pip install nbgitpuller jupyterlab-git 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

# Disable announcement pop-up on start
RUN jupyter labextension disable "@jupyterlab/apputils-extension:announcements"

# Install the extension to remove the shift+M merge shortcut
COPY shortcuts.jupyterlab-settings /home/${NB_USER}/.jupyter/lab/user-settings/\@jupyterlab/shortcuts-extension/shortcuts.jupyterlab-settings

Expand Down

0 comments on commit e29b623

Please sign in to comment.