Closed wupasscat closed 10 months ago
@D34DC3N73R any word on this?
I've been meaning to comment on this and update this repo, but lots has been happening with netdata over the past couple of months/weeks. Since Netdata 1.41 release the python nvidia-smi plugin has been deprecated. The good news is that the official image can now be used and there is no longer a reason for this custom image to exist.
For the moment, you can add the environment variable NETDATA_EXTRA_APK_PACKAGES=gcompat
to include the glibc compatibility layer which will allow the nvidia-smi go plugin to work. Don't forget to uncomment nvidia-smi
and set it to yes
in go.d.conf using the default edit-config script.
$ docker exec -it netdata /bin/bash
netdata:/# cd /etc/netdata
netdata:/etc/netdata# ./edit-config go.d.conf
This is only a temporary solution as Netdata announced they will be moving the base image to a debian distribution to better utilize the new systemd-journal plugin. When that happens, you'll no longer need the extra environment variable and it will work like any other debian based image.
This is a docker-compose example of how I have Netdata running currently.
version: '3.8'
services:
netdata:
image: netdata/netdata:stable
container_name: netdata
hostname: netdata.example.com #FQDN
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=$NETDATA_CLAIM
- NETDATA_CLAIM_URL=https://app.netdata.cloud
- NETDATA_CLAIM_ROOMS=$NETDATA_ROOM
- NETDATA_EXTRA_APK_PACKAGES=gcompat nano
volumes:
- /path/to/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
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [GPU]
proxy:
container_name: proxy
image: tecnativa/docker-socket-proxy
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
- CONTAINERS=1
volumes:
netdatalib:
netdatacache: