-
Are there any reference materials available for building NVIDIA drivers as a Talos system extension? I'm following the conclusion from this thread and building the NVIDIA system extension with vGPU support from scratch, but I'm running into some issues getting the installer to work with the tools described in the Talos kernel module documentation. NVIDIA provides an installer program,
The installer is working fine in a RHEL Docker image, but this isn't representative of the capabilities of the Alpine-based build environment. So far I've attempted to sidestep the limitations of the build environment by building a couple separate images and loading the installer's dependencies, but this seems to be a dead end (not to mention a terrible long-term solution anyway). The installer manages to launch, but fails to build or install anything:
Given that What is the recommended approach for compiling drivers for Talos, such that these can be added to the image as an extension, when the driver installer depends on Package DefinitionContents of name: nvidia-vgpu-pkg
variant: alpine # base container for environment (e.g. alpine, scratch)
shell: /bin/sh # shell to use to execute commands in steps
dependencies: # other steps required before building package
- stage: base
- image: ghcr.io/siderolabs/glibc:2.41 # borrowing glibc from the system extension
to: /glibc
- image: private-registry.com/image-with-libraries
to: /vgpu-libs
steps: # steps needed to build package container
- prepare:
- ln -s /vgpu-libs/lib64/ld-linux-x86-64.so.2 /lib64/ld-linux-x86-64.so.2 # set up compatibility library
- ldd /pkg/patches/nvidia/nvidia-installer >&2 # verify that external symbols are defined
- PATH=$PATH:/glibc/rootfs/usr/sbin:/glibc/rootfs/usr/bin:/glibc/rootfs/bin:/vgpu-libs/sbin /pkg/patches/nvidia/nvidia-installer
--ui=none
--kernel-source-path=/vgpu-libs/src/linux-headers-6.12.45-0-lts
--no-rebuild-initramfs
--no-systemd
--no-install-compat32-libs || cat /var/log/nvidia-installer.log >&2
env:
LD_PRELOAD: /vgpu-libs/libfts.so:/vgpu-libs/additional-symbols.so
LD_LIBRARY_PATH: /glibc/lib:/glibc/lib64
- test: # validate software
- nvidia-smi || true
finalize: # copy directory structure from source to destination
- from: /pkg/manifest.yaml
to: / Footnotes
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You can refer to https://github.com/siderolabs/pkgs/blob/main/nonfree/kmod-nvidia/production/pkg.yaml oh how we build the modules, building modules doesn't need glibc at all And the other part of nvidia stuff here https://github.com/siderolabs/extensions/blob/main/nvidia-gpu/nvidia-container-toolkit/nvidia-container-cli/production/pkg.yaml which uses glibc |
Beta Was this translation helpful? Give feedback.
You can refer to https://github.com/siderolabs/pkgs/blob/main/nonfree/kmod-nvidia/production/pkg.yaml oh how we build the modules, building modules doesn't need glibc at all
And the other part of nvidia stuff here https://github.com/siderolabs/extensions/blob/main/nvidia-gpu/nvidia-container-toolkit/nvidia-container-cli/production/pkg.yaml which uses glibc