Azure Linux#
This section covers:
Azure Linux 3
Azure Linux 4
Azure Linux 3 uses the tdnf package manager. Azure Linux 4 uses DNF 5 (dnf).
Preparation#
Perform the Pre-installation Actions.
Install the kernel headers and development packages for the currently running kernel.
On Azure Linux 3:
# FLAVOR=$(rpm -qf --queryformat '%{NAME}' /boot/vmlinuz-$(uname -r)) # tdnf install \ ${FLAVOR}-devel-$(uname -r) \ kernel-headers-$(uname -r) \ ${FLAVOR}-drivers-gpu-$(uname -r)Note
Azure Linux 3 ships several kernel flavors. The release string from
uname -rshows no flavor marker. A system that runskernel-64korkernel-hweneeds the packages for that flavor. The basekernel-*packages are not correct for it. Only one package owns/boot/vmlinuz-<release>. Thusrpmfinds the flavor before the command selects the version.kernel-headerskeeps no flavor prefix. It is the userspace UAPI package and owns nothing under/lib/modulesor/usr/src.On Azure Linux 4:
# dnf install kernel-devel-matched kernel-headers
On Azure Linux 3, enable the extended repository:
# tdnf install azurelinux-repos-extended
Azure Linux 4 does not have an extended repository.
Choose an installation method: Local Repository Installation or Network Repository Installation.
Local Repository Installation#
Install the NVIDIA driver repository. On Azure Linux 3:
# tdnf install https://developer.download.nvidia.com/compute/nvidia-driver/<driver-version>/local_installers/nvidia-driver-local-repo-<distribution>-<driver-version>-1.0-1.<arch>.rpm
On Azure Linux 4:
# dnf install https://developer.download.nvidia.com/compute/nvidia-driver/<driver-version>/local_installers/nvidia-driver-local-repo-<distribution>-<driver-version>-1.0-1.<arch>.rpm
where <driver-version> is the NVIDIA driver version
Network Repository Installation#
Enable the network repository. On Azure Linux 3, for
x86_64:# curl -fsSL https://developer.download.nvidia.com/compute/cuda/repos/<distribution>/<arch>/cuda-<distribution>.repo -o /etc/yum.repos.d/cuda-<distribution>.repo
On Azure Linux 3, for
sbsa:# curl -fsSL https://developer.download.nvidia.com/compute/cuda/repos/<distribution>/sbsa/cuda-<distribution>.repo -o /etc/yum.repos.d/cuda-<distribution>.repo
On Azure Linux 4, the
config-managercommand is provided by thednf5-pluginspackage:# dnf install dnf5-plugins
Then, for
x86_64:# dnf config-manager addrepo --from-repofile=https://developer.download.nvidia.com/compute/cuda/repos/<distribution>/<arch>/cuda-<distribution>.repo
For
sbsa:# dnf config-manager addrepo --from-repofile=https://developer.download.nvidia.com/compute/cuda/repos/<distribution>/sbsa/cuda-<distribution>.repo
Clean the repository cache. On Azure Linux 3:
# tdnf clean expire-cache
On Azure Linux 4:
# dnf clean expire-cache
Driver Installation#
These instructions apply to both local and network installations.
Branch stickiness
tdnf on Azure Linux 3 does not support version locking. On Azure Linux 4, refer to the DNF 5 paragraph of the Version locking section.
Open Kernel Modules
On Azure Linux 3:
# tdnf install nvidia-open
On Azure Linux 4:
# dnf install nvidia-open
Reboot the System#
# reboot
Perform the Post-installation Actions.
Package Upgrades#
When a new version is available, a normal package update command specific for the distribution should suffice in upgrading the driver. The various differences in distributions would take care of obsolency and package switching when performing upgrades to a different branch.
After upgrading the driver, a reboot is required. On Azure Linux 4, DNF can report when it is needed, see Reboot Notification.
When upgrading the driver to the same stream on Azure Linux 3:
# tdnf update
On Azure Linux 4:
# dnf upgrade
When upgrading the driver to a different stream on Azure Linux 3:
# tdnf install --allowerasing nvidia-open
On Azure Linux 4:
# dnf install --allowerasing nvidia-open
This will remove any package which would have dependencies removed.