Setting up JupyterHub on ifisheries.org

Table of Contents

The Littlest JupyterHub (TLJH) is a 'distribution' of JupyterHub suitable for up to 100 concurrent users.

1 Preparing for the TLJH Installation

1.1 Install some required OS packages

sudo apt install python3 git curl

2 Install TLJH

2.1 Configure TLJH

sudo tljh-config set http.port 8080
sudo tljh-config set https.enabled true
sudo tljh-config set https.port 4443
sudo tljh-config set https.tls.key /etc/letsencrypt/live/ifisheries.org/privkey.pem
sudo tljh-config set https.tls.cert /etc/letsencrypt/live/ifisheries.org/fullchain.pem

sudo systemctl restart jupyterhub.service

2.2 Install nbgrader and iPython Parallel

Log in to the web interface at https://ifisheries.org:4443 as an admin and start a terminal.

sudo -E pip install nbgrader
sudo -E jupyter nbextension install --sys-prefix --py nbgrader --overwrite
sudo -E jupyter nbextension enable --sys-prefix --py nbgrader
sudo -E jupyter serverextension enable --sys-prefix --py nbgrader

sudo -E pip install ipyparallel

sudo systemctl restart jupyterhub.service

2.3 Install the R kernel

sudo apt install r-base

Log in to the web interface at https://ifisheries.org:4443 as an admin and start a terminal.

sudo R
install.packages(c('repr', 'IRdisplay', 'evaluate', 'crayon', 'pbdZMQ', 'devtools', 'uuid', 'digest'))
devtools::install_github('IRkernel/IRkernel')
IRkernel::installspec(user = FALSE)
sudo systemctl restart jupyterhub.service

2.4 Add users

  • From the web interface, click the 'Control Panel' button at the top right
  • Click the 'Admin' button at the top left
  • Click the 'Add Users' button at the upper left

3 Bug in Current version of TLJH that affects NBGrader

The bug is described at

https://github.com/jupyter/nbgrader/issues/1067

Essentially it means you cannot release the assignments directly from the web interface. However, the May 7 post from mkempenaar describes a workaround. You start an admin console from the web interface and use the nbgrader command. The author says there will be a fix in the next release.

Author: Joseph Mingrone

Created: 2019-08-30 Fri 13:14

Validate