Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update spike sorting script #9

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
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:
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@luiztauffer does this work on your side? I also found this solution, but docker compose was complaining

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alejoe91 can you please check if you have docker compose > 2 installed?

otherwise, what is the error you find?
This seems to be the most current way to give containers access to GPU through compose, the other method, as you mentioned, seems to be deprecated (although it was still running fine for me, weirdly enough)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alejoe91 another possible solution is this: https://docs.docker.com/config/containers/resource_constraints/#access-an-nvidia-gpu

can you please try and let me know if you needed to update your compose or if installing nvidia-container-runtime solved for you? We should then include these requirements in the description of the project

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