Nomploy Nomad Packs

← All packs

jupyter v0.1.0

Dev tools

Jupyter — the Jupyter Notebook / JupyterLab environment for interactive Python, data science, and scientific computing in the browser. Deployed as a host-networked Nomad service with token auth, a configurable port, and a persistent work volume.

nomad-pack run jupyter --registry nomploy
…or one line (add registry + run)
curl -fsSL https://packs.nomploy.com/install.sh | sh -s -- jupyter

Needs nomad-pack on PATH. The script only adds the nomploy registry and runs this pack.

2 tasks http 8110 1 volume image quay.io/jupyter/minimal-notebook:latest tracks :latest image bumped today
Variables 9
values.hcl

Save as values.hcl, edit, then run:

nomad-pack run jupyter -f values.hcl --registry nomploy
# The name of the Nomad job.
job_name = "jupyter"

# The Nomad namespace to deploy into.
namespace = "default"

# The datacenters to deploy to.
datacenters = ["*"]

# The Jupyter image. minimal-notebook is lean; use scipy-notebook / datascience-notebook for batteries-included stacks. Pin a tag in production.
image = "quay.io/jupyter/minimal-notebook:latest"

# Host port for the Jupyter web UI.
port = 8110

# Access token required to log in (JUPYTER_TOKEN). CHANGE THIS — anyone with the token gets a Python shell. Empty disables auth (unsafe).
token = "change-me-to-a-long-random-token"

# Named volume for notebooks and files (/home/jovyan/work).
work_volume = "jupyter_work"

# Placement constraints. Pin to the node holding the volume. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
constraints = []

# Resources for the Jupyter task. Notebooks running data workloads may need much more memory.
resources = {
    cpu    = 1000
    memory = 1024
  }
NameTypeDefaultDescription
job_name string
"jupyter"
The name of the Nomad job.
namespace string
"default"
The Nomad namespace to deploy into.
datacenters list
["*"]
The datacenters to deploy to.
image string
"quay.io/jupyter/minimal-notebook:latest"
The Jupyter image. minimal-notebook is lean; use scipy-notebook / datascience-notebook for batteries-included stacks. Pin a tag in production.
port number
8110
Host port for the Jupyter web UI.
token set me string
"change-me-to-a-long-random-token"
Access token required to log in (JUPYTER_TOKEN). CHANGE THIS — anyone with the token gets a Python shell. Empty disables auth (unsafe).
work_volume string
"jupyter_work"
Named volume for notebooks and files (/home/jovyan/work).
constraints list
[]
Placement constraints. Pin to the node holding the volume. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
resources object
{
    cpu    = 1000
    memory = 1024
  }
Resources for the Jupyter task. Notebooks running data workloads may need much more memory.
Back up this pack

This pack stores data in one Docker named volume: jupyter_work

restic

# Run on the node hosting this pack. Point restic at your repo first:
#   export RESTIC_REPOSITORY="s3:https://<account>.r2.cloudflarestorage.com/<bucket>"
#   export RESTIC_PASSWORD="<repo-password>"
#   export AWS_ACCESS_KEY_ID=<key>  AWS_SECRET_ACCESS_KEY=<secret>
restic backup \
  /var/lib/docker/volumes/jupyter_work/_data

rclone (sync to S3/R2)

rclone sync /var/lib/docker/volumes/jupyter_work/_data backup:<bucket>/jupyter_work

Paths assume the default Docker volume location (/var/lib/docker/volumes). Restore by stopping the job, restoring files into the same volume, and re-running the pack.

Readme

jupyter

Jupyter — JupyterLab / Jupyter Notebook for interactive Python, data analysis, and scientific computing in the browser. Live code, equations, visualizations, and narrative text in shareable notebooks.

Single host-networked Nomad service with token auth and a persistent work volume. A prestart task chowns the volume so the jovyan user (uid 1000 / gid 100) can write it.

Deploy

nomad-pack registry add nomploy https://github.com/Nomploy/nomad-packs
nomad-pack run jupyter --registry=nomploy

Configure

Variable Default Description
port 8110 Web UI port.
token change-me-… Login token (JUPYTER_TOKEN). Change it — the server is a Python shell.
image quay.io/jupyter/minimal-notebook:latest Jupyter image. Use scipy-notebook / datascience-notebook for a batteries-included stack.
work_volume jupyter_work /home/jovyan/work — your notebooks and files.
resources { cpu = 1000, memory = 1024 } Task resources. Bump memory for real data workloads.

Open http://<node-ip>:8110/?token=<your-token>. Serves plain HTTP — put a reverse proxy in front for TLS. Pin the job to the node holding the volume with constraints. To add Python packages permanently, build your own image FROM a Jupyter image with the extra deps baked in.