Skip to main content

Command Palette

Search for a command to run...

Enabling GPU monitoring in Beszel (docker container)

Published
1 min read

Out of the box Beszel doesn’t provide monitoring information on any GPUs, at least when running Beszel via a docker container. Here is the docker compose (v2) file that enabled this monitoring to be possible:

services:
  beszel:
    image: henrygd/beszel
    container_name: beszel
    restart: unless-stopped
    ports:
      - 8090:8090
    volumes:
      - ./beszel_data:/beszel_data

  beszel-agent:
    image: henrygd/beszel-agent-nvidia
    container_name: beszel-agent
    restart: unless-stopped
    network_mode: host
    runtime: nvidia
    privileged: true
    healthcheck:
      test: ['CMD', '/agent', 'health']
      start_period: 5s
      interval: 120s
    environment:
      - GPU=true
      - NVIDIA_VISIBLE_DEVICES=all
      - NVIDIA_DRIVER_CAPABILITIES=utility
      - LISTEN=45876
      - KEY=ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH4dSMl+ZIYk/VOGRC99I5eoxxkHxmYKz6wIK4Mm/Gqd
      - TOKEN=323c-f87702764e-5054-60ed23df7c
      - HUB_URL=http://10.0.0.24:8090
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - ./beszel_agent_data:/var/lib/beszel-agent