-
Notifications
You must be signed in to change notification settings - Fork 2k
Errors displaying GPU accelerated graphics when using --net host #327
Comments
Unfortunately, OpenGL is not supported for now (see #11). This is on the roadmap for 2.0 though. That being said, your issue is really weird, the network namespace shouldn't change anything here unless your |
I ran into the same issue today. For a bit more context on what @v-lopez is doing: He is forwarding the hosts x-session into the docker container. I can confirm that without --net host everything works as expected - opengl supported or not. However when said net option is set, all hell breaks loose. On my local ubuntu machine I don't get any render output at all (not even glClear does anything). On our centos7 machines the application just segfaults in some nvidia lib. For my case - I'm not using nvidia-docker, but using docker as suggested by @3XX0. Edit: some information on the segfault, albeit probably not very useful:
|
For reference, if anyone gets here by google. The problem is not strictly related to nvidia-docker. I was able to solve by adding "--privileged". I have no idea why that fixes the problem. But well - works for me. |
The bug is still there: if host network driver is used - applications with OpenGL work but paint nothing or maybe render totally black textures (?)...
Could you please reopen this issue and maybe assign it for the next Milestone (v2)? Note that another workaround was proposed in #421 (via |
I ran into this bug with Running Thankfully This was with It is quite disappointing that running OpenGL applications in Docker is so poorly supported or unsupported for many years now. We had to spend a lot of time debugging this before realizing |
I have the same problem @dllu running the Docker version 19.03.2.
New with Docker so it was quite a challenge to get a Docker with ROS and Nvidia accelerated graphics to work. I was ready to give up when the OpenGL issue popped up, luckily I found a nice guide for ROS dockers here. This thread saved me from despair when the |
I'm facing issues using nvidia-docker with --net host.
I created a docker using the following Dockerfile:
I build it with:
sudo docker build . -t host-gpu
And run it with:
You'll see glxgears running pretty fast.
If you run it adding
--net host
which changes the network configuration:It displays a black screen.
If I run it without nvidia-docker, it works but without HW acceleration on both cases.
The text was updated successfully, but these errors were encountered: