For general-purpose computing or graphics acceleration scenarios, you can automatically install or load the Tesla driver when you create a GPU instance. You can also manually install the driver after the instance is created. Installing a driver on a GPU instance improves its computing performance and graphics rendering capabilities. This topic describes how to automatically install or load the Tesla driver when you create a GPU instance.
Driver installation methods
Choose an automatic installation method for the Tesla driver based on your workload's performance requirements.
Installation method | Description | Related link |
Public image | When you create a GPU instance, you select a public image and the Auto-install GPU Driver option. | |
Installation script | Instead of selecting the Auto-install GPU Driver option, provide an installation script in the User Data section to install the NVIDIA Tesla driver when creating the instance. |
Install a driver with a public image
Specific Linux operating system Public Image support the Auto-install GPU Driver option. If you select a public image and also select the Auto-install GPU Driver option, the Tesla driver is automatically installed after the GPU instance is created.
Go to the instance buy page.
Click the Custom Launch tab.
Configure the billing method, region, network, zone, instance type, and image as required.
For more information about other configuration parameters, see Parameter description. The following table describes the instance types, images, and driver versions that support automatic driver installation when you create a GPU instance.
NoteThe NVIDIA Tesla driver runs the physical GPU. Used with CUDA and cuDNN libraries, it enables efficient GPU utilization. These libraries are installed alongside the driver. For new systems, using the latest versions of the Tesla driver, CUDA, and cuDNN is recommended.
Supported instance types
Public image versions
Tesla driver version
CUDA version
cuDNN version
gn7e, gn7s, gn7i, gn6v, gn6i, gn6e, gn5, and gn5i
ebmgn7e, ebmgn7i, ebmgn6v, ebmgn6i, and ebmgn6e
ebmgn7ix and ebmgn7ex
gn8is, ebmgn8is, gn8ia, ebmgn8ia, gn8v, and ebmgn8v
ebmgn9g and ebmgn9ge
Alibaba Cloud Linux 3
Ubuntu 24.04 and 22.04
Noteebmgn9g and ebmgn9ge do not support Ubuntu 22.04.
580.126.09
13.0.2
9.19.1.2
gn7e, gn7s, gn7i, gn6v, gn6i, gn6e, gn5, and gn5i
ebmgn7e, ebmgn7i, ebmgn6v, ebmgn6i, and ebmgn6e
ebmgn7ix and ebmgn7ex
gn8is, ebmgn8is, gn8ia, ebmgn8ia, gn8v, and ebmgn8v
Alibaba Cloud Linux 3
Ubuntu 24.04, 22.04, and 20.04
580.126.09
12.8.1
9.19.1.2
gn7e, gn7s, gn7i, gn6v, gn6i, gn6e, gn5, and gn5i
ebmgn7e, ebmgn7i, ebmgn6v, ebmgn6i, and ebmgn6e
gn8is, ebmgn8is, gn8v, ebmgn8v, and gn8ia
Alibaba Cloud Linux 3
Ubuntu 24.04, 22.04, and 20.04
Noteebmgn8v, ebmgn7e, do not support Ubuntu 20.04 images.
570.195.03
12.8.1
9.8.0.87
gn7e, gn7s, gn7i, gn6v, gn6i, gn6e, gn5, and gn5i
ebmgn7e, ebmgn7i, ebmgn6v, ebmgn6i, and ebmgn6e
gn8is, ebmgn8is, gn8v, ebmgn8v, and gn8ia
Alibaba Cloud Linux 3
Ubuntu 22.04, 20.04, and 18.04
Noteebmgn8v, ebmgn7e, do not support Ubuntu 18.04 images.
570.195.03
12.4.1
9.2.0.82
gn7e, gn7s, gn7i, gn6v, gn6i, gn6e, gn5, and gn5i
ebmgn7e, ebmgn7i, ebmgn6v, ebmgn6i, and ebmgn6e
gn8is, ebmgn8is, and gn8ia
Alibaba Cloud Linux 2 and Alibaba Cloud Linux 3
Ubuntu 20.04 and 18.04
CentOS 8.x and 7.x
Noteebmgn7e do not support Ubuntu 18.04 images.
535.216.03
12.1.1
8.9.7.29
gn7i, gn7e, gn7s, gn6v, gn6i, gn6e, gn5, and gn5i
ebmgn7, ebmgn7i, ebmgn7e, ebmgn6v, ebmgn6i, and ebmgn6e
Alibaba Cloud Linux 2 and Alibaba Cloud Linux 3
Ubuntu 20.04, 18.04, and 16.04
CentOS 8.x and 7.x
Debian 10.10
Noteebmgn7e do not support Ubuntu 18.04 or 20.04 images.
470.256.02
11.4.1
8.2.4
gn7, gn7i, gn7e, gn6v, gn6i, gn6e, gn5, and gn5i
ebmgn7, ebmgn7i, ebmgn7e, ebmgn6v, ebmgn6i, and ebmgn6e
Alibaba Cloud Linux 2
Ubuntu 20.04, 18.04, and 16.04
CentOS 8.x and 7.x
460.91.03
11.2.2
8.1.1
gn7, gn7e, gn6v, gn6i, gn6e, gn5, and gn5i
ebmgn7, ebmgn7e, ebmgn6v, ebmgn6i, and ebmgn6e
Alibaba Cloud Linux 2
Ubuntu 20.04, 18.04, and 16.04
CentOS 8.x and 7.x
460.91.03
11.0.2
8.1.1
8.0.4
gn6v, gn6i, gn6e, gn5, and gn5i
ebmgn6v, ebmgn6i, and ebmgn6e
Alibaba Cloud Linux 2
Ubuntu 18.04 and 16.04
CentOS 8.x and 7.x
460.91.03
10.2.89
8.1.1
8.0.4
7.6.5
gn6v, gn6i, gn6e, gn5, and gn5i
ebmgn6v, ebmgn6i, and ebmgn6e
Ubuntu 18.04 and 16.04
CentOS 7.x
450.80.02
440.64.00
10.1.168
8.0.4
7.6.5
7.5.0
gn6v, gn6i, gn6e, gn5, and gn5i
ebmgn6v, ebmgn6i, and ebmgn6e
Ubuntu 18.04 and 16.04
CentOS 7.x
450.80.02
440.64.00
10.0.130
7.6.5
7.5.0
7.4.2
7.3.1
ImportantWhen changing the operating system, use a public image that supports automatic Tesla driver installation. If you choose an unsupported image, you must first disable this feature. For more information, see How do I disable automatic installation of the Tesla driver when I change the operating system?.
If you install PyTorch 2.1.2 by running the
pip3 install torchcommand, you must install CUDA 12.1. Otherwise, you may receive an error when you use PyTorch. For more information, see The "undefined symbol: __nvJitLinkAddData_12_1, version libnvJitLink.so.12" error occurs when you use PyTorch.
For example, to configure a gn7i instance, in the Image section, click the Public Image tab. Select a Linux operating system and version, such as Alibaba Cloud Linux 3.2104 LTS 64-bit. Then, select Auto-install GPU Driver and select the CUDA, driver, and cuDNN versions. After the instance is created, the NVIDIA Tesla driver is automatically installed.
After the instance is created or started, the following information about the Tesla driver applies:
The automatic installation takes 10 to 20 minutes, depending on the instance's internal network bandwidth and number of vCPUs. You can connect to the instance to monitor the installation progress. After the installation is complete, you can view the installation log in the /root/auto_install/auto_install.log file.
Installation state
Display
Installing
A progress bar is displayed.
Installation successful
The message ALL INSTALL OK is displayed.
Installation failed
The message INSTALL FAIL is displayed.
ImportantDuring the installation, the GPU is unavailable. Do not perform any operations on the instance. If you install other GPU-related software, the automatic installation may fail and the instance may become unavailable.
Follow the on-screen instructions to complete the payment.
Install a driver with an installation script
When you create a GPU instance, if you do not select the Auto-install GPU Driver option in the Image section, you can enter an installation script in the User Data section to install the NVIDIA Tesla driver.
Script parameter settings
When you use an installation script, you must modify the following parameters based on your business requirements.
Modify the versions of the Tesla driver, CUDA, and cuDNN library based on the instance type and image of the instance that you created. For information about supported versions, see the instance types and image versions that the Tesla driver supports when you select a Public Image in Install a driver by using a public image.
The following example shows how to set the Tesla driver version to 550.127.08, the CUDA version to 12.4.1, and the cuDNN version to 9.2.0.82:
DRIVER_VERSION="550.127.08"
CUDA_VERSION="12.4.1"
CUDNN_VERSION="9.2.0.82"Procedure
Go to the instance buy page.
Click the Custom Launch tab.
Configure the billing method, region, network, zone, instance type, image, and User Data as required.
For more information about other configuration parameters, see Parameter description.
In the Advanced Options (Optional) section, paste the prepared script in the User Data text box.
You can prepare an installation script on your own. For more information about the parameters in the installation script, see Script parameter settings.
This script uses the
.runinstallation package to install the Tesla driver and other modules. The following code provides a sample script:#!/bin/sh # Specify the versions to install. DRIVER_VERSION="550.127.08" CUDA_VERSION="12.4.1" CUDNN_VERSION="9.2.0.82" IS_INSTALL_eRDMA="FALSE" IS_INSTALL_RDMA="FALSE" INSTALL_DIR="/root/auto_install" # Use the .run file to install the driver and CUDA. auto_install_script="auto_install_v4.0.sh" script_download_url=$(curl http://100.100.100.200/latest/meta-data/source-address | head -1)"/opsx/ecs/linux/binary/script/${auto_install_script}" echo $script_download_url rm -rf $INSTALL_DIR mkdir -p $INSTALL_DIR cd $INSTALL_DIR && wget -t 10 --timeout=10 $script_download_url && bash ${INSTALL_DIR}/${auto_install_script} $DRIVER_VERSION $CUDA_VERSION $CUDNN_VERSION $IS_INSTALL_RDMA $IS_INSTALL_eRDMAFollow the on-screen instructions to complete the payment.
NoteIf you call the RunInstances API operation to create a GPU instance, you can only use the User Data parameter to pass the installation script to install the NVIDIA Tesla driver. For more information, see RunInstances.
If you did not automatically install the driver during instance creation, you can install it manually later. Connect to the instance over SSH, paste the script content into a new file, and run the file as a shell script. For information about how to connect to an instance, see Connection methods.
Related documents
If you did not automatically install the Tesla driver when you created a GPU-accelerated compute-optimized instance, you must install it manually.