NAME
Rex::GPU::NVIDIA::Setup::Ubuntu - NVIDIA driver setup for Ubuntu (experimental)
VERSION
version 0.002
DESCRIPTION
Experimental, like Rex::GPU::NVIDIA::Setup. The NVIDIA driver install for Ubuntu: the -server driver packages from Ubuntu's own archive on the apt layer Rex::GPU::NVIDIA::Setup::Apt. On an HGX B200/B300 also Ubuntu's nvidia-fabricmanager-NNN, and nvlsm from NVIDIA's CUDA repository, pinned so that nothing else comes from it ("prepare_nvlink_fabric_source").
kernel_packages
The apt layer's running-kernel headers, plus linux-headers-generic.
sources
Ubuntu's own -server driver packages, in this order; each installs one package, which is also the one verified:
ubuntu-server-- the newestnvidia-driver-NNN-server(proprietary kernel module) thatapt-cache searchfinds (-openfiltered out).ubuntu-server-open-- the newestnvidia-driver-NNN-server-open(open kernel module).ubuntu-server-580--nvidia-driver-580-server, proprietary, branch 580 exactly. Its installation candidate is checked afterapt-get update("resolve_source"); no other branch is substituted.
"plan" in Rex::GPU::NVIDIA::Setup chooses among them without a package index: the first two count as "newest branch, at least 580" -- 580 is in the archive of every supported release -- so they fit a GPU that needs 570 or 580 or newer but never one that stops at 580. Which package that is, and its exact branch, is looked up only after apt-get update ("resolve_source") and checked again; nothing found, or a branch the GPU cannot use, dies before any driver package is installed. There is no hard-coded fallback package, and no other source is tried then.
So a GPU without constraints (Turing to Hopper, no GPU) gets ubuntu-server, Blackwell ubuntu-server-open, Maxwell/Pascal/Volta ubuntu-server-580.
Each names nvidia-fabricmanager-NNN as its Fabric Manager (for a host with NVSwitches, see "nvswitches" in Rex::GPU::NVIDIA::Setup): NNN is the branch found after apt-get update, and it is installed at the upstream version of the installed nvidia-driver-NNN-server(-open).
Never nvidia-smi: on 24.04 it is a virtual package with no installation candidate, and the driver metapackage pulls it in anyway.
nvlink_fabric_packages
The apt layer's (nvlsm, infiniband-diags, libibumad3) plus linux-modules-extra-$kernel of the running kernel, which holds the ib_umad module on Ubuntu -- the running kernel's package only, never a metapackage that pulls a new kernel.
nvlink_fabric_unavailable
A reason unless the release is 22.04 or 24.04 on amd64: NVIDIA's CUDA repositories ubuntu2204/ubuntu2404 for x86_64 are where nvlsm was verified; Ubuntu's archive has none.
prepare_nvlink_fabric_source
Ubuntu's archive has no nvlsm, so on an HGX B200/B300 -- and only there -- NVIDIA's CUDA repository is added, after the driver and Fabric Manager are installed and verified, so it cannot influence which driver package "resolve_source" finds:
the repository's signing key is taken from NVIDIA's
cuda-keyring_1.1-1_all.deb(downloaded withcurl -f, unpacked withdpkg-deb) into/usr/share/keyrings/cuda-archive-keyring.gpg; the package itself is not installed, because it also installs/etc/apt/preferences.d/cuda-repository-pin-600, which raises every package of that repository to priority 600 -- above Ubuntu's own driver;"nvlsm_pin_file" pins every package of
developer.download.nvidia.comto priority -1 (never installed) exceptnvlsm(500) -- the driver, Fabric Manager and every library stay Ubuntu's, now and on later upgrades; it is written before the source;"nvlsm_source_file" gets the repository line, then
apt-get update.
A host that has cuda-keyring installed already has the repository (with NVIDIA's own pin): nothing is added there, only apt-get update. Dies, before anything is added, when the key cannot be fetched; the driver and Fabric Manager stay installed.
nvlsm_pin_file
/etc/apt/preferences.d/rex-gpu-nvlsm.pref.
nvlsm_source_file
/etc/apt/sources.list.d/rex-gpu-nvlsm.list.
resolve_source
Runs after the apt layer's apt-get update ("resolve_plan" in Rex::GPU::NVIDIA::Setup), read-only:
a source with a
searchpattern:apt-cache searchfor the newest matching package; returns the source with that one package (installed and verified) and the exact branch from its name. Nothing found, or a name without a branch, makes itunavailable-- there is no fallback package: if the refreshed index does not list one,apt-get installcould not install it either.a source with
check_candidate:apt-cache policymust show an installation candidate for that package, else the source isunavailable. No other package is substituted.
Any other source is returned unchanged. A subclass that picks the package another way overrides this method; the requirement check after it stays.
SEE ALSO
Rex::GPU::NVIDIA::Setup, "install_driver" in Rex::GPU::NVIDIA
SUPPORT
Issues
Please report bugs and feature requests on GitHub at https://github.com/Getty/rex-gpu/issues.
CONTRIBUTING
Contributions are welcome! Please fork the repository and submit a pull request.
AUTHOR
Torsten Raudssus <getty@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2026 by Torsten Raudssus <torsten@raudssus.de> https://raudssus.de/.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.