在Linux上安装NVIDIA驱动程序和CUDA

本文最后更新于:4 个月前

  1. Visit the DOWNLOAD DRIVERS page on the NVIDIA official website.

  2. 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:

    20221107194851

    The following table describes the search conditions.

    Search condition Description Example
    Product Type
    Product Series
    Product
    Select 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, select Linux 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
  3. In the search result, find the driver version that you want to download and click the driver name.

    20221107195729
  4. 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.

    20221107195855 20221107200124
  5. 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
  6. Install the GPU driver. Run the following command to install the driver and reboot:

    • Ubuntu 18.04 specific command:

      1
      2
      3
      4
      dpkg -i nvidia-driver-local-repo-ubuntu1804-515.65. 01_1.0-1_amd64.deb
      apt-get update
      apt-get install cuda-drivers
      reboot
    • Other Linux operating systems: see reference [1].

  7. 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.

    20221107200839

在Linux上安装NVIDIA驱动程序和CUDA
https://www.cjh.zone/posts/install-nvidia-driver-and-cuda-on-linux/
发布于
2022年11月4日
更新于
2023年1月26日
许可协议