I was able to do it like this: I was able to get OpenGL functioning withing my LXD container by running these commands from outside my container:
lxc config device add qt5-development /dev/nvidia0 unix-char path=/dev/nvidia0 lxc config device add qt5-development /dev/nvidiactl unix-char path=/dev/nvidiactl lxc config device add qt5-development /dev/nvidia-uvm unix-char path=/dev/nvidia-uvm lxc config device add qt5-development /dev/video0 unix-char path=/dev/video0 lxc config device add qt5-development /dev/tty0 unix-char path=/dev/tty0 lxc config device add qt5-development /dev/tty7 unix-char path=/dev/tty7 lxc config device add qt5-development /dev/tty8 unix-char path=/dev/tty8 lxc config device add qt5-development /dev/fb0 unix-char path=/dev/fb0 lxc config device add qt5-development /dev/dri unix-char path=/dev/dri lxc config device add qt5-development /dev/dri/card0 unix-char path=/dev/dri/card0 (some of these may be overkill) I also needed to install the same NVIDIA drivers that are installed in teh host, using the NVIDIA installer I needed to pass --no-kernel-module to the installer, in my case this resulted in: ./NVIDIA-Linux-x86_64-340.96.run --no-kernel-module I was able to test the implementation by running glxinfo from within my container. I can now compile and test Qt5 applications within my container with full hardware acceleration, Thanks again, Pete On Mar 11, 2016 2:02 PM, <[email protected]> wrote: > Hi! > > A couple of years ago, Graber wrote a neat article about how to run a GUI > app in LXC (https://www.stgraber.org/2014/02/09/lxc-1-0-gui-in-containers/). > I would like to do this in LXD, but have no idea how to translate those LXC > settings to LXD. Is it even possible? > > Please point me to a doc or tutorial if one exists. If not, please > explain how to convert each of the "lxc.mount.entry" settings (from the > article) listed below to their LXD equivalents. > > lxc.mount.entry = /dev/dri dev/dri none bind,optional,create=dir > lxc.mount.entry = /dev/snd dev/snd none bind,optional,create=dir > lxc.mount.entry = /tmp/.X11-unix tmp/.X11-unix none > bind,optional,create=dir > lxc.mount.entry = /dev/video0 dev/video0 none bind,optional,create=file > lxc.hook.pre-start = > /home/USERNAME/.local/share/lxc/precise-gui/setup-pulse.sh > > Thank you! > zamzing. > _______________________________________________ > lxc-users mailing list > [email protected] > http://lists.linuxcontainers.org/listinfo/lxc-users
_______________________________________________ lxc-users mailing list [email protected] http://lists.linuxcontainers.org/listinfo/lxc-users
