Why These Containers Exist
Every notebook on the index that carries a docker badge is also published as a container image: a frozen, self-contained copy of the notebook together with the exact versions of Python and every package it needs, plus a JupyterLab server to run it in. The "Open in Colab" button is the quickest way to try a notebook, but Colab's environment changes over time as Google updates it, and package versions on PyPI drift. A container does not change. Each image is only published after the notebook has been executed successfully inside it, so what you download is a verified snapshot that will still run years from now, on any machine that can run Docker.
What Docker Is
Docker is a widely used tool for running software in containers: lightweight, isolated environments that bundle a program with everything it needs. You can think of a container image as a snapshot of a small, pre-configured computer. When you run it, Docker starts that computer as an isolated process on your machine, without touching your own Python installation, packages, or files. When the container stops, your system is exactly as it was before.
Installing Docker
On macOS and Windows, install
Docker Desktop
and launch it (it must be running before you use docker
commands). On Linux, install
Docker Engine
from your package manager. To check that it works, open a terminal and run:
docker run hello-world
The images are built for both Intel/AMD and ARM processors, so they run natively on Apple Silicon Macs as well as on Intel machines and Linux servers.
Running a Specific Notebook
- On the notebook index, find the notebook you want and click its docker badge. This copies a ready-to-use command to your clipboard.
- Open a terminal and paste the command. It looks like this:
docker run --rm -p 127.0.0.1:8888:8888 ghcr.io/dandi/example-notebooks/001550-paganlab:latest
-
The first run downloads the image (typically a few hundred MB to
around 1 GB; later runs start instantly). Docker then starts
JupyterLab and prints a URL of the form
http://127.0.0.1:8888/lab?token=.... - Open that URL in your browser, token and all. JupyterLab opens on the notebook with every dependency already installed. The "Installing requirements" cell at the top is only needed on Colab and can be skipped. Run the remaining cells normally.
-
When you are done, press
Ctrl-Cin the terminal to stop the container.
The notebooks stream their data directly from the DANDI Archive, so an internet connection is still needed while the notebook runs; the data is not baked into the image.
Common Questions
-
"Bind for 127.0.0.1:8888 failed: port is already allocated"
or "address already in use": something else on your
machine (often your own Jupyter) is using port 8888. Change the first
port number, e.g.
-p 127.0.0.1:8890:8888, and openhttp://127.0.0.1:8890/lab?token=...instead. -
Saving your work: the
--rmflag means the container is discarded when it stops, and any edits you made inside it are discarded with it. To keep a modified notebook or a result file, download it from JupyterLab (right-click the file → Download) before stopping the container. -
Reproducibility:
latestalways points to the most recent verified build. Each image also carries a date tag (for example:2026-08-20) that you can cite in a paper or a methods section so others can pull the identical environment. - More detail: how the images are built, verified, and tagged is documented in the repository documentation.