version: "3.8" services: jupyter: image: quay.io/jupyter/pytorch-notebook:latest container_name: jupyter-gpu restart: unless-stopped ports: - "${JUPYTER_PORT:-8888}:8888" volumes: - jupyter_data:/home/jovyan/work environment: - JUPYTER_TOKEN=${JUPYTER_TOKEN:-changeme} - JUPYTER_ENABLE_LAB=yes - GRANT_SUDO=${GRANT_SUDO:-yes} user: root deploy: resources: reservations: devices: - driver: nvidia count: all capabilities: [gpu] volumes: jupyter_data: