Skip to content

Commit

Permalink
[demo] add GPU to resources (facebookresearch#355)
Browse files Browse the repository at this point in the history
This small PR adds GPU specification in `docker-compose.yaml` for the SAM 2 interactive webdemo, following https://docs.docker.com/compose/how-tos/gpu-support/#example-of-a-compose-file-for-running-a-service-with-access-to-1-gpu-device. It fixes a GPU access error as reported in facebookresearch#354.

(close facebookresearch#354)
  • Loading branch information
ronghanghu authored Oct 3, 2024
1 parent 8bf0920 commit e225218
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,10 @@ services:
- VIDEO_ENCODE_MAX_WIDTH=1280
- VIDEO_ENCODE_MAX_HEIGHT=720
- VIDEO_ENCODE_VERBOSE=False
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]

0 comments on commit e225218

Please sign in to comment.