DetrDetectionSegmentation / docker-compose.yaml
CuriousDolphin's picture
add compose profile cpu/gpu
2fd019f
raw
history blame
518 Bytes
services:
detr_cpu:
profiles: [ "cpu" ]
build:
context: .
ports:
- 7000:7000
volumes:
- ./data:/app/data
detr_gpu:
build:
dockerfile: Dockerfile.nvidia
target: app
profiles: [ "gpu" ]
shm_size: '4gb' # pytorch dataloader crash
ports:
- 7000:7000
volumes:
- ./data:/app/data
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [ gpu ]