All Products
Search
Document Center

:Install a GRID driver on a vGPU-accelerated Linux instance

更新時間:Sep 20, 2023

Certain community images are provided with the GRID driver installed. When you create a vGPU-accelerated instance that runs Linux, you can use a free community image that has the GRID driver installed by specifying the ID of the community image. This topic describes how to install a GRID driver on a vGPU-accelerated Linux instance and verify the installation of the driver.

Scenarios

This topic applies to the scenarios that meet the following requirements.

  • To use vGPU-accelerated instances in general computing scenarios, such as for deep learning and AI tasks, we recommend that you install GRID drivers.

  • This topic is applicable to installing a GRID driver on vGPU-accelerated Linux instances. For more information about vGPU-accelerated instance types, see vGPU-accelerated instance families.

Note

For more information about scenarios and installation methods of GRID drivers, see Installation guideline for NVIDIA drivers.

Install a GRID driver

This topic uses a sgn7i-vws vGPU-accelerated instance that runs the Ubuntu operating system as an example.

  1. Log on to the ECS console.
  2. In the left-side navigation pane, choose Instances & Images > Instances.
  3. On the Instances page, click Create Instance.

  4. On the Custom Launch tab, configure the Basic Configurations, Networking, System Configurations (Optional), and Grouping (Optional).

    • Basic Configurations: Select the billing method, region and zone, instance type, and image for the instance based on your business requirements. The following section describes the instance types and images.

      • Instance type

        The following figure provides an example of selecting an ecs.sgn7i-vws-m2s.xlarge instance in the Germany (Frankfurt) region.

        国际站-购买实例.png
      • Image

        1. Obtain the ID of the community image.

          Alibaba Cloud provides community images that are pre-installed with GRID drivers. The available images vary based on regions. The following table describes the available images.

          Note

          If your instance resides in a region that is not included in the following table, submit a ticket to obtain the IDs of community images that are pre-installed with GRID drivers in the region where your instance resides. The GRID driver version must match the instance type and region of your GPU-accelerated instance. Therefore, you must provide the instance information, such as the instance type, operating system, and the region where the instance resides when you submit the ticket.

          Region

          Driver version

          Community image name

          Community image ID

          Japan (Tokyo)

          GRID 13.5

          AliLinux2.1903_SWL

          m-6we7hvjs7vemf2xvty3j

          AliLinux3.2104_SWL

          m-6weh121p8sreq859zax9

          CentOS7.9_SWL

          m-6we0wqwvjv70mkn8z8pm

          Ubuntu_18.04_SWL

          m-6we76maddq2qygmuv76s

          Ubuntu_20.04_SWL

          m-6webzle7xko46u27vpju

          Ubuntu_22.04_SWL

          m-6we7hvjs7vemf0yupw4e

          Singapore

          GRID 13.5

          AliLinux2.1903_SWL

          m-t4nd0i3ti9337eqgcfse

          AliLinux3.2104_SWL

          m-t4n7rgku461dtoaq2wtw

          CentOS7.9_SWL

          m-t4n6rm3s7h1ayx9cn00n

          Ubuntu_18.04_SWL

          m-t4napvpzvi1xulgz978b

          Ubuntu_20.04_SWL

          m-t4nf5uqofn0vvqjracjy

          Ubuntu_22.04_SWL

          m-t4n8lkv4jzoqb0me4y6m

          Germany (Frankfurt)

          GRID 13.5

          AliLinux2.1903_SWL

          m-gw83ebuzccacxrkigs5v

          AliLinux3.2104_SWL

          m-gw8gfwq0t7x9xo5obu93

          CentOS7.9_SWL

          m-gw88gpj79i07fy5u0jt9

          Ubuntu_18.04_SWL

          m-gw8atq53lgzc899upqo2

          Ubuntu_20.04_SWL

          m-gw81u32f6i1vdzu4jxs9

          Ubuntu_22.04_SWL

          m-gw87izabzljd5vednrbi

          China (Hong Kong)

          GRID 13.5

          AliLinux2.1903_SWL

          m-j6ccnjmjogi1lk8n4ua3

          AliLinux3.2104_SWL

          m-j6ciceb38trw6mwpsr26

          CentOS7.9_SWL

          m-j6cbt3t0005gthviwqee

          Ubuntu_18.04_SWL

          m-j6c8ij3p9mx1nbmntart

          Ubuntu_20.04_SWL

          m-j6c8pg9a7gvobq25aa3r

          Ubuntu_22.04_SWL

          m-j6c8ij3p9mx1nbmntars

          Indonesia (Jakarta)

          GRID 13.5

          AliLinux2.1903_SWL

          m-k1a3dydsfrzfiefruut5

          AliLinux3.2104_SWL

          m-k1a2sm5kvgj44fvduo7w

          CentOS7.9_SWL

          m-k1a19u2ycqayqxfza8cz

          Ubuntu_18.04_SWL

          m-k1a19u2ycqayqxfza8cy

          Ubuntu_20.04_SWL

          m-k1a40e8fvu72lh25ikji

          Ubuntu_22.04_SWL

          m-k1a28a2igiikv1597jhy

        2. In the Image section, click the Community Image tab and enter the ID of the community image.

          The following figure provides an example of selecting a community image for an ecs.sgn7i-vws-m2s.xlarge instance that runs Ubuntu operating system in the Germany (Frankfurt) region.

          社区镜像ID.png
    • Networking, System Configurations (Optional), and Grouping (Optional): Configure the network, security group, logon credentials, tags, and resource groups of the instance. For more information, see Create an instance by using the wizard.

  5. Configure the duration and make sure that the instance configurations meet your requirements.

  6. Read and confirm ECS Terms of Service and Product Terms of Service, and then click Create Instance.

    It takes about 1 to 5 minutes to create an instance. Wait until the instance is created. You can view the instance status on the Instances page in the console. When the status of the instance changes to Running, the instance is created and the GRID driver is installed.

Test the acceleration effect on graphics

The following section describes how to test the acceleration effect on graphics for the GRID driver that is installed in the X Window System (GLX) application on a vGPU-accelerated instance. A vGPU-accelerated instance that runs Ubuntu 18.04 64-bit is used as an example.

  1. Prepare an environment 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 obtain the value of the BusID parameter for the GPU that is used by the instance.

      In this example, the GPU BusID is 00:07.0.

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

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

      2. Add the obtained value of the BusID parameter to "Section Device" in the /etc/X11/xorg.conf file. In this example, BusID "PCI:0:7:0" is added. 重启

      3. Run the reboot command to restart the operating system.

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

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

    • If the startx command is unavailable, run the apt-get install xinit command to install xinit.

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

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

    x11vnc -display :1

    If the returned information is similar to the following command output, x11vnc is started. In this case, you can connect to the instance by using a VNC application, such as VNC Viewer. 连接

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

    For more information, see Add security group rules.

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

  7. Run the glxinfo command to view the configurations supported by the current NVIDIA GRID driver.

    1. Start another SSH session on a client.

    2. Run the export DISPLAY=:1 command.

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

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

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

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

      If a window that is similar to the following figure appears, the GRID driver works as expected.驱动正常