jupyter_gpu/orig.docker-compose.yml
2024-06-01 16:23:03 -04:00

21 lines
618 B
YAML

version: '3.8'
services:
jupyter:
image: pytorch/pytorch:latest
container_name: pytorch_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 "pip install jupyterlab && jupyter-lab --ip=0.0.0.0 --port=8888 --no-browser --allow-root --NotebookApp.token='' --NotebookApp.password=''"