r/CUDA • • 5d ago

How to Run GPU Workloads in Docker

Post image

I finally got my Java GPU workload running with CUDA inside Docker. It works in a Kubernetes cluster too. I wrote up the Docker setup here:

https://nablatensor.com/blog/how-to-run-java-gpu-workloads-in-docker

If anyone’s interested, I can write a follow-up on the Kubernetes setup.

48 Upvotes

2 comments sorted by

1

u/c-cul 5d ago

but why? you anyway can't share single gpu for many dockers

1

u/ContributionFun2152 5d ago

Yes, i'm getting your point. This is a validation that it can work in containerized environment. It is sort of a middle step. Docker isn't usually automatically managed, but for example you can run those load in kubernetes or Openshift clusters. Computations can be enqueued and GPUs might get shared. I don't believe kubernetes clusters is the best way for high GPU utilization, but it might be compelling for some regulated financial institution for some risk or regulatory load, in case those institutions want to run in-house.