Skip to content

How to install nvidia drivers on Amazon Linux?

0

My ec2 instance is of type g4dn.xlarge. I tried nvidia-smi but it seems the drivers are not pre-installed so I want to install them.

I couldn't find much documentation for Amazon Linux online. On the nvidia instructions it isn't specifically mentioned. When running sudo cat /etc/os-release I get this output:

NAME="Amazon Linux"
VERSION="2023"
ID="amzn"
ID_LIKE="fedora"
VERSION_ID="2023"
...

So i tried to follow the instructions for fedora (randomly fedora34) but I got errors during the installation (I guess because of incompatibility).

Any help highly appreciated.

4 Answers
1

NVIDIA has added support for Amazon Linux 2023.

Do refer to How do I install NVIDIA GPU driver and optionally CUDA toolkit in Amazon Linux 2023?

AWS
EXPERT
answered 2 years ago
0

Hi Nina,

Would it be ok for you to use an AMI with the drivers pre-installed:

https://aws.amazon.com/marketplace/pp/prodview-64e4rx3h733ru?sr=0-3&ref_=beagle&applicationId=AWSMPContessa

AWS
EXPERT
answered 3 years ago
0

Can we use that image you linked with EKS?

answered 2 years ago
0

Hello Nina,

Based on your description, it can be observed that you are using the Amazon Linux 2023 operating system.

You can install Nvidia driver by executing the following command.

$sudo yum install -y kernel-modules-extra.

Then, following the steps for Amazon Linux 2 in the document ( https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/install-nvidia-driver.html )

$sudo yum install gcc make

$sudo yum update -y

$sudo reboot

$sudo yum install -y gcc kernel-devel-$(uname -r)

$aws s3 cp --recursive s3://ec2-linux-nvidia-drivers/latest/ .

$chmod +x NVIDIA-Linux-x86_64*.run

$sudo /bin/sh ./NVIDIA-Linux-x86_64*.run

AWS
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.