How to build Graphics Workstation on Amazon EC2 G4 Instances

Know How Guide and Hands on Guide for AWS

How to build Graphics Workstation on Amazon EC2 G4 Instances

This document explains how to build Graphics Workstation on Amazon EC2 G4 Instances. Here use the GPU graphics instance G4 with Windows Server 2016 as example.

Install NICE DCV Server

Follow up guide Install NICE DCV Server

Install the NVIDIA GPU drivers

  1. NVIDIA GPU drivers enable the following:
    • DirectX and OpenGL hardware acceleration for applications
    • Hardware acceleration for H.264 video streaming encoding
    • Customizable server monitor resolutions
    • Increased maximum resolution for server monitors— up to 4096x2160
    • Increased number of server monitors

The Installing NVIDIA drivers on Windows instances guide

Choice NVIDIA drivers that can be used with GPU-based instances

The G4 instance support for all Tesla driver, GRID driver and Gaming driver.

  1. Installation options
    • Option 1: AMIs with the NVIDIA drivers installed from Marketplace. This is can be used for AWS global region
    • Option 2: Public NVIDIA drivers: install the public drivers and bring your own license
    • Option 3: GRID drivers (G3 and G4 instances): These license are available to AWS customers only
    • Option 4: NVIDIA gaming drivers (G4 instances): These license are available to AWS customers only

Here we use the Option 2 for demo

  1. Install the NVIDIA Tesla Driver
  1. Optimizing GPU settings ```bash

    Open a PowerShell window and navigate to the NVIDIA installation folder.

    cd “C:\Program Files\NVIDIA Corporation\NVSMI”

Disable the autoboost feature for all GPUs on the instance.

.\nvidia-smi –auto-boost-default=0

Set all GPU clock speeds to their maximum frequency. G4 instances:

.\nvidia-smi -ac “5001,1590”


![install-nice-dcv-GPU-Setting](/aws-is-how/EC2/media/install-nice-dcv-GPU-Setting.png)

5. Install Windows components

- Click `Server Manager`
- `Add roles and features`
- `Role-based or feature based installation`
- Select local machine from the Server pool
- Server Role screen, keep default setting
- Feature screnn, select `Media Foundation (媒体基础)` and `Quality Windows Audio Video Experience(优质Windows 音频视频体验)`
- Review and Click `Install`
- Restart the Windows

![Server-Manager](/aws-is-how/EC2/media/install-nice-dcv-Server-Manager.png)

![Server-Manager-Feature](/aws-is-how/EC2/media/install-nice-dcv-Server-Manager-Feature.png)

6. Disable the licensing page in the control panel to prevent users from accidentally changing the product type

Run Powershell as Administrator

```bash
New-ItemProperty -Path "HKLM:\SOFTWARE\NVIDIA Corporation\Global\GridLicensing" -Name "NvCplDisableManageLicensePage" -PropertyType "DWord" -Value "1"

DisableManageLicense

  1. Install GRID driver

https://s3.cn-north-1.amazonaws.com.cn/lxy-sa-software/EC2-G4-Instance/03_Grid_Driver/443.05_grid_win10_64bit_international_whql.exe

  1. Disable default display card

  2. Make sure the Driver install correctly

# Open a PowerShell window and navigate to the NVIDIA installation folder.
cd "C:\Program Files\NVIDIA Corporation\NVSMI"

.\nvidia-smi.exe

.\nvidia-smi.exe -q

Output sample

Tue Sep 22 09:22:32 2020
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 443.05       Driver Version: 443.05       CUDA Version: 10.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name            TCC/WDDM | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  Tesla T4           WDDM  | 00000000:00:1E.0 Off |                    0 |
| N/A   40C    P0    27W /  70W |    435MiB / 15360MiB |      1%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0       920    C+G   C:\Windows\System32\dwm.exe                N/A      |
|    0      2068    C+G   ...t_cw5n1h2txyewy\ShellExperienceHost.exe N/A      |
|    0      2568    C+G   ...dows.Cortana_cw5n1h2txyewy\SearchUI.exe N/A      |
|    0      2800    C+G   ... Files\NICE\DCV\Server\bin\dcvagent.exe N/A      |
|    0      2944    C+G   C:\Windows\explorer.exe                    N/A      |
+-----------------------------------------------------------------------------+

double-display

disable-display-card

  1. Test the 3D graphic acceleration

https://s3.cn-north-1.amazonaws.com.cn/lxy-sa-software/EC2-G4-Instance/05_Benchmark/FurMark_1.21.2.0_Setup.exe

3D-test

Reference

Installing NVIDIA drivers on Windows instances