21 lines
618 B
YAML
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=''"
|