A Docker image based on the jupyter-docker-stacks scipy-notebook
image, which is itself based
on the minimal-notebook
image, which is itself based on the base-notebook
image. This repo and
project is named after Elara, a prograde irregular satellite of the planet Jupiter.
See Jupyter Docker Stacks for a description of each image's dockerfile.
This image adds a number of additional packages including nbgrader and rise.
Build the image. Note the trailing ".". Flags:
- -f − path to file.
- -t − tag name.
docker build -f ./Dockerfile -t elara:latest .
Run the image, invoking the JupyterLab interface. Flags:
- --rm − automatically clean up the container and remove the file system when the container exits. Also removes anonymous volumes associated with the container.
- -p − set the local port to 8888 and the container port to 8888 (required).
- -v − bind local volume (name or abs path) to container volume (abs path).
- -e − sets an environment variable (in this case, launching the JupyterLab interface).
- --name − set local container name.
docker run --rm -it -p 8888:8888 -v /path/to/notebooks:/home/jovyan/work --name lab elara
You can also start the container by running run_lab.sh
passing in the port, volume, and local
name as arguments:
sh run_lab.sh 8888 /path/to/notebooks lab
You can also start the elara Jupyter Lab container with Docker Compose.
Place a copy of elara's docker-compose.yml
in the root directory of your project. Then run
docker compose up
Access the container at http://127.0.0.1:8888/lab?token=elara.
❗ By default stopped service containers created by docker compose up
or
docker compose run
are not removed. To eliminate these one-off containers run the following
command:
docker compose rm
Run the image, invoking the classic Jupyter notebook interface. Other flags:
- --rm − automatically clean up the container and remove the file system when the container exits. Also removes anonymous volumes associated with the container.
- -p − set the local port to 8888 and the container port to 8888 (required).
- -v − bind local volume (name or abs path) to container volume (abs path).
- --name − set local container name.
docker run --rm -it -p 8888:8888 -e DOCKER_STACKS_JUPYTER_CMD=notebook -v /path/to/notebooks:/home/jovyan/work --name notebook elara
You can also start the container by running run_notebook.sh
passing in the port, volume, and
local name as arguments:
sh run_notebook.sh 8888 /path/to/notebooks notebook
Image based on Jupyter Docker Stacks jupyter/scipy-notebook which, in turn, is based on the jupyter/minimal-notebook.
For Jupyter Docker Stacks package installs see:
- scipy-notebook Dockerfile
- minimal-notebook Dockerfile
For additional elara package installs see requirements.txt.