1. Execute the following command to check whether dkms is installed in the current system.
If the returned result is as follows, the dkms has been installed.
If the dkms is not installed, execute the following command to install it.
3. Select the corresponding series based on the instance operating system and instance type. For details on instance specifications, see Instance Types. This document uses the V100 as an example, as shown in the figure below: Note:
Selecting Linux 64-bit indicates that you are downloading the shell installation file.
4. Click Find to look up the driver, and select the desired driver version to download.
5. Select the specific version and click View to enter the download page.
Then copy the link address of the Download button, as shown in the figure below: 7. Use the wget command and paste the link address copied in Step 5 to download the installation package. Replace xxxx in the command with the link address you copied. 8. Execute the following command to modify the installation package permissions. Replace xxxx in the command with the actual version number of your driver.
chmod +x NVIDIA-Linux-x86_64-xxxx.run
9. Since the installation of the NVIDIA driver requires kernel-devel and kernel-headers, run the following commands in sequence to check whether these packages are installed on the current system. Ensure that their versions match the current kernel version.
If the returned result is as shown below, it indicates that both kernel-devel and kernel-headers have been installed.
If the output does not include kernel-devel-* and kernel-headers-* matching the current kernel version, you will need to manually install the corresponding kernel-devel and kernel-headers packages for that kernel version.
sudo yum install -y kernel-headers-$(uname -r).tl2.x86_64 kernel-devel-$(uname -r).tl2.x86_64
10. Upgrade the GCC version. The default GCC version in TencentOS 2.4 is 4.8.5, but GCC 8 is required to compile the NVIDIA kernel module.
Run the following command to check the GCC version:
As shown in the figure below, the GCC version is 4.8.5.
See the steps below to install GCC 8 using SCL (Software Collection). SCL allows you to build and install multiple versions of the same component on your system without affecting the system version of packages installed from the distribution.
sudo yum -y install tlinux-release-scl
sudo yum -y install devtoolset-8-gcc
sudo scl enable devtoolset-8 bash
sudo gcc --version
11. Run the following command to install the driver, and proceed according to the prompts. Replace xxxx in the command with your actual driver version number.
sudo sh NVIDIA-Linux-x86_64-xxxx.run --ui=none --disable-nouveau --no-install-libglvnd --dkms --no-cc-version-check -s
12. After the installation is completed, run the following command to verify the installation. If GPU information is returned, the driver has been successfully installed.
13. Regenerate the initramfs.
1. Execute the following command to check whether dkms is installed in the current system.
If the returned result is as follows, the dkms has been installed.
If the dkms is not installed, execute the following command to install it.
3. Select the corresponding series based on the instance operating system and instance type. For details on instance specifications, see Instance Types. This document uses the V100 as an example, as shown in the figure below: Note:
Selecting Linux 64-bit indicates that you are downloading the shell installation file.
4. Click Find to look up the driver, and select the desired driver version to download.
5. Select the specific version and click View to enter the download page.
Then copy the link address of the Download button, as shown in the figure below: 7. Use the wget command and paste the link address copied in Step 5 to download the installation package. Replace xxxx in the command with the link address you copied. 8. Execute the following command to modify the installation package permissions. Replace xxxx in the command with the actual version number of your driver.
chmod +x NVIDIA-Linux-x86_64-xxxx.run
9. Since the installation of the NVIDIA driver requires kernel-devel and kernel-headers, run the following commands in sequence to check whether these packages are installed on the current system. Ensure that their versions match the current kernel version.
If the returned result is as shown below, it indicates that both kernel-devel and kernel-headers have been installed.
If the output does not include kernel-devel-* and kernel-headers-* matching the current kernel version, you will need to manually install the corresponding kernel-devel and kernel-headers packages for that kernel version.
sudo yum install -y kernel-headers-$(uname -r).tl3.x86_64 kernel-devel-$(uname -r).tl3.x86_64
10. Run the following command to install the driver, and proceed according to the prompts. Replace xxxx in the command with your actual driver version number.
sudo sh NVIDIA-Linux-x86_64-xxxx.run --ui=none --disable-nouveau --no-install-libglvnd --dkms --no-cc-version-check -s
11. After the installation is completed, run the following command to verify the installation. If GPU information is returned, the driver has been successfully installed.
12. Regenerate the initramfs.
13. Enable persistent mode.
1. Execute the following command to check whether dkms is installed in the current system.
If the returned result is as follows, the dkms has been installed.
If the returned result is empty, it indicates that DKMS is not installed. Run the following command to install it.
sudo apt-get install dkms -y
3. Select the corresponding series based on the instance operating system and instance type. For details on instance specifications, see Instance Types. This document uses the V100 as an example, as shown in the figure below: Note:
Selecting Linux 64-bit indicates that you are downloading the shell installation file.
4. Click Find to look up the driver, and select the desired driver version to download.
5. Select the specific version and click View to enter the download page.
Then copy the link address of the Download button, as shown in the figure below: 7. Use the wget command and paste the link address copied in Step 5 to download the installation package. Replace xxxx in the command with the link address you copied. 8. Execute the following command to modify the installation package permissions. Replace xxxx in the command with the actual version number of your driver.
chmod +x NVIDIA-Linux-x86_64-xxxx.run
9. Since the installation of the NVIDIA driver depends on gcc and linux-kernel-headers, run the following commands in sequence to check whether gcc and kernel-devel are installed on the current system.
dpkg -l | grep -i linux-headers
If the returned result is as follows, gcc and kernel-devel have been installed.
If the command returns no result, it indicates that the packages are not installed. Execute the following command to install it.
sudo apt-get install gcc linux-headers-$(uname -r) -y
10. Install libgl1-mesa-glx.
sudo apt install libgl1-mesa-glx -y
11. Run the following command to install the driver, and proceed according to the prompts. Replace xxxx in the command with your actual driver version number.
sudo sh NVIDIA-Linux-x86_64-xxxx.run --ui=none --disable-nouveau --no-install-libglvnd --dkms --no-cc-version-check -s
12. After the installation is completed, run the following command to verify the installation. If GPU information is returned, the driver has been successfully installed.
13. Update the initramfs.
14. Enable persistent mode.