Fix glances GPU access using deploy resources syntax
The runtime:nvidia field wasn't being applied. Switch to deploy resources reservations syntax (matching plex config) and add NVIDIA_DRIVER_CAPABILITIES for NVML library access.
This commit is contained in:
@@ -1,21 +1,26 @@
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
glances:
|
||||
container_name: glances
|
||||
image: 'nicolargo/glances:latest-full'
|
||||
restart: unless-stopped
|
||||
privileged: true
|
||||
runtime: nvidia
|
||||
ports:
|
||||
- 61208-61209:61208-61209
|
||||
environment:
|
||||
- TZ=${TZ}
|
||||
- NVIDIA_VISIBLE_DEVICES=all
|
||||
- NVIDIA_DRIVER_CAPABILITIES=compute,utility
|
||||
- "GLANCES_OPT=-C /glances/conf/glances.conf -w"
|
||||
volumes:
|
||||
- '/var/run/docker.sock:/var/run/docker.sock:ro'
|
||||
- '/run/user/1000/podman/podman.sock:/run/user/1000/podman/podman.sock:ro'
|
||||
- /srv/glances/glances.conf:/glances/conf/glances.conf
|
||||
pid: host
|
||||
deploy:
|
||||
resources:
|
||||
reservations:
|
||||
devices:
|
||||
- driver: nvidia
|
||||
count: all
|
||||
capabilities: [gpu]
|
||||
|
||||
Reference in New Issue
Block a user