Fix glances GPU access using Ubuntu image and nvidia runtime

Alpine-based image (latest-full) is incompatible with NVIDIA libraries
due to musl/glibc mismatch. Switch to ubuntu-latest-full and use
runtime: nvidia for GPU monitoring support.
This commit is contained in:
2026-01-31 20:04:59 +00:00
parent 947f5fd348
commit 42bf219965
+3 -4
View File
@@ -1,21 +1,20 @@
version: '3'
services: services:
glances: glances:
container_name: glances container_name: glances
image: 'nicolargo/glances:latest-full' image: 'nicolargo/glances:ubuntu-latest-full'
restart: unless-stopped restart: unless-stopped
privileged: true privileged: true
runtime: nvidia
ports: ports:
- 61208-61209:61208-61209 - 61208-61209:61208-61209
environment: environment:
- TZ=${TZ} - TZ=${TZ}
- NVIDIA_VISIBLE_DEVICES=all - NVIDIA_VISIBLE_DEVICES=all
- NVIDIA_DRIVER_CAPABILITIES=compute,utility
- "GLANCES_OPT=-C /glances/conf/glances.conf -w" - "GLANCES_OPT=-C /glances/conf/glances.conf -w"
volumes: volumes:
- '/var/run/docker.sock:/var/run/docker.sock:ro' - '/var/run/docker.sock:/var/run/docker.sock:ro'
- '/run/user/1000/podman/podman.sock:/run/user/1000/podman/podman.sock:ro' - '/run/user/1000/podman/podman.sock:/run/user/1000/podman/podman.sock:ro'
- /srv/glances/glances.conf:/glances/conf/glances.conf - /srv/glances/glances.conf:/glances/conf/glances.conf
pid: host pid: host
runtime: nvidia