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