Closed OscarVanL closed 3 years ago
I see x11docker uses a special setup with Weston, Xwayland and xdotool instead of Xdummy or Xvfb to allow GPU access.
I don't really know what that all means, but from what I've been reading it appears that's the best way to do this and have GPU acceleration.
Interesting. Hmm. Yea that sounds like a faster way to do that, but does require something "outside" of docker.
I've explore how to make GPU supported in docker container for 3D rendering. My settings are RTX 2070 and nvidia driver installed.
Basically you need a nvidia contianer runtime (see the N-body example here https://developer.nvidia.com/blog/gpu-containers-runtime )
open a virtual display X server like :1 (https://medium.com/@renaldaszioma/how-to-run-unity-rendering-on-amazon-cloud-or-without-monitor-699eed0ce963)
map the virtual display :1 into the container using command "docker run -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=:1"
then using DISPLAY=:1 to start applications. This makes applications run on the X server outside of the container and utilize the GPU device on the host machine.
This article includes more implementation details. https://medium.com/@benjamin.botto/opengl-and-cuda-applications-in-docker-af0eece000f1
This is pretty complex. I originally wanted something "portable" that users could run on servers and such.
I recommend forking this project and giving it another name, like "gpu-acclerated-docker-something", as these additional requirements are beyond the scope of what I intended this project to be.
If you do fork and embark on this, please PR a link in the readme for users to find your project if they do want something gpu-acclerated.
Hi,
I love the work you've done on this, I'm using it in another container based on this which allows Blue Iris (a popular Windows-only Surveillance Camera software) to run on Linux servers.
The issue is, this application is extremely CPU heavy if the computer it's running on doesn't support Intel Quick Sync Hardware Acceleration. (See https://github.com/jshridha/docker-blueiris/issues/4)
Unfortunately, xvfb does not support hardware acceleration (see this table), meaning this setup won't allow for GPU acceleration.
Would other alternatives to xvfb permit GPU acceleration to be used on Wine applications?