Skip to content
This repository has been archived by the owner on Jan 14, 2024. It is now read-only.
/ netdata-glibc Public archive

netdata with glibc package for use with nvidia-docker2

License

Notifications You must be signed in to change notification settings

D34DC3N73R/netdata-glibc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 

Repository files navigation

⚠️ DEPRECATED via Netdata v1.43.0 ⚠️

Netdata can now utilize GPUs in the native image since it's now based on Debian. This image is no longer needed. Examples using the netdata/netdata image below

Docker & nvidia-container-toolkit

docker run -d --name=netdata \
  -p 19999:19999 \
  -v <YOUR DOCKER CONFIGS>/netdata/config:/etc/netdata \
  -v netdatalib:/var/lib/netdata \
  -v netdatacache:/var/lib/cache/netdata \
  -v /etc/passwd:/host/etc/passwd:ro \
  -v /etc/group:/host/etc/group:ro \
  -v /var/run/docker.sock:/var/run/docker.sock:ro \
  -v /proc:/host/proc:ro \
  -v /sys:/host/sys:ro \
  -v /etc/os-release:/host/etc/os-release:ro \
  -e PGID=<HOST_DOCKER_PGID> \
  -e DO_NOT_TRACK= \
  -e NETDATA_CLAIM_TOKEN= # See https://learn.netdata.cloud/docs/agent/claim#connect-an-agent-running-in-docker \
  -e NETDATA_CLAIM_URL=https://app.netdata.cloud \
  -e NETDATA_CLAIM_ROOMS= # See https://learn.netdata.cloud/docs/agent/claim#connect-an-agent-running-in-docker \
  --gpus all \
  --restart unless-stopped \
  --cap-add SYS_PTRACE \
  --security-opt apparmor=unconfined \
  netdata/netdata:stable

Docker Compose

version: '3.8'
services:
  netdata:
    image: netdata/netdata:stable
    container_name: netdata
    hostname: netdata.example.com
    ports:
      - 19999:19999
    restart: unless-stopped
    depends_on:
      - proxy
    cap_add:
      - SYS_PTRACE
    security_opt:
      - apparmor:unconfined
    environment:
      - DOCKER_HOST=proxy:2375
      - NETDATA_CLAIM_TOKEN= # See https://learn.netdata.cloud/docs/agent/claim#connect-an-agent-running-in-docker
      - NETDATA_CLAIM_URL=https://app.netdata.cloud
      - NETDATA_CLAIM_ROOMS= # See https://learn.netdata.cloud/docs/agent/claim#connect-an-agent-running-in-docker
    volumes:
      - <YOUR DOCKER CONFIGS>/netdata/config:/etc/netdata
      - netdatalib:/var/lib/netdata
      - netdatacache:/var/lib/cache/netdata
      - /etc/passwd:/host/etc/passwd:ro
      - /etc/group:/host/etc/group:ro
      - /proc:/host/proc:ro
      - /sys:/host/sys:ro
      - /etc/os-release:/host/etc/os-release:ro
      - /var/log/journal:/var/log/journal:ro
      - /run/systemd/private:/run/systemd/private:ro
      - /mnt/media:/mnt/media:ro
    labels:
      - swag=enable
    deploy:
      resources:
        reservations:
          devices:
          - driver: nvidia
            count: all
            capabilities: [gpu]
  proxy:
    container_name: proxy
    image: tecnativa/docker-socket-proxy
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
    environment:
      - CONTAINERS=1

volumes:
  netdatalib:
  netdatacache:

netdata-glibc

This is an automated build of netdata with glibc package for use with nvidia-container-toolkit. Also available in Unraid Community Applications.

Netdata with Nvidia GPU monitoring in a container. This image was created due to netdata/netdata using Alpine, a musl distribution, as a base. Nvidia drivers are only compatible with glibc distributions. This image uses netdata/netdata as a base and adds a GNU C library to run binaries linked against glibc. This image does not contain nvidia-smi, but is compatible with nvidia-container-toolkit and the Unraid Nvidia Plugin.

nvidia-smi_netdata

Docker & nvidia-container-toolkit

