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 and Nicolai Jørgensen committed Oct 15, 2024
1 parent fa9e672 commit 5d4ae0c
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,10 @@ services:
- VIDEO_ENCODE_MAX_WIDTH=1280
- VIDEO_ENCODE_MAX_HEIGHT=720
- VIDEO_ENCODE_VERBOSE=False
# Optional: This ensures the container is using the GPU
- NVIDIA_VISIBLE_DEVICES=all
- NVIDIA_DRIVER_CAPABILITIES=compute,utility
- MAX_UPLOAD_VIDEO_DURATION=600
- VIDEO_ENCODE_VERBOSE=True


# Uncomment this section to enable GPU support via NVIDIA Container Toolkit
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
count: 1
capabilities: [gpu]

0 comments on commit 5d4ae0c

Please sign in to comment.