# Docker instance based usage analytics on a DGX machine

**URL:** <https://forums.developer.nvidia.com/t/docker-instance-based-usage-analytics-on-a-dgx-machine/198301>\
**Category:** DGX Systems (DATA CENTER)\
**Tags:** docker, ubuntu\
**Created:** [December 17, 2021, 5:55am UTC](https://forums.developer.nvidia.com/t/docker-instance-based-usage-analytics-on-a-dgx-machine/198301 "2021-12-17T05:55:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rudra](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/rudra/32/139530_2.png) [@Rudra](https://forums.developer.nvidia.com/u/Rudra)\
**Post date:** [December 17, 2021, 5:55am UTC](https://forums.developer.nvidia.com/t/docker-instance-based-usage-analytics-on-a-dgx-machine/198301/1 "2021-12-17T05:55:12Z")

</div>

Hello Team,

I have setup docker on my DGX machine and have been using multiple docker sessions for different tasks.  
I want to evaluate the GPU usage per docker session for each user. How can I do it?  
`nvidia-smi` is only helpful for overall usage statistics. The login is similar for each user and per docker session I need to evaluate how much consumption is there. Could you please suggest some solution?

---

<div class="post-metadata">

**Author:** ![ScottEllis](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/scottellis/32/14043_2.png) [@ScottEllis](https://forums.developer.nvidia.com/u/ScottEllis)\
**Post date:** [December 17, 2021, 7:02pm UTC](https://forums.developer.nvidia.com/t/docker-instance-based-usage-analytics-on-a-dgx-machine/198301/2 "2021-12-17T19:02:18Z")

</div>

Hi @Rudra ,

Are the users sharing the GPUs? Meaning, you have two concurrent Docker sessions going both with GPU0?

---

<div class="post-metadata">

**Author:** ![Rudra](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/rudra/32/139530_2.png) [@Rudra](https://forums.developer.nvidia.com/u/Rudra)\
**Post date:** [December 20, 2021, 4:51am UTC](https://forums.developer.nvidia.com/t/docker-instance-based-usage-analytics-on-a-dgx-machine/198301/3 "2021-12-20T04:51:16Z")

</div>

Hello @ScottEllis,

Yes. The users are sharing the GPUs.

Using the following command, each team-member creates a docker session and run their AI pipelines in it.

```auto
docker run --runtime=nvidia -e NVIDIA_VISIBLE_DEVICES=4,5 -v /path/users/name:/work --memory="32g" -p 5000:8888 -dit --rm --name mydocker nvcr.io/nvidia/tensorflow:20.03-tf2-py3

```

The only bottleneck is I am not able to track their individual GPU usage (and analytics).

---

<div class="post-metadata">

**Author:** ![ScottEllis](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/scottellis/32/14043_2.png) [@ScottEllis](https://forums.developer.nvidia.com/u/ScottEllis)\
**Post date:** [December 20, 2021, 4:22pm UTC](https://forums.developer.nvidia.com/t/docker-instance-based-usage-analytics-on-a-dgx-machine/198301/4 "2021-12-20T16:22:58Z")

</div>

It sounds like you and your team are at the point where manually doing a `docker run ...` is going to mean increasingly more pain - e.g., if you want to monitor usage, jobs, etc. there are easier ways.

What about changing the jobs to something like Slurm, and then you can use all of the Slurm analytics to capture and control usage? [https://developer.nvidia.com/blog/deploying-rich-cluster-api-on-dgx-for-multi-user-sharing/](https://developer.nvidia.com/blog/deploying-rich-cluster-api-on-dgx-for-multi-user-sharing/) is a “does not need anything else” quick-and-dirty way to deploy it.

ScottE

---

<div class="post-metadata">

**Author:** ![Rudra](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/rudra/32/139530_2.png) [@Rudra](https://forums.developer.nvidia.com/u/Rudra)\
**Post date:** [December 21, 2021, 5:44am UTC](https://forums.developer.nvidia.com/t/docker-instance-based-usage-analytics-on-a-dgx-machine/198301/5 "2021-12-21T05:44:41Z")

</div>

Hello @ScottEllis,

Thank you for sharing this. Let me check this out if it helps : )  
Best,
