Rocky 9 3D Workstation on AWS
Table of Contents
The objective is simple, build a 3D workstation in the cloud with Rocky 9 Linux for running application like Blender, Maya, Nuke, etc…
If you prefer Ubuntu I have another guide here for that distro.
Prerequisites⌗
This guide assumes you already have an EC2 instance with an Nvidia GPU running Rocky 9.
Getting Started⌗
Update the system.
Install EPEL Repository. This will make it easy to install extra packages like the AWS CLI.
AWS CLI
If you have installed the EPEL repository you can simply install with dnf
.
Or to install manually.
Cleanup install files from manual installation.
Install AWS SSM Agent (optional)⌗
Systems Manager (SSM) is a handy service for remote patching/monitoring/administrating. It needs an agent installed to work its magic on the remote system.
Desktop Environment Installation⌗
Installing GDM⌗
Install GDM for login. Nice DCV only works with GDM at this stage.
Nvidia and Nice DCV currently don’t support Wayland so it needs to be disabled.
Installing a Desktop Environment⌗
Now you have a choice to make, which desktop environment to install…
Gnome
KDE
KDE will install its own desktop manager, it needs to be disabled so GDM can be used instead.
Install Nvidia Drivers⌗
Disable Nouveau⌗
Disable the Nouveau open source driver so it can’t confict with the proprietary Nvidia driver.
OPTIONAL: Sometimes the desktop environment installation will also install Nouveau with it, so you’ll need to regenerate the initramfs to ensure Nouveau is not loaded by the kernel.
Install dependencies for the driver.
NOTE: If you get an error such as Error: Unable to find a match: kernel-devel
you might need to reboot to load the updated kernel.
Download the Nvidia driver⌗
There are a few options for getting the Nvidia driver. You can download directly from Nvidia’s website, however this might not always work depending on the instance type you are using. The best option is to get the driver direct from AWS, that way you know it will work correctly with EC2.
Here is a guide to downloading the driver direct from AWS
Install Nvidia driver⌗
Disable GSP.
Update xorg.conf to enable multiple monitor support.
Test if its working.
Nice DCV Installation⌗
First we need to download Nice DCV by going to the Nice DCV website and grabbing the download URL.
Then use curl
command to download Nice DCV from the URL we got from the website like below.
Extract the tar file.
Change into the extracted directory using cd
.
Install all the components for the Nice DCV server.
Install USB drivers.
When asked if you want to install the USB kernel module choose yes by pressing y then enter.
Do you want to install the kernel module and enable USB remotization? [y|n]
Make sure to use DKMS pressing y then enter.
Do you want to use DKMS to install the kernel module? [y|n]
Allow firewall
Autostart DCV console session as current user.
Enable Nice DCV service.
Set the system to boot into graphical mode.
Login⌗
Set a password for the user so you can login with DCV.
For example
Give it one final reboot!
Once the system comes back up its ready to use!
Clean up⌗
Don’t forget to delete the Nice-DCV and Nvidia driver installers.
Troubleshooting⌗
- Connection refused by DCV
If firewalld service is running but has not added the rules to allow Nice DCV.
This usually happens if you get the error FirewallD is not running
when adding the firewall rules.
To fix this just add the firewall rules again.
- Nice DCV shows a blank blue screen with a spinning wheel forever
This usually indicated Nice DCV is working but the graphical session is not.
The most likely culprit is the Nouveau driver is running instead of the Nvidia proprietary driver. You can check if this is the case by running this command.
If Nouveau is running try repeating the steps to disable Nouveau including running the dracut commands, then reboot the system.
Once the system has reboot check to see if the Nvidia driver is loaded by running.