diff --git a/docker/py-dsci-100-grading/Dockerfile b/docker/py-dsci-100-grading/Dockerfile index d6d559a..d5dba00 100644 --- a/docker/py-dsci-100-grading/Dockerfile +++ b/docker/py-dsci-100-grading/Dockerfile @@ -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 diff --git a/docker/py-dsci-100-grading/jupyterlab_rise-0.42.0-py3-none-any.whl b/docker/py-dsci-100-grading/jupyterlab_rise-0.42.0-py3-none-any.whl new file mode 100644 index 0000000..3ab37d5 Binary files /dev/null and b/docker/py-dsci-100-grading/jupyterlab_rise-0.42.0-py3-none-any.whl differ diff --git a/docker/py-dsci-100/Dockerfile b/docker/py-dsci-100/Dockerfile index 3773e64..a7d8cdb 100644 --- a/docker/py-dsci-100/Dockerfile +++ b/docker/py-dsci-100/Dockerfile @@ -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 @@ -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" diff --git a/docker/r-dsci-100-grading/Dockerfile b/docker/r-dsci-100-grading/Dockerfile index a90204f..e905dd8 100644 --- a/docker/r-dsci-100-grading/Dockerfile +++ b/docker/r-dsci-100-grading/Dockerfile @@ -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 diff --git a/docker/r-dsci-100-grading/jupyterlab_rise-0.42.0-py3-none-any.whl b/docker/r-dsci-100-grading/jupyterlab_rise-0.42.0-py3-none-any.whl new file mode 100644 index 0000000..3ab37d5 Binary files /dev/null and b/docker/r-dsci-100-grading/jupyterlab_rise-0.42.0-py3-none-any.whl differ diff --git a/docker/r-dsci-100/Dockerfile b/docker/r-dsci-100/Dockerfile index 3cc2672..a7ae576 100644 --- a/docker/r-dsci-100/Dockerfile +++ b/docker/r-dsci-100/Dockerfile @@ -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} @@ -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/palmerpenguins@v0.1.0')" \ - && 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/palmerpenguins@v0.1.0'); 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