All Products
Search
Document Center

Elastic GPU Service:Automatically install or load Tesla drivers when creating a GPU-accelerated instance

Last Updated:Apr 01, 2026

To use the full computing and graphics rendering power of a GPU-accelerated instance, install an NVIDIA Tesla driver. During instance creation, you can automate this with either a public image option or a User Data script — no manual setup required.

Installation methods

MethodWhen to useDetails
Public imageCreating an instance through the console and want the simplest setupAuto-install with a public image
User Data scriptSkipping the Auto-install GPU Driver option, or need a custom driver versionInstall with a User Data script

Auto-install with a public image

Select a compatible public image and enable the Auto-install GPU Driver option. After the instance starts, the NVIDIA Tesla driver, CUDA, and cuDNN are installed automatically.

CUDA and cuDNN are installed together with the NVIDIA Tesla driver. For new instances, use the latest available driver, CUDA, and cuDNN versions.

Prerequisites

Before you begin, ensure that you have:

Compatibility

The following table lists supported instance types, public image versions, and corresponding driver versions.

ebmgn9g and ebmgn9ge do not support Ubuntu 22.04.
Instance typesSupported public imagesTesla driverCUDAcuDNN
gn7e, gn7s, gn7i, gn6v, gn6i, gn6e, gn5, gn5i, ebmgn7e, ebmgn7i, ebmgn6v, ebmgn6i, ebmgn6e, ebmgn7ix, ebmgn7ex, gn8is, ebmgn8is, gn8ia, ebmgn8ia, gn8v, ebmgn8v, ebmgn9g, ebmgn9geAlibaba Cloud Linux 3, Ubuntu 24.04, Ubuntu 22.04580.126.0913.0.29.19.1.2
gn7e, gn7s, gn7i, gn6v, gn6i, gn6e, gn5, gn5i, ebmgn7e, ebmgn7i, ebmgn6v, ebmgn6i, ebmgn6e, ebmgn7ix, ebmgn7ex, gn8is, ebmgn8is, gn8ia, ebmgn8ia, gn8v, ebmgn8vAlibaba Cloud Linux 3, Ubuntu 24.04, Ubuntu 22.04, Ubuntu 20.04580.126.0912.8.19.19.1.2
gn7e, gn7s, gn7i, gn6v, gn6i, gn6e, gn5, gn5i, ebmgn7e, ebmgn7i, ebmgn6v, ebmgn6i, ebmgn6e, gn8is, ebmgn8is, gn8v, ebmgn8v, gn8iaAlibaba Cloud Linux 3, Ubuntu 24.04, Ubuntu 22.04, Ubuntu 20.04 (Note: ebmgn8v and ebmgn7e do not support Ubuntu 20.04)570.195.0312.8.19.8.0.87
gn7e, gn7s, gn7i, gn6v, gn6i, gn6e, gn5, gn5i, ebmgn7e, ebmgn7i, ebmgn6v, ebmgn6i, ebmgn6e, gn8is, ebmgn8is, gn8v, ebmgn8v, gn8iaAlibaba Cloud Linux 3, Ubuntu 22.04, Ubuntu 20.04, Ubuntu 18.04 (Note: ebmgn8v and ebmgn7e do not support Ubuntu 18.04)570.195.0312.4.19.2.0.82
gn7e, gn7s, gn7i, gn6v, gn6i, gn6e, gn5, gn5i, ebmgn7e, ebmgn7i, ebmgn6v, ebmgn6i, ebmgn6e, gn8is, ebmgn8is, gn8iaAlibaba Cloud Linux 2, Alibaba Cloud Linux 3, Ubuntu 20.04, Ubuntu 18.04, CentOS 8.x, CentOS 7.x (Note: ebmgn7e does not support Ubuntu 18.04)535.216.0312.1.18.9.7.29
gn7i, gn7e, gn7s, gn6v, gn6i, gn6e, gn5, gn5i, ebmgn7, ebmgn7i, ebmgn7e, ebmgn6v, ebmgn6i, ebmgn6eAlibaba Cloud Linux 2, Alibaba Cloud Linux 3, Ubuntu 20.04, Ubuntu 18.04, Ubuntu 16.04, CentOS 8.x, CentOS 7.x, Debian 10.10 (Note: ebmgn7e does not support Ubuntu 18.04 or Ubuntu 20.04)470.256.0211.4.18.2.4
gn7, gn7i, gn7e, gn6v, gn6i, gn6e, gn5, gn5i, ebmgn7, ebmgn7i, ebmgn7e, ebmgn6v, ebmgn6i, ebmgn6eAlibaba Cloud Linux 2, Ubuntu 20.04, Ubuntu 18.04, Ubuntu 16.04, CentOS 8.x, CentOS 7.x460.91.0311.2.28.1.1
gn7, gn7e, gn6v, gn6i, gn6e, gn5, gn5i, ebmgn7, ebmgn7e, ebmgn6v, ebmgn6i, ebmgn6eAlibaba Cloud Linux 2, Ubuntu 20.04, Ubuntu 18.04, Ubuntu 16.04, CentOS 8.x, CentOS 7.x460.91.0311.0.28.1.1, 8.0.4
gn6v, gn6i, gn6e, gn5, gn5i, ebmgn6v, ebmgn6i, ebmgn6eAlibaba Cloud Linux 2, Ubuntu 18.04, Ubuntu 16.04, CentOS 8.x, CentOS 7.x460.91.0310.2.898.1.1, 8.0.4, 7.6.5
gn6v, gn6i, gn6e, gn5, gn5i, ebmgn6v, ebmgn6i, ebmgn6eUbuntu 18.04, Ubuntu 16.04, CentOS 7.x450.80.02, 440.64.0010.1.1688.0.4, 7.6.5, 7.5.0
gn6v, gn6i, gn6e, gn5, gn5i, ebmgn6v, ebmgn6i, ebmgn6eUbuntu 18.04, Ubuntu 16.04, CentOS 7.x450.80.02, 440.64.0010.0.1307.6.5, 7.5.0, 7.4.2, 7.3.1

