All Products
Search
Document Center

Elastic GPU Service:Install a GRID driver on a vGPU-accelerated Linux instance

Last Updated:Jun 28, 2024

GPU-accelerated instances installed with NVIDIA GRID drivers can deliver high-performance computing capabilities or provide smoother graphics display effects in general computing scenarios such as AI scenarios, and in graphics acceleration scenarios such as Open Graphics Library (OpenGL), Direct3D, and cloud gaming scenarios. This topic describes how to install a GRID driver on a vGPU-accelerated Linux instance by using Cloud Assistant.

Note

Before you use Cloud Assistant to install a GRID driver, we recommend that you familiarize yourself with Cloud Assistant. For more information, see Overview. By default, Cloud Assistant plug-ins are installed when you create GPU-accelerated instances.

Supported instances

You can use Cloud Assistant to install GRID drivers only on vGPU-accelerated Linux instances that belong to the vgn6i-vws, vgn7i-vws, and sgn7i-vws instance families. For more information, see vGPU-accelerated instance families. The following table lists the GRID driver versions and CUDA versions that can be installed on instances of the instance families.

Public image version

NVIDIA GRID driver version

CUDA version

  • Alibaba Cloud Linux 2 and Alibaba Cloud Linux 3

  • Ubuntu 22.04, Ubuntu 20.04, and Ubuntu 18.04

  • CentOS 8.x and CentOS 7.x

470.239.06

11.4

Important

GPU-accelerated compute-optimized Linux instances support graphics acceleration by using official NVIDIA drivers. You do not need to install GRID drivers on these instances, such as gn7i, gn6i, ebmgn7i, and ebmgn6i instances. For more information, see GPU-accelerated compute-optimized instance families.

Procedure

  1. Log on to the ECS console.

  2. In the left-side navigation pane, choose Maintenance & Monitoring > Cloud Assistant.

  3. In the top navigation bar, select the region where the desired instance resides.

    地域.png

  4. On the ECS Instances tab, find the instance and click Run Command in the Actions column.

    linux.png

  5. In the Create Command panel, configure parameters in the Command Information section.

    The following section describes key parameters. Use default values for other parameters. For more information, see Create a command in the ECS console.

    Important

    Configure the parameters based on the values that are provided in the following section. Otherwise, Cloud Assistant may fail to run the command.

    linux命令.png

    • Command Type: Select Shell.

    • Command content: Paste the following command content. For more information about sample shell commands, see View the system configurations of ECS instances.

      if acs-plugin-manager --list --local | grep grid_driver_install > /dev/null 2>&1
      then
          acs-plugin-manager --remove --plugin grid_driver_install
      fi
      
      acs-plugin-manager --exec --plugin grid_driver_install
    • Timeout: Specify the timeout period for running the command. When the command execution times out, Cloud Assistant forcefully terminates the execution process. In this example, the value is set to 600.

      Note

      The value of the Timeout parameter must be a positive integer in the range of 10 to 86,400. Unit: seconds. 86,400 seconds are equal to 24 hours.

  6. Click Run to run the Cloud Assistant command to install the GRID driver.

    After you run the Cloud Assistant command, you can view the execution result on the Instances tab in the execution details panel.

    Important
    • If another GRID driver version is already installed on the instance, Cloud Assistant automatically uninstalls the GRID driver version and installs the latest GRID driver version.

    • It takes approximately 5 to 10 minutes to install a GRID driver. Wait until the driver is installed.

    linux安装成功.png

  7. Connect to the GPU-accelerated instance.

    For more information, see Connect to a Linux instance by using a password or key.

  8. Run the following command to check whether the GRID driver is installed:

    nvidia-smi

    If the following command output is displayed, the GRID driver is upgraded or installed.

    SMI.jpg

Test and verify the graphics acceleration effect

This section provides an example on how to use an OpenGL Extension to the X Window System (GLX) test program to verify the graphics acceleration effect of an instance on which a GRID driver is installed. In this example, an instance that runs Ubuntu 18.04 64-bit is used.

  1. Prepare an environment that is used to test the acceleration effect on graphics.

    1. Run the following command to install x11vnc:

      apt-get install x11vnc
    2. Run the lspci | grep NVIDIA command to query the BusID value of the GPU that is used by the instance.

      In this example, the queried BusID value is PCI:0:7:0.

    3. Configure the X Server environment and restart the system.

      1. Run the nvidia-xconfig --enable-all-gpus --separate-x-screens command.

      2. Edit the /etc/X11/xorg.conf file. In Section "Device", add the BusID setting. In this example, the BusID "PCI:0:7:0" setting is added.重启.png

      3. Run the reboot command to restart the system.

  2. Run the following command to install the GLX program:

    apt-get install mesa-utils                    
  3. Run the startx command to start X Server.

    • If the startx command does not take effect, run the apt-get install xinit command to install xinit.

    • When you run the startx command, the hostname: Name or service not known error message may be prompted. The error message does not affect the startup of X Server. You can run the hostname command to query the hostname of your instance. Then, you can modify the /etc/hosts file by replacing the hostname value that follows 127.0.0.1 with the hostname of your instance.启动.png

  4. Start an SSH terminal session on a client and run the following command to start x11vnc:

    x11vnc -display :1

    If the following command output is displayed, x11vnc is started. In this case, you can connect to the instance by using a Virtual Network Computing (VNC) remote access application, such as VNC Viewer.连接.png

  5. Log on to the ECS console and configure a security group rule that allows inbound traffic on TCP port 5900 for the instance.

    For more information, see Add a security group rule.

  6. On your computer, use a VNC application such as VNC Viewer, and enter <Public IP address of the instance>:5900 to connect to the instance and go to a K Desktop Environment (KDE) desktop.

  7. Run the glxinfo command to view the configurations that are supported by the GRID driver.

    1. Start a new terminal session on the SSH client.

    2. Run the export DISPLAY=:1 command.

    3. Run the glxinfo -t command to query the configurations that are supported by the GRID driver.

  8. Run the glxgears command to test the GRID driver.

    1. On the KDE desktop, right-click the desktop and select Run Command.

    2. Run the glxgears command to start the GLX program.

      If the following window appears, the GRID driver works as expected.驱动正常.png

References