Skip to content

Commit

Permalink
docker access to host gpu
Browse files Browse the repository at this point in the history
  • Loading branch information
luiztauffer committed Oct 10, 2023
1 parent a274afa commit d04ac27
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
10 changes: 7 additions & 3 deletions docker-compose-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,13 @@ services:
- ./containers:/app
- ./results:/results
- ./logs:/logs
runtime: nvidia
devices:
- "/dev/nvidia0:/dev/nvidia0"
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]

database:
image: postgres:latest
Expand Down
9 changes: 7 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,13 @@ services:
volumes:
- ./results:/results
- ./logs:/logs
devices:
- "/dev/nvidia0:/dev/nvidia0"
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]

database:
image: postgres:latest
Expand Down

0 comments on commit d04ac27

Please sign in to comment.