Steps

  1. Go to the Instance buy page.

  2. Select the Custom Launch tab.

  3. Configure Billing Method, Region, Network and Zone, Instance Type, and Image. For details on all settings, see Configuration items.

    After the instance is created or started, the following applies to the Tesla driver:

    The automatic installation takes approximately 10 to 20 minutes. The actual time varies 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 log file at /root/auto_install/auto_install.log. The following table describes the statuses displayed during installation.

    Installation state

    Displayed information

    Installing

    A progress bar is displayed.

    Installation successful

    The message ALL INSTALL OK is displayed.

    Installation failed

    The message INSTALL FAIL is displayed.

    Important

    The GPU is unavailable during the installation process. Do not perform any operations on the instance. If other GPU-related software is installed at the same time, the automatic installation may fail and make the instance unavailable.

  4. In the Image section, on the Public Image tab, select a Linux operating system and version (for example, Alibaba Cloud Linux 3.2104 LTS 64-bit). Select the Auto-install GPU Driver checkbox, then choose the driver, CUDA, and cuDNN versions.

    Dingtalk_20240906134235.jpg

  5. Follow the prompts to complete the purchase.

Important

Monitor installation progress

Installation takes 10 to 20 minutes. The actual time varies depending on the instance's internal network bandwidth and vCPU count.

Important

The GPU is unavailable during installation. Do not perform any operations on the instance. If other GPU-related software is installed concurrently, the automatic installation may fail and make the instance unavailable.

Connect to the instance to check progress. The log file is at /root/auto_install/auto_install.log.

StatusDisplayed information
InstallingA progress bar
SuccessfulALL INSTALL OK
FailedINSTALL FAIL

Install with a User Data script

When creating an instance without the Auto-install GPU Driver option, provide an installation script in the User Data field. The script runs automatically when the instance first starts.

Script parameters

The script installs the Tesla driver, CUDA, and cuDNN using .run packages. Set the three version variables to match your instance type and image. Refer to the compatibility table for supported version combinations.

The following example sets the Tesla driver to 550.127.08, CUDA to 12.4.1, and cuDNN to 9.2.0.82:

DRIVER_VERSION="550.127.08"
CUDA_VERSION="12.4.1"
CUDNN_VERSION="9.2.0.82"

Steps

  1. Go to the Instance buy page.

  2. Select the Custom Launch tab.

  3. Configure Billing Method, Region, Network and Zone, Instance Type, and Image. For details on all settings, see Configuration items.

  4. In the Advanced Settings (Optional) section, enter your installation script in the User Data field. The following is a sample script. Replace the version variables with values appropriate for your instance type and image.

    #!/bin/sh
    
    # Set 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"
    
    # Download and run the installation script
    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_eRDMA

    Dingtalk_20240906131054.jpg

  5. Follow the prompts to complete the purchase.

To create a GPU-accelerated instance using the RunInstances API operation, pass the installation script in the UserData parameter. For details, see RunInstances.
If you did not install the driver during instance creation, run the script manually afterward: connect to the instance via SSH, create a file, paste the script content, and run it as a shell script. For connection methods, see Connection methods.

Modify the corresponding Tesla driver, CUDA, and cuDNN library versions based on the instance type and image that you created. For detailed information about supported versions, see the image versions and instance types supported by the Tesla driver when you select Public Image in Automatically install drivers 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"

Next steps

If you did not install the NVIDIA Tesla driver during instance creation, install it manually: