Rate This Document
Findability
Accuracy
Completeness
Readability

Installing NVIDIA CUDA

Procedure

  1. Use PuTTY to log in to the server as the root user.
  2. Check whether the Nouveau driver is disabled.
    lsmod |grep nouveau
    • If a command output is displayed, the Nouveau driver is not disabled. In this case, perform 3.
    • If no command output is displayed, the Nouveau driver is disabled. In this case, perform 4.
  3. Disable the Nouveau driver.
    1. Create a disable-nouveau.conf file.
      vi /etc/modprobe.d/disable-nouveau.conf
    2. Press i to enter the insert mode and add the following content:
      blacklist nouveau
      options nouveau modeset=0
    3. Press Esc, type wq!, and press Enter to save the file and exit.
  4. Install NVIDIA CUDA.
    wget https://developer.download.nvidia.com/compute/cuda/11.4.0/local_installers/cuda_11.4.0_470.42.01_linux_sbsa.run
    sudo shcuda_11.4.0_470.42.01_linux_sbsa.run
  5. Set the environment variables.
    export PATH=/usr/local/cuda-11.4/bin:$PATH
    export LD_LIBRARY_PATH=/usr/local/cuda-11.4/lib64:$LD_LIBRARY_PATH
  6. Perform the verification.
    nvcc --version

    If the command output contains the NVIDIA CUDA component version information, the installation is successful.