4 ms·
All container systems are self-contained; they can have glibc (or musl, or any other libc) they want. In flatpak, the glibc is part of the runtimes; i.e. org.(
by vetinari 4y ago
All container systems are self-contained; they can have glibc (or musl, or any other libc) they want.
In flatpak, the glibc is part of the runtimes; i.e. org.(freedesktop|gnome|kde).Platform. This allows you to run apps on old CentOS/RHEL that you could not natively. Or you can have runtime-less package or use your own runtime, where you put libraries you want. Similarly with snap, you have core18 or core20 runtimes (that correspodents to ubuntu 18.04 or ubuntu 20.04).
Drivers are more interesting. GPU driver has two parts - kernel mode, that shuffles prepared command buffers between userspace and hardware, does mode switching, etc. -- and user mode, which is shared library that implements user APIs like OpenGL or Vulkan, and based on commands from these APIs builds commands buffers, that are then sent to kernel part. The user-mode part may or may not be compatible with multiple versions of the kernel part; the AMD and Intel drivers usually are, as the kernel driver is part of the kernel tree and the user mode driver has to work with any kernel it is run under. Nvidia on the other hand assumes that both user mode and kernel mode are in sync, so packaging specific user mode driver version into container might be problematic.
Flatpak usually ships latest (n or n-1) Mesa and keeps Nvidia driver in sync with the installed kernel mode driver. They are shipped as addons to runtimes.