version: "3.4" services: gpu-jupyter: image: 127.0.0.1:$REGISTRY_PORT/gpu-jupyter build: .build ports: - $JUPYTER_PORT:8888 volumes: - ./data:/home/jovyan/work environment: GRANT_SUDO: "yes" JUPYTER_ENABLE_LAB: "yes" # enable sudo permissions user: "root" networks: - default - $JUPYTER_NETWORK deploy: placement: constraints: [node.hostname == $HOSTNAME] replicas: 1 update_config: parallelism: 2 delay: 10s restart_policy: condition: on-failure networks: $JUPYTER_NETWORK: external: name: $JUPYTER_NETWORK