selenecodes
GPU-jupyterhub
Python

A basic jupyterhub with Nvidia GPU accessibility.

Last updated Nov 24, 2025
16
Stars
5
Forks
0
Issues
0
Stars/day
Attention Score
6
Language breakdown
No language data available.
Files click to expand
README

GPU-jupyterhub

This jupyterhub implementation allows for Nvidia GPU access using the nvidia-docker-2 container runtime.

Requirements

  • A cuda driver must be installed on the host system, you can check this by running nvidia-smi in the terminal.
  • Docker 19.03 or higher.
  • Docker compose 1.25.5 or higher.
I've personally found the DigitalOcean Tutorial to be the most reliable. Make sure to change the version number to 1.25.5!
  • The nvidia-container-runtime needs to be installed:
sudo apt-get install nvidia-container-runtime
  • Nvidia docker2 needs to be installed see their Github for instructions.

Installation

Preparation

To make runtime: nvidia work we need to change our /etc/docker/daemon.json to the following:
{
    "runtimes": {
        "nvidia": {
            "path": "/usr/bin/nvidia-container-runtime",
            "runtimeArgs": []
        }
    }
}

Building our notebook containers

We can now build our notebook containers with:
#cd notebooks/{notebook-folder}
#docker build -t {notebook-folder-name} .

Example

cd notebooks/base-notebook docker build -t "base-notebook" .

cd .. cd notebooks/minimal-notebook docker build -t "minimal-notebook"

And so on

Building the hub

Note: Make sure to change the userlist file to include your Github username.
# Make sure to do this in the root of the repo*
docker-compose up --build

Common Issues

  • Volume jupyterhub-db-data or jupyterhub-data not found.
docker volume create --name="jupyterhub-data"
  • Network jupyterhub-network not found.
docker network create "jupyterhub-network"
  • No such file or directory: '/data/jupyerhubcookiesecret'
Run the following command whilst replacing $DATAVOLUMECONTAINER with the actual path.
openssl rand -hex 32 > {$DATAVOLUMECONTAINER}/jupyterhubcookiesecret
🔗 More in this category

© 2026 GitRepoTrend · selenecodes/GPU-jupyterhub · Updated daily from GitHub