Skip to content

Repository files navigation

A personal Jupyter Hub for teaching

⚠️ HEAVY DEVELOPMENT NOT READY FOR DAILY USE ⚠️

A easy to deploy JupyterHub (multi-user notebook) for individual or small classroom usage. Can be used as a complement for an on premise large scale install sharing the same images. It is based on docker, the hub and each individual servers run in a container. Data are persisted in named volumes.

⚠️ Its is not intended for production (no scaling, minimal security). :warning: By default, sign on is open expose wisely.

Usage

  1. Clone this repository
  2. Launch with docker compose up -d
  3. Use the local jupyterhub http://localhost:8000
  4. Or Use a link nbgitpuller link with http://localhost:8000 to bootstrap with any github repository.

Configuration

The configuration is done in jupyterhub_config.py.

The following jupyter docker images are provided :

  1. Python (brunoe/jupyter-base)
  2. Java (brunoe/jupyter-java)
  3. PostgreSQL (brunoe/jupyter-db-pg)
  4. SciPy (jupyter/scipy-notebook)

The images 1. to 3. includes the vscode IDE and a a Linux window manager in the browser (XFCE).

Storage

Data for the hub and the users are stored in volumes.

docker volume ls|grep jupyterhub-

To backup users volumes one solution is to use tar in another container.

USERS=$(docker volume ls|tr -s ' '|cut -f 2 -d ' '|sed -n s'/^jupyterhub-user-\(.*\)/\1/p')
for USER_TO_BACKUP in $USERS; do
  echo --Backing up $USER_TO_BACKUP--
  docker run --rm \
          -v $PWD/jupyterhub-backups/:/backups \
          -v jupyterhub-user-$USER_TO_BACKUP:/work \
          jupyter/minimal-notebook \
          tar --exclude={".m2",".codeserver/data/CachedExtension*","/work/.codeserver/data/logs/"} \
            -zcf \
            /backups/jupyterhub-user-$USER_TO_BACKUP-backup.tar.gz \
            /work
done

About

No description or website provided.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages