Installing NVIDIA T4 and Anyware Graphics Agent on RHEL 8 (AWS EC2 G4dn)

Rate this Article
No votes yet

Install CAS+ Graphics Agent (Latest) on AWS EC2 Instance Environment.

HW Specs - AWS EC2 Instance (AWS EC2 G4dn)

Graphics Card - NVIDIA T4

OS - CentOS Stream 8 and Red Hat Enterprise Linux 8

Reference Docs

Installing the PCoIP Graphics Agent for Linux on RHEL or CentOS

Install NVIDIA drivers on Linux instances

Installing or updating the latest version of the AWS CLI

  1. Create AWS RHEL/CentOS EC2 VM meeting our minimum requirements.
    1. Choose an Instance Type: 2 vCPUs, 2GB RAM, 30 GB HDD (AWS EC2 G4dn)
    2. Configure Instance Details: (# of instances, network, subnet, IP Addresses, IAM Roles, etc.)
    3. Add Storage (min: 100MB for installation, 100MB for logging) 30GB to be safe.
    4. Add tags (optional)
    5. Configure Security Group (TCP 22, 443, 4172 | UDP 4172 ) all open inbound.
    6. Create pem key (NOTE: pem key is used to login)
    7. Launch EC2 Instance.
    8. Log into AWS Linux EC2 instance.
    9. Run "sudo yum update -y"
    10. Before proceeding with Graphics Agent for Linux installation, install a desktop environment. To install a desktop environment in RHEL or CentOS, use the following command:
    11. Verify that a desktop environment is installed.
    12. Before installing the NVIDIA drivers, install the libglvnd-opengl package:
    13. Install the AWS CLI on your Linux instance and configure default credentials. For more information, see Installing the AWS CLI in the AWS Command Line Interface User Guide.
    14. Your user or role must have the permissions granted that contains the AmazonS3ReadOnlyAccess policy.
    15. You just need to attach the IAM Role "GSS-Teradici" to your agent machine.
    16. Connect to your Linux instance. Install gcc and make, if they are not already installed.
    17. Update your package cache and get the package updates for your instance.

      [ec2-user ~]$ sudo yum update -y
    18. Reboot your instance to load the latest kernel version.

      [ec2-user ~]$ sudo reboot
    19. Reconnect to your instance after it has rebooted.
    20. Install the gcc compiler and the kernel headers package for the version of the kernel you are currently running.
      [ec2-user ~]$ sudo dnf install -y make gcc elfutils-libelf-devel libglvnd-devel kernel-devel-$(uname -r)
    21. Download the GRID driver installation utility using the following command: (Make sure AmazonS3ReadOnlyAccess policy is attached to your instance before installing the NVIDIA.)

      [ec2-user ~]$ aws s3 cp --recursive s3://ec2-linux-nvidia-drivers/latest/ . 
    22. Multiple versions of the GRID driver are stored in this bucket. You can see all of the available versions using the following command.

      [ec2-user ~]$ aws s3 ls --recursive s3://ec2-linux-nvidia-drivers/
    23. Add permissions to run the driver installation utility using the following command.

      [ec2-user ~]$ chmod +x NVIDIA-Linux-x86_64*.run
    24. Run the self-install script as follows to install the GRID driver that you downloaded. For example:

      [ec2-user ~]$ sudo /bin/sh ./NVIDIA-Linux-x86_64*.run
    25. When prompted, accept the license agreement and specify the installation options as required (you can accept the default options).
    26. Reboot the instance.

      [ec2-user ~]$ sudo reboot
    27. Confirm that the driver is functional. The response for the following command lists the installed version of the NVIDIA driver and details about the GPUs.

      [ec2-user ~]$ nvidia-smi -q | head

sudo yum groupinstall 'Server with GUI'

ls /usr/share/xsessions/

sudo yum install libglvnd-opengl

Install NVIDIA drivers on Linux instances

To install the NVIDIA GRID driver on your instance

Prerequisites

To install the NVIDIA GRID driver on your instance

[ec2-user ~]$ nvidia-smi

Installing the Graphics Agent for Linux on RHEL or CentOS

To install the Graphics Agent for Linux software:

Download and install the repository via the https://docs.teradici.com/find/product/hp-anyware/2023.04/graphics-agent-for-linux

Install the EPEL repository: 
sudo yum install epel-release 

(If this command fails or unable to install the epel-release please follow the command below)

 sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm

Optionally install USB dependencies, if you intend to support USB devices other than keyboards, mice, and pointer devices. If you skip this step, USB redirection will be completely disabled and bridged USB devices will not work.
sudo yum install usb-vhci

Install the PCoIP Graphics Agent for Linux:

sudo yum install pcoip-agent-graphics

After installing the agent please register your agent 

pcoip-register-host --registration-code=<XXXXXX@YYY-YYYY-YYY>

For proxied internet conections, type:

pcoip-register-host --registration-code=<XXXXXX@YYY-YYYY-YYY> --proxy-server=<serverURL> --proxy-port=<port>

1. Reboot the desktop.