Skip to content

Commit

Permalink
Merge pull request #44 from UBC-DSCI/dockerfile-updates-2024W1
Browse files Browse the repository at this point in the history
Dockerfile updates 2024 w1
  • Loading branch information
briank-git authored Aug 12, 2024
2 parents e29b623 + b54f54e commit b365854
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 38 deletions.
7 changes: 6 additions & 1 deletion docker/py-dsci-100-grading/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
FROM ubcdsci/py-dsci-100:latest

# install nbgrader and the rise slides extension
RUN pip install jupyterlab-rise nbgrader
# RUN pip install jupyterlab-rise nbgrader
RUN pip install nbgrader

# 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

# Allow all shortcuts
RUN rm -f /home/${NB_USER}/.jupyter/lab/user-settings/\@jupyterlab/shortcuts-extension/shortcuts.jupyterlab-settings
Expand Down
Binary file not shown.
31 changes: 15 additions & 16 deletions docker/py-dsci-100/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright (c) UBC-DSCI Development Team.
# Distributed under the terms of the Modified BSD License.
FROM jupyter/scipy-notebook
FROM quay.io/jupyter/scipy-notebook

USER root

Expand All @@ -17,23 +17,22 @@ ENV PYDEVD_DISABLE_FILE_VALIDATION=1

# Install Python packages
RUN mamba install --quiet --yes \
'numpy' \
'jinja2' \
'click' \
'ghp-import' \
'ibis-framework' \
'nodejs' \
'psycopg2' \
'jupyter-resource-usage' \
'altair-all' \
'pandas' \
&& mamba clean --all -f -y \
&& fix-permissions "${CONDA_DIR}" \
&& fix-permissions "/home/${NB_USER}"
'numpy' \
'jinja2' \
'click' \
'ghp-import' \
'ibis-framework' \
'nodejs' \
'psycopg2' \
'jupyter-resource-usage' \
'altair-all' \
'pandas' \
&& mamba clean --all -f -y \
&& fix-permissions "${CONDA_DIR}" \
&& fix-permissions "/home/${NB_USER}"

# 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
RUN pip install nbgitpuller jupyterlab-git pexpect==4.9.0

# Disable announcement pop-up on start
RUN jupyter labextension disable "@jupyterlab/apputils-extension:announcements"
Expand Down
7 changes: 6 additions & 1 deletion docker/r-dsci-100-grading/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
FROM ubcdsci/r-dsci-100:latest

# install nbgrader and the rise slides extension
RUN pip install jupyterlab-rise nbgrader
# RUN pip install jupyterlab-rise nbgrader
RUN pip install nbgrader

# 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

# Allow all shortcuts
RUN rm -f /home/${NB_USER}/.jupyter/lab/user-settings/\@jupyterlab/shortcuts-extension/shortcuts.jupyterlab-settings
Expand Down
Binary file not shown.
42 changes: 22 additions & 20 deletions docker/r-dsci-100/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Copyright (c) UBC-DSCI Development Team.
# Distributed under the terms of the Modified BSD License.
FROM jupyter/r-notebook:lab-4.0.5
FROM quay.io/jupyter/r-notebook

USER root

# install vim and libgsl (for tidyclust)
RUN apt-get update && apt-get install -y vim libgsl27 libgsl-dev build-essential
RUN apt-get update && apt-get install -y vim libgsl-dev build-essential

USER ${NB_UID}

Expand All @@ -15,29 +15,31 @@ WORKDIR "${HOME}/work"
# https://discourse.jupyter.org/t/debugger-warning-it-seems-that-frozen-modules-are-being-used-python-3-11-0/16544/12
ENV PYDEVD_DISABLE_FILE_VALIDATION=1

# Install R packages
# Install mamba packages
RUN mamba install --quiet --yes \
'r-cowplot' \
'r-ggally' \
'r-gridextra' \
'r-infer' \
'r-kknn' \
'r-testthat' \
'r-rpostgres' \
'r-cowplot' \
'r-ggally' \
'r-gridextra' \
'r-infer' \
'r-kknn' \
'r-testthat' \
'r-rpostgres' \
'r-themis' \
'jupyter-resource-usage' \
&& mamba clean --all -f -y \
&& fix-permissions "${CONDA_DIR}" \
&& fix-permissions "/home/${NB_USER}" \
&& Rscript -e "remotes::install_github('allisonhorst/[email protected]')" \
&& Rscript -e "install.packages('ISLR', repos='http://cran.us.r-project.org')" \
&& Rscript -e "install.packages('scales', repos='http://cran.us.r-project.org')" \
&& Rscript -e "install.packages('tidyclust', repos='http://cran.us.r-project.org')" \
&& Rscript -e "install.packages('janitor', repos='http://cran.us.r-project.org')"
&& mamba clean --all -f -y \
&& fix-permissions "${CONDA_DIR}" \
&& fix-permissions "/home/${NB_USER}"

# Install CRAN packages
RUN Rscript -e "lib <- 'palmerpenguins'; remotes::install_github('allisonhorst/[email protected]'); if ( ! library('palmerpenguins',character.only=TRUE,logical.return=TRUE)){quit(status=1,save='no')}" \
&& Rscript -e "lib <- 'tidyclust'; 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 <- 'ISLR'; 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 <- 'scales'; 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 <- 'janitor'; 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 <- 'withr'; install.packages('https://cran.r-project.org/src/contrib/Archive/withr/withr_2.5.0.tar.gz', repos=NULL, type='source'); if ( ! library(lib,character.only=TRUE,logical.return=TRUE)){quit(status=1,save='no')}"

# Install nbgitpuller, jlab-git, newest pexpect 4.9.0
RUN pip install nbgitpuller jupyterlab-git pexpect==4.9.0 \
&& jupyter lab build
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
Expand Down

0 comments on commit b365854

Please sign in to comment.