Docker Image

JupyterHub must be started with a Jupyter Docker Stacks image, or a descendant from it.

Jupyter Docker Stacks provides a wide array of Jupyter Notebooks to get you started:

These Docker images are however NOT GPU-enabled. For your convenience we created a fork of the public Jupyter Docker Stacks with GPU-processing capability. These images use as base image instead of a vanilla Ubuntu.

You can use these images by changing the prefix from jupyter/ to For example: a Jupyter notebook with the GPU-enabled Tensorflow and Keras-library can be found under

Adding custom software

JupyterHub supports all Docker images which descend from the Jupyter Docker Stacks

You can add additional software by creating a docker image which starts from an existing Jupyter Docker Stacks-image, and which executes the necessary installation commands. Check the section Using pip install or conda install in a Child Docker image of the Jupyter Docker Stacks documentation for a full example.

If you want to use GPU’s, you’ll need to descend your image from a GPU-enabled image. These are available in the public docker repository

For example, to add a library to the GPU-enabled tensorflow-notebook, you can use the following Dockerfile:

# Start from a core gpu-enabled stack version
# Set user as root so next commands run correctly
USER root
# Install dependencies
RUN apt-get update && apt install graphviz libgraphviz-dev libcgraph6 && rm -rf /var/lib/apt/lists/*
# Install spektral in the default python3 environment
RUN pip install spektral
# Restore the correct user
USER jovyan

After building this image, upload it to a Docker Registry with docker push. You can either use the publicly available, upload it to a Docker Registry of, or use your own registry. See dockerImage for more info.

For example to build and push this Dockerfile to the public GPULab Docker Registry:

docker build -t .
docker push

Once pushed to the registry, you can start your custom Jupyter Docker Image by specifying the full registry path in the field dockerImage. In this example:

When using a docker registry with authentication, this path will be of the form <deployusername>:<password><project>/<image>:<tag>. When using a Gitlab Registry you can create a deploy key to get a username and password for letting JupyterHub pull this image.