Closed danisla closed 7 months ago
I guess these two containers cover most of what is required for glx and vgl, and is intended to be used as a base containers for adding more applications in. DE was curated with MATE after testing the unintended side effects of Xfce and GNOME in a container, and each commit is assessed so that there are no unintended abnormalities introduced. It is currently widely used in industry and academic situations and issues are well addressed.
https://github.com/ehfd/docker-nvidia-egl-desktop - can be used for AMD/Intel GPUs/software acceleration fallback, and has what the images/ubuntu/base
and images/ubuntu/gpu
container needs too dynamically.
https://github.com/ehfd/docker-nvidia-glx-desktop
However... I also need a co-maintainer to manage for a couple of years...
The goal of this repo is to be a multi-purpose streaming utility, not exclusive to the use case of full desktop environments. The glx and vgl images would not have any DE installed.
Do you have the side effects of Xfce and GNOME in a container documented somewhere, or would you be willing to help document them? It would be nice to show examples with multiple DEs and document their side-effects and tradeoffs. Ubuntu Mate is pretty heavy compared to other desktop environments which increases the image size significantly so I don't want that to be the only option.
I had considered making the software/gpu encoder dynamic in a single image, it's still a possibility. However the trade-off I'm making is image size. For full NVIDIA GPU support, this requires the CUDA toolkit, which is a very large dependency (~1GB). For those that don't need GPU, they can save a ton of space and image pull time by opting into a different image.
Maybe another base image would be an uber image that supports all encoders and detects the best encoder at startup time.
Do you have the side effects of Xfce and GNOME in a container documented somewhere, or would you be willing to help document them? It would be nice to show examples with multiple DEs and document their side-effects and tradeoffs. Ubuntu Mate is pretty heavy compared to other desktop environments which increases the image size significantly, so I don't want that to be the only option.
Xfce is light if full desktop (xubuntu-desktop) is not installed. MATE is lighter in ubuntu-mate-desktop because the DE shares GTK+ libraries with utility packages whereas Xfce does not. For GNOME 3, lots of stuffs seem to be broken, where the largest issue is that it resizes the screen on its own to an incorrect resolution when there is no EDID. x11docker also does not support GNOME 3 confidently, which is another thing that showcases that GNOME inside a container is not trivial to implement with minimal configuration so far (I strongly advise against a GNOME base container in the current Xorg situation, maybe after Wayland is implemented).
I just left a link up there if anyone wants a full desktop environment, which requires assessing various utility packages for functionality.
So far:
images/ubuntu/base
: I polished it. But should add required packages including mesa's Vulkan and VA drivers for VAAPI in the future.
images/ubuntu/gpu
: This is basically the same thing as base except the base image should be cudagl.
images/ubuntu/vgl
: Install virtualgl, and use vglrun +wm
to invoke the desktop environment. Same otherwise to gpu.
images/ubuntu/glx
: Now, this gets complicated. Should start from gpu and modify my entrypoint.sh.
images/examples/minimal-desktop
: Xfce IS our minimal desktop right now. Combine with xfce-desktop.
images/examples/gnome-desktop
: This is buggy when a real monitor, and thus a real EDID, does not exist. Also, its reliance on systemd makes it extremely inadequate for containers.
LXDE, MATE, Xfce, LXQt, Lumina, Enlightenment, and some others are the only adequate DEs for containers.
GNOME and KDE will eventually be usable in Wayland, but I really don't recommend going for either now.
Closing this issue as docker-nvidia-glx-desktop and docker-nvidia-egl-desktop are now Selkies projects, and it's possible to integrate VirtualGL into the example container pretty easilly.
To make this project easier to build on top of, create some base images for various use cases. The
Dockerfile.example
has many of the dependencies codified, but more purpose based images would be ideal.Images Proposal
Base Images:
images/ubuntu/base
: image with most of the system dependencies needed to use the software encoder with xvfb. Includes gstreamer, gst-web, python app, and entrypoint script. Dockerfile should be parameterized for both Ubuntu 18.04 and 20.04.images/ubuntu/gpu
: starts frombase
image and adds cuda libraries to support GPU accelerated encoding with NVENC.images/ubuntu/glx
: starts fromgpu
image and adds support for hardware accelerated GLX with integrated X11 server.images/ubuntu/vgl
: starts fromgpu
image and add support for off-screen rendering with VGL using EGL DRI method.Example Images:
images/examples/minimal-desktop
: example image similar to the current Dockerfile.example, installs basic window manager and desktop experience. Parameterize Dockerfile with variants for the various base images.images/examples/gnome-desktop
: example image with gnome desktop and HiDPI support.images/examples/xfce-desktop
: example image with xfce desktop and HiDPI support.Entrypoint
It should be relatively simple for users to integrate the base image in their own projects.
The python app and all of it's dependencies (like pulseaudio) should run in the background.
Some options: