A Python 3 based command line tool for determining a docker container associated processes gpu utilization by joining information across 'nvidia-smi *' and 'docker *' commands.
Clone into the python path and run module as script via:
$ python3 -m nvidiadockerstats.nvidiadockerstats
Clone anywhere on network home, link, and run directly:
$ git clone https://github.com/cdw/nvidia-docker-stats.git
$ ln nvidia-docker-stats/nvidiadockerstats/nvidiadockerstats.py ~/bin/nvidiadockerstats
$ nvidiadockerstats
Container Image pid gpu_uuid used_memory used_gpu
9afcd2624a5b shiva/keras
30920 0 11207 MiB 0 %
30920 1 11587 MiB 0 %
30920 2 11587 MiB 0 %
30920 3 11251 MiB 0 %
5eca98f0fa0f vishnu/pytorch_ext
8846 0 401 MiB 0 %
8846 3 353 MiB 0 %
GPL 3