Dumb Question: GPU Acceleration

I just recently discovered Docker and to my understanding it uses GPU acceleration.
Is it possible to put a Linux desktop application in a container, if so, will that application use GPU acceleration?

On Docker-CE people do this since ages. They just pass in the device. But as far as I remember, the GPU drivers must be available inside the image in order to make use of the GPU.

If you just forward the x11 socket, you could even start an application inside the container, but render it on the desktop of your host’s x-server.

1 Like

To avoid bombarding you with questions, I’ll read as much as I can about CE. I’m just barely learning Docker Desktop for Linux.

I assume your “leader” tag means you frequent these forums?
Don’t mind if I drop you questions in a few days?

Sure, this is a public forum, and we aim to help others to help themselves.

If you have questions or get stuck while working on a solution, feel free to post your questions here in the forums. Someone will see and respond to it.

1 Like

Just to be clear, I’m asking about forcing a desktop application not designed for GPU acceleration to use the GPU. Is this possible?

If possible, not asking you to tell me how to do it. I want to use any CE docs I can to learn how to do it so I can apply it. I want to learn how to use Docker to my best advantage, as much as possible.

A container is “just” an isolated process. Either the applications is able to use GPU acceleration or not. Running an application inside a container will not change that.

As you mentioned Docker Desktop for Linux, I am not sure if GPU acceleration is available in Docker Desktop at all. While Docker CE runs directly on a Linux host, Docker Desktop always runs inside a utility vm.

Docker is indeed more fun, if you understand the concepts and understand how things are actually done in docker.

Recommended links to learn the basics and concepts:

Though, I am not sure if Docker Desktop is specifically covered.

1 Like

Got it, thank you for the links. (bookmarked)