23 lines
450 B
YAML
23 lines
450 B
YAML
services:
|
|
gpu:
|
|
image: gpu
|
|
volumes:
|
|
- .:/app
|
|
command: nvidia-smi
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
environment:
|
|
API_KEY_SECRET: /run/secrets/api_key_secret
|
|
secrets:
|
|
- api_key_secret
|
|
deploy:
|
|
resources:
|
|
reservations:
|
|
devices:
|
|
- driver: nvidia
|
|
count: 1
|
|
capabilities: [gpu]
|
|
secrets:
|
|
api_key_secret:
|
|
file: ./secrets.txt |