Enabling GPU sharing on a Linux Amazon DCV Server
With GPU sharing, you can share one or more physical GPUs between multiple Amazon DCV virtual sessions. For more information about sessions, see Managing Amazon DCV sessions. Using GPU sharing, you can use a single Amazon DCV server and host multiple virtual sessions that share the server's physical GPU resources.
Note
GPU sharing is only supported on Linux Amazon DCV servers.
Prerequisites
Before you begin, complete the following prerequisites:
- 
    Install the Amazon DCV server on a Linux server. 
- 
    Install the Amazon DCV dcv-glandnice-Xdcvpackages on the server.
- 
    Ensure that the server has at least one supported NVIDIA GPU. 
- 
    Install the NVIDIA GPU driver on the server. The official NVIDIA drivers are required. The open-source NVIDIA drivers aren't supported. 
- 
    Ensure that the NVIDIA GPU driver supports hardware-accelerated OpenGL. 
- 
    Install an X Server and configure the DeviceandScreensections in thexorg.conffile.NoteYou can use the nvidia-xconfigNVIDIA utility to automatically create anxorg.conffile and configure it for all the available NVIDIA GPUs.
- 
    Ensure that the X Server is running. 
- 
    (Optional) Verify the Amazon DCV server configuration by running the dcvgldiagtool. For more information, see Performing post-installation checks.You can also install the nice-dcv-gltestpackage and run thedcvgltesttest application to check if the server is properly configured for GPU sharing.
To enable GPU sharing, you must specify the list of GPUs to be used by the virtual sessions. If you don't specify the GPUs, only the GPU used
   by the standard X Server, with the display name :0.0, is used.
Specify the GPUs in the gl-displays parameter in the dcv.conf file after you complete the prerequisites that are
   described earlier in this topic.
To enable GPU sharing on a Linux Amazon DCV server
- 
    Navigate to /etc/dcv/and open thedcv.conffile with your preferred text editor.
- 
    Add the [display/linux]section and thegl-displaysparameter. Then, specify the available GPUs in the following format:[display/linux] gl-displays = [':xserver_port.screen_number_1',':xserver_port.screen_number_2', ...]Where xserver_portis the server andscreen_numberis the number that's associated with the screen related to the GPU.screen_numberstarts from0.The following example shows the gl-displaysparameter for two GPUs running on the default X Server session:[display/linux] gl-displays = [':0.0',':0.1']
- 
    Save and close the file.