stud-ai/0-install/docker-compose.yml
2024-08-06 11:37:45 +02:00

38 lines
1.0 KiB
YAML

version: "3.8"
services:
jupyter-server:
image: dl-jupyter
init: true
build:
context: ./
dockerfile: jupyter.Dockerfile
shm_size: '2gb'
env_file: ./.env
ports:
- ${JUPYTER_PORT}:${JUPYTER_PORT}
volumes:
- ${ROOT_DIR}:/jupyter
- ${DATA_DIR}:/jupyter/datasets
environment:
- NVIDIA_VISIBLE_DEVICES=all
command:
[
"jupyter",
"notebook",
"--ip=*",
"--port=${JUPYTER_PORT}",
"--allow-root",
"--notebook-dir=${JUPYTER_DIR}",
'--NotebookApp.token=${JUPYTER_TOKEN}'
]
deploy:
restart_policy:
condition: any
resources:
reservations:
devices:
- 'driver': 'nvidia'
'count': 1
'capabilities': ['gpu', 'utility', 'compute']