mirror of
				https://github.com/facebookresearch/sam2.git
				synced 2025-11-04 11:32:12 +08:00 
			
		
		
		
	[demo] add GPU to resources (#355)
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 https://github.com/facebookresearch/sam2/issues/354. (close https://github.com/facebookresearch/sam2/issues/354)
This commit is contained in:
		
							parent
							
								
									8bf0920e66
								
							
						
					
					
						commit
						e22521832f
					
				@ -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]
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user