docker run -d --name=netdata \
  -p 19999:19999 \
  -v <YOUR DOCKER CONFIGS>/netdata/config:/etc/netdata \
  -v <YOUR DOCKER CONFIGS>/netdata/lib:/var/lib/netdata \
  -v <YOUR DOCKER CONFIGS>/netdata/cache:/var/cache/netdata \
  -v /etc/passwd:/host/etc/passwd:ro \
  -v /etc/group:/host/etc/group:ro \
  -v /var/run/docker.sock:/var/run/docker.sock:ro \
  -v /proc:/host/proc:ro \
  -v /sys:/host/sys:ro \
  -v /etc/os-release:/host/etc/os-release:ro \
  -e PGID=<HOST_DOCKER_PGID> \
  -e DO_NOT_TRACK= \
  -e NETDATA_CLAIM_TOKEN= # See https://learn.netdata.cloud/docs/agent/claim#connect-an-agent-running-in-docker \
  -e NETDATA_CLAIM_URL=https://app.netdata.cloud \
  -e NETDATA_CLAIM_ROOMS= # See https://learn.netdata.cloud/docs/agent/claim#connect-an-agent-running-in-docker \
  --gpus all \
  --restart unless-stopped \
  --cap-add SYS_PTRACE \
  --security-opt apparmor=unconfined \
  d34dc3n73r/netdata-glibc

Docker Compose

version: '3.8'
services:
  netdata:
    image: d34dc3n73r/netdata-glibc
    container_name: netdata
    hostname: example.com # set to fqdn of host
    ports:
      - 19999:19999
    restart: unless-stopped
    depends_on:
      - proxy
    cap_add:
      - SYS_PTRACE
    security_opt:
      - apparmor:unconfined
    environment:
      - DOCKER_HOST=proxy:2375
      - NETDATA_CLAIM_TOKEN= # See https://learn.netdata.cloud/docs/agent/claim#connect-an-agent-running-in-docker
      - NETDATA_CLAIM_URL=https://app.netdata.cloud
      - NETDATA_CLAIM_ROOMS= # See https://learn.netdata.cloud/docs/agent/claim#connect-an-agent-running-in-docker
    volumes:
      - <YOUR DOCKER CONFIGS>/netdata/config:/etc/netdata
      - <YOUR DOCKER CONFIGS>/netdata/lib:/var/lib/netdata
      - <YOUR DOCKER CONFIGS>/netdata/cache:/var/lib/cache/netdata
      - /etc/passwd:/host/etc/passwd:ro
      - /etc/group:/host/etc/group:ro
      - /proc:/host/proc:ro
      - /sys:/host/sys:ro
      - /etc/os-release:/host/etc/os-release:ro
    deploy:
      resources:
        reservations:
          devices:
          - driver: nvidia
            count: all
            capabilities: [gpu]
  proxy:
    container_name: proxy
    image: tecnativa/docker-socket-proxy
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
    environment:
      - CONTAINERS=1

Available Tags

  • d34dc3n73r/netdata-glibc:stable
    • built from netdata/netdata:stable and updated with new netdata official releases
  • d34dc3n73r/netdata-glibc:latest
    • an automated nightly build using netdata/netdata:latest

Prerequisites

  • Nvidia container toolkit installed on the host system
  • Nvidia drivers installed on the host system

Container Name Resolution

docker run

  • Use the host docker PGID environment variable. To get this value run grep docker /etc/group | cut -d ':' -f 3 on the host system.

docker-compose

  • Container name resolution no longer requires the host docker PGID and mounting docker.sock. Instead this is handled by HAProxy so that connections are restricted to read-only access. For more information check out the Netdata Docker Installation Page.

Override Directory

Netdata now has override support built into their docker images. See Configure Agent Containers for more information. Vi is the default editor, but I like nano so this image includes nano. Use it with ./edit-config --editor nano <config filename>.

Notes

  • Netdata collects anonymous statistics. If you wish to opt-out, set the envionrment varible DO_NOT_TRACK=1.
  • This image uses the default python.d.conf with nvidia_smi: yes uncommented. Use ./edit-config for futher customization.

About

netdata with glibc package for use with nvidia-docker2

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages