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.
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 |
| 470.239.06 | 11.4 |
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
Log on to the ECS console.
In the left-side navigation pane, choose .
In the top navigation bar, select the region where the desired instance resides.
On the ECS Instances tab, find the instance and click Run Command in the Actions column.
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.
ImportantConfigure the parameters based on the values that are provided in the following section. Otherwise, Cloud Assistant may fail to run the command.
① 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.
NoteThe 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.
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.
ImportantIf 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.
Connect to the GPU-accelerated instance.
For more information, see Connect to a Linux instance by using a password or key.
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.
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.
Prepare an environment that is used to test the acceleration effect on graphics.
Run the following command to install x11vnc:
apt-get install x11vnc
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
.Configure the X Server environment and restart the system.
Run the
nvidia-xconfig --enable-all-gpus --separate-x-screens
command.Edit the /etc/X11/xorg.conf file. In
Section "Device"
, add the BusID setting. In this example, theBusID "PCI:0:7:0"
setting is added.Run the
reboot
command to restart the system.
Run the following command to install the GLX program:
apt-get install mesa-utils
Run the
startx
command to start X Server.If the
startx
command does not take effect, run theapt-get install xinit
command to install xinit.When you run the
startx
command, thehostname: Name or service not known
error message may be prompted. The error message does not affect the startup of X Server. You can run thehostname
command to query the hostname of your instance. Then, you can modify the /etc/hosts file by replacing thehostname
value that follows127.0.0.1
with the hostname of your instance.
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.
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.
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.Run the
glxinfo
command to view the configurations that are supported by the GRID driver.Start a new terminal session on the SSH client.
Run the
export DISPLAY=:1
command.Run the
glxinfo -t
command to query the configurations that are supported by the GRID driver.
Run the
glxgears
command to test the GRID driver.On the KDE desktop, right-click the desktop and select Run Command.
Run the
glxgears
command to start the GLX program.If the following window appears, the GRID driver works as expected.
References
If you purchase a vGPU-accelerated Windows instance and install a GRID driver on the instance, you can use the instance in graphics acceleration and rendering scenarios, such as OpenGL, Direct3D, and cloud gaming scenarios. For more information, see Install a GRID driver on a GPU-accelerated compute-optimized or vGPU-accelerated Windows instance.
A GRID driver can be automatically loaded when you create a GPU-accelerated instance. For more information, see Create a GPU-accelerated instance.