Sunday, January 14, 2024

How to Install NVIDIA Drivers on AWS EC2 Instance Windows

 This video shows how to install NVIDIA drivers for Windows in AWS EC2 Instance G4DN and other instance types.




Commands Used:


msiexec.exe /i https://awscli.amazonaws.com/AWSCLIV2.msi


aws --version 


In new windows, aws configure and set your IAM user key id and secret access key


Run below in Powershell as administrator:


Install-Module -Name AWS.Tools.Installer


$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.Key

    if ($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

    }

}

No comments: