VirtualGL / virtualgl

Main VirtualGL repository

Home Page:https://VirtualGL.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can EGL run with a GPU card without using /dev/dri?

duongnb09 opened this issue · comments

Hi,

For a bit of context, I'm trying to run VirtualGL EGL backend in a docker container running in a Kubernetes (K8s) pod. Getting /dev/dri available in K8s is very difficult. For docker, we either need to use the --device parameter like --device /dev/dri:/dev/dri  or set --privileged. The former is not supported in K8s while the latter exposes a huge security risk. The docker container already has the access to the GPU card via nvidia-container-runtime and we have full capabilities including compute, video, graphics, utility. Other rendering libraries like Panda3d can use EGL to do the rendering task in the container. I wonder if we have a similar way to run VirtuaGL EGL? Or the question is can we run EGL backend using the existing GPUs instead of trying to use DRI devices (which are similar hardware but we cannot expose it in the container)?

Thanks!

commented

The latest stable pre-release build (which will eventually become 3.0.2, pending resolution of outstanding bugs) can access EGL devices using ordinal descriptors, such as egl0, egl1, etc. (the special egl descriptor now simply maps to egl0) rather than using DRI devices. Assuming that the container allows access to the host's GPU through EGL, then this should be sufficient to use the EGL back end within the container without mapping /dev/dri.

commented

Refer to #207.