File tree Expand file tree Collapse file tree
plugins/inputs/nvidia_smi Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -110,4 +110,21 @@ confirmed to be an issue on an EVGA 2080 Ti.
110110** NOTE:** For use with docker either generate your own custom docker image based
111111on nvidia/cuda which also installs a telegraf package or use [ volume mount
112112binding] ( https://docs.docker.com/storage/bind-mounts/ ) to inject the required
113- binary into the docker container.
113+ binary into the docker container. In particular you will need to pass through
114+ the /dev/nvidia* devices, the nvidia-smi binary and the nvidia libraries.
115+ An minimal docker-compose example of how to do this is:
116+
117+ ``` yaml
118+ telegraf :
119+ image : telegraf
120+ runtime : nvidia
121+ devices :
122+ - /dev/nvidiactl:/dev/nvidiactl
123+ - /dev/nvidia0:/dev/nvidia0
124+ volumes :
125+ - ./telegraf/etc/telegraf.conf:/etc/telegraf/telegraf.conf:ro
126+ - /usr/bin/nvidia-smi:/usr/bin/nvidia-smi:ro
127+ - /usr/lib/x86_64-linux-gnu/nvidia:/usr/lib/x86_64-linux-gnu/nvidia:ro
128+ environment :
129+ - LD_PRELOAD=/usr/lib/x86_64-linux-gnu/nvidia/current/libnvidia-ml.so
130+ ` ` `
You can’t perform that action at this time.
0 commit comments