Skip to content

2026

CUDA computations on a musl Gentoo Linux host, is it possible?

I always thought that Nvidia was a lost cause on Linux, especially on a musl Gentoo Linux system. Yet I found that in the particular use case of CUDA computation not all is hopeless. As of writing this we still require glibc for user space Nvidia drivers, but these can be nicely tucked away in a glibc chroot. This glibc requirement apparently leads people to believe that the Nvidia kernel modules also require glibc (see for example the x11-drivers/nvidia-drivers gentoo ebuild), but this is plainly incorrect. The Nvidia kernel modules are independent of a C library and can thus also be build on musl systems.

A slightly improved Gentoo-Linux/openrc install

A collection of small improvements over the last year brings this slightly improved guide on how to install a hardened x86_64 Gentoo Linux musl/openrc/UEFI signed UKI operating system on an encrypted ZFS pool with automatic decryption using TPM. This time we will configure the kernel manually instead of blindly using the distribution kernel supplied by the sys-kernel/gentoo-kernel package. This way we will be able to streamline our operating system even more to our specific needs, and the needs of our hardware.