This jupyterhub implementation allows for Nvidia GPU access using the nvidia-docker-2 container runtime.
- A cuda driver must be installed on the host system, you can check this by running
nvidia-smi
in the terminal. - Docker 18.09.5 or higher.
- Docker compose 1.25.5 or higher.
- 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.
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": []
}
}
}
Build and tag the image using the Dockerfile
in this directory.
#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
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
Then run the following from the root directory of this repository:
# bring down the JupyterHub container, if running
docker-compose down
# bring it back up
docker-compose up -d
- Volume
jupyterhub-db-data
orjupyterhub-data
not found.
docker volume create --name="jupyterhub-db-data"
docker volume create --name="jupyterhub-data"
- Network
jupyterhub-network
not found.
docker network create "jupyterhub-network"