version: '3.8' services: jupyter: build: /opt/jupyter_pytorch container_name: my_build_jupyter runtime: nvidia deploy: resources: reservations: devices: - capabilities: [gpu] environment: - JUPYTER_ENABLE_LAB=yes volumes: - /opt/jupyter_pytorch/notebooks:/workspace # Map local notebook directory to container ports: - "8888:8888" # Expose port 8888 to the host command: > bash -c "jupyter-lab --ip=0.0.0.0 --port=8888 --no-browser --allow-root --NotebookApp.token='' --NotebookApp.password=''"