Logo Dark
Get in Touch

AWS G and P Series EC2 Instances: Rendering, Gaming and Machine Learning

Written by Nishant Parmar
Published25 November 2024
Tech
Using AWS g4dn.xlarge EC2 Instance with Nvidia Tesla T4 GPU for High-Quality Rendering, Cloud Gaming and Machine Learning.

Table of contents

Pricing

Who is the Target Audience?

Increase vCPU Service Quota for G Series Instances

  1. Go to the Service QuotasManage Quotas: ‘Amazon Elastic Compute Cloud’ → Search for ‘Running On-Demand G and VT instances’ → Request increase at account level.
Running on Demand G and Vt Instances

Increase Quota Value

Launch Instance with Proper Configurations:

  1. Launch instances → Provide proper name.
  2. Operating System: Here I am going to use Windows Server 2022 Base, because it is simple and easy to use.
  3. Select instance: g4dn.xlarge
Select Instance G4dn.xlarge

Launch Instance

Inbound Rules

Amazon S3 Real Only Access

Iam Role

Connecting to the EC2:

  1. Go to your instance → Connect to instnace → RDS Client → Get password.

Get Windows Password

Dns, Username and Password

Remote Desktop Connection 1
Remote Desktop Connection 2

Installing NVIDIA Drivers:

  • NVIDIA GRID Drivers:
  1. Open PowerShell as Administrator.
  2. Copy and Paste Following Commands one by one to the PowerShell.
$Bucket = "ec2-windows-nvidia-drivers"
$KeyPrefix = "latest"
$LocalPath = "$home\Desktop\NVIDIA"
$Objects = Get-S3Object -BucketName $Bucket -KeyPrefix $KeyPrefix -Region us-east-1
foreach ($Object in $Objects) {$LocalFileName = $Object.Keyif ($LocalFileName -ne '' -and $Object.Size -ne 0) {    $LocalFilePath = Join-Path $LocalPath $LocalFileName    Copy-S3Object -BucketName $Bucket -Key $Object.Key -LocalFile $LocalFilePath -Region us-east-1}}

Install the Graphics Driver.

Express Install 1
Express Install 2

Gpu 0.
  • NVIDIA Gaming Driver:
  1. Open PowerShell as Administartor.
  2. Run Following Commands one by one:
$Bucket = "nvidia-gaming"
$KeyPrefix = "windows/latest"
$LocalPath = "$home\Desktop\NVIDIA"
$Objects = Get-S3Object -BucketName $Bucket -KeyPrefix $KeyPrefix -Region us-east-1
foreach ($Object in $Objects) {$LocalFileName = $Object.Keyif ($LocalFileName -ne '' -and $Object.Size -ne 0) {    $LocalFilePath = Join-Path $LocalPath $LocalFileName    Copy-S3Object -BucketName $Bucket -Key $Object.Key -LocalFile $LocalFilePath -Region us-east-1}}

New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\nvlddmkm\Global" -Name "vGamingMarketplace" -PropertyType "DWord" -Value "2"

reg add "HKLM\SYSTEM\CurrentControlSet\Services\nvlddmkm\Global" /v vGamingMarketplace /t REG_DWORD /d 2

Invoke-WebRequest -Uri "https://nvidia-gaming.s3.amazonaws.com/GridSwCert-Archive/GridSwCertWindows_2024_02_22.cert" -OutFile "$Env:PUBLIC\Documents\GridSwCert.txt"

nvidia-smi.exe -q

NICE DVC

  1. Go the https://download.nice-dcv.com/ and download NICE DCV Server.
Download Nice Dcv Server

Default Graphics Settings

my-dcv-server.com:8443#console

Enable Temporary Storage Drive:

  1. Right click on Windows icon and go to Disk Management, on the launch of Disk Management you will prompt with Initialize Disk option, where you can select GPT and ok.
Disk Management

Unallocated Disk

  1. Download your prefered Blender version from https://www.blender.org/download/
  2. After Installing Blender open it, we need to made some changes in blender to use GPU.
  3. Go to the Edit → Preferences → System → Cycles Render Devices → Optix → Select Tesla T4 → save Preferences.
Blender Preferences

Configuration Used to Render This Scene

Screenshot 12 11 2024 15347 Nishant Parmar.medium.com

Time Taken to Render One Frame

What About Gaming on Tesla T4?

What About Unreal Engine 5 on Tesla T4?

Machine Learning

Conclusion

Reference:

More

An interesting read? Here is more related to it.

We Make pixel perfect things

We Make pixel perfect things

We Make pixel perfect things

We Make pixel perfect things

We Make pixel perfect things

We Make pixel perfect things

India (HQ)

201, iSquare Corporate Park, Science City Road, Ahmedabad-380060, Gujarat, India

Canada

24 Merlot Court, Timberlea, NS B3T 0C2, Canada

For Sales

[email protected]

Looking For Jobs

Apply Now

LinkedIn
Instagram
X
Facebook
Youtube
Discord
Dribbble
Behance
Github