Installing NVIDIA drivers on Ubuntu 22.04
In this guide, we will walk you through the process of installing NVIDIA drivers for L4/L40S GPU Instances on a customized Ubuntu 22.04 image, adapted from the default OS image.
Installing NVIDIA drivers
-
Install the NVIDIA repository key. You can follow instructions from the NVIDIA website to install the latest version of the key.
-
Update the command line defined in
/etc/default/grub
by adding the parameterpci=realloc
. This parameter ensures proper GPU detection and allocation. -
Enable the
scw-set-numa-node
service. This service is installed from the Scaleway ecosystem package. -
Install the necessary NVIDIA drivers using the package manager (apt-get):
sudo apt-get install nvidia-docker2 nvidia-headless-<version> nvidia-utils-<version>
Replace
<version>
with the specific version number of the NVIDIA drivers compatible with your GPU model. -
After installation, confirm the drivers are working correctly by running:
sudo nvidia-smi
This command should display information about the installed NVIDIA GPU(s) and their status.
Troubleshooting
If you encounter errors or issues during the installation process, consider the following troubleshooting steps:
- Check system logs (
dmesg
,/var/log/syslog
) for any error messages related to NVIDIA drivers. - Ensure the correct driver version is compatible with your GPU model.
- Verify that the NVIDIA repository is correctly added to your package manager's sources list.
- Consult relevant documentation or forums for additional troubleshooting steps specific to your setup.
Additional links
- NVIDIA NGC Catalog
- Frameworks Support Matrix - NVIDIA Docs
- How to access the GPU using Docker
- NVIDIA Container Toolkit documentation