在Linux上安装NVIDIA驱动程序和CUDA
本文最后更新于:4 个月前
Visit the DOWNLOAD DRIVERS page on the NVIDIA official website.
Set the search conditions and click SEARCH to search for the driver that you want to install. Take an example of installing the driver for NVIDIA Tesla T4 GPU on Ubuntu 18.04 as follows:
The following table describes the search conditions.
Search condition Description Example Product Type
Product Series
ProductSelect the type of the GPU. NVIDIA Tesla T4 Operating System Select a Linux version based on the image of the instance.
If you cannot find the Linux version that matches the image of the instance, selectLinux 64-bit
.Ubuntu 18.04 CUDA Toolkit Select a CUDA Toolkit version. 11.7 Language Select a language for the driver that you want to install. English Recommended/Beta By default, All is selected. You can use the default setting. All In the search result, find the driver version that you want to download and click the driver name.
On the driver details page, click DOWNLOAD. On the Download page, right-click AGREE & DOWNLOAD and select Copy link address to copy the download address.
Paste the download address that you copied in Step 4 to the wget command and run the command to download the installation package. Sample command:
1
wget https://us.download.nvidia.com/tesla/515.65.01/nvidia-driver-local-repo-ubuntu1804-515.65.01_1.0-1_amd64.deb
Install the GPU driver. Run the following command to install the driver and reboot:
Ubuntu 18.04 specific command:
1
2
3
4dpkg -i nvidia-driver-local-repo-ubuntu1804-515.65. 01_1.0-1_amd64.deb
apt-get update
apt-get install cuda-drivers
rebootOther Linux operating systems: see reference [1].
Verify the installation. Run the following command to verify the installation:
1
nvidia-smi
If the command output is similar to the information displayed in the following figure, the GPU driver is installed.