View previous topic :: View next topic |
Author |
Message |
jroth Tux's lil' helper
Joined: 08 Aug 2017 Posts: 76
|
Posted: Mon Oct 15, 2018 11:16 pm Post subject: [SOLVED] "failed to load driver: i965" from Docker |
|
|
So I'm running a GUI app (specifically MATLAB) in a Ubuntu docker container by using this approach:
Code: |
$ xhost +local:docker
$ docker run --rm -t --network none -e DISPLAY=$DISPLAY -e J2D_D3D=false -e _JAVA_AWT_WM_NONREPARENTING=1 -v /tmp/.X11-unix:/tmp/.X11-unix -v ~/shared-with-vm:/shared-with-host -v usrlocalmatlab:/usr/local/MATLAB matlab-holder /usr/local/MATLAB/R2018a/bin/matlab
|
where usrlocalmatlab is a docker volume that contains the MATLAB install and matlab-holder is a docker image on to which I've managed to install the right Ubuntu packages (as outlined here) to get MATLAB to start.
And this approach works fine on my desktop with Nvidia GPU. I can run those two lines of bash and get the matlab program to show up on my desktop, running from the VM, and use all the features.
But on my laptop, with intel integrated graphics, I get this error in the terminal whenever I try to use plotting or other graphical functions of matlab:
Code: |
libGL error: failed to open drm device: No such file or directory
libGL error: failed to load driver: i965
|
and the plots don't work. In fact, that error seems to pop up whenever I try to run a graphics intensive app from inside the docker container - even glxgears will trigger it, although unline MATLAB glxgears seems to run fine despite the error.
Does anyone know how to debug this?
Last edited by jroth on Mon Oct 22, 2018 7:45 pm; edited 1 time in total |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
Back to top |
|
|
jroth Tux's lil' helper
Joined: 08 Aug 2017 Posts: 76
|
Posted: Tue Oct 16, 2018 6:56 am Post subject: |
|
|
Jaglover wrote: | Quote: | failed to open drm device: No such file or directory |
Reconfigure your kernel to provide it. |
Reconfigure it how? I already had all the kernel options listed on the wiki page for Intel.
I also set
Code: | VIDEO_CARDS="intel i965" |
in my make.conf, then ran
Code: | # emerge --ask --changed-use --deep @world |
and rebooted, but that didn't help. |
|
Back to top |
|
|
jroth Tux's lil' helper
Joined: 08 Aug 2017 Posts: 76
|
Posted: Mon Oct 22, 2018 7:44 pm Post subject: |
|
|
So it turns out that the problem wasn't in the host system so much as I wasn't giving the container access to the video card device. I fixed it by doing this:
Code: |
#!/bin/bash
xhost +local:docker
docker run --device /dev/dri/ --rm -t --network none -e DISPLAY=$DISPLAY -e J2D_D3D=false -e _JAVA_AWT_WM_NONREPARENTING=1 -v /tmp/.X11-unix:/tmp/.X11-unix -v ~/shared-with-vm:/shared-with-host -v usrlocalmatlab:/usr/local/MATLAB -v matlab-holder /usr/local/MATLAB/R2018a/bin/matlab
|
the key difference being the flag
giving the Docker container access to the video device it needed.
It's still sort of a mystery how this step isn't necessary on an NVidia graphics machine. |
|
Back to top |
|
|
|