gvisor icon indicating copy to clipboard operation
gvisor copied to clipboard

Run docker in gVisor with GPU

Open milantracy opened this issue 5 months ago • 4 comments

Description

gVisor allows user to run normal docker workflows inside gVisor sandbox as described at https://gvisor.dev/docs/tutorials/docker-in-gvisor/.

At the same time, users can run AI/ML workflow with docker using GPU (not sandboxed) like https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/sample-workload.html

I would like to gauge interests/demand on running docker workflows using GPU inside gVisor sandbox. Please feel free to let us know what you think about the idea.

Is this feature related to a specific bug?

n/a

Do you have a specific solution in mind?

No response

milantracy avatar Jul 09 '25 22:07 milantracy

I think this would be great, but I'm more interested in desktop workloads than server ones.

DemiMarie avatar Jul 23 '25 03:07 DemiMarie

I was looking into using gVisor to run fully isolated local LLM's for agentic software development. Would be a critical feature for that use case?

mikeball avatar Aug 10 '25 17:08 mikeball

@mikeball gVisor already has GPU support: https://gvisor.dev/docs/user_guide/gpu/; so you could spawn gVisor containers which run your LLMs.

I believe this issue is about running the Docker daemon inside a gVisor container and using that inner docker to spawn GPU containers inside of gVisor container (nested GPU access).

ayushr2 avatar Aug 10 '25 18:08 ayushr2

@mikeball I can confirm that at least Ollama and vLLM work fine in gVisor with GPU support, without nested Docker. If you find incompatibilities, please report them as separate issues, as this type of workload is intended to be well-supported.

EtiennePerot avatar Aug 11 '25 05:08 EtiennePerot