docker-compose.yaml 519 B

123456789101112131415161718192021222324252627
  1. # version: '3.7'
  2. # services:
  3. # app:
  4. # build:
  5. # context: .
  6. # args:
  7. # - work_dir=/app
  8. # environment:
  9. # - FLASK_APP_PATH=/app/server.py
  10. # - FLASK_PORT=5000
  11. # working_dir: /app
  12. # volumes:
  13. # - './:/app'
  14. # ports:
  15. # - 5000:5000
  16. services:
  17. test:
  18. image: nvidia/cuda:10.2-base
  19. command: nvidia-smi
  20. deploy:
  21. resources:
  22. reservations:
  23. devices:
  24. - driver: nvidia
  25. count: 1
  26. capabilities: [gpu]