Deploying NVIDIA Omniverse with Isaac Sim on AWS: A Step-by-Step Guide
By Juliana Faux, Andrés Escobar and Santiago Ferreiros
This blog presents the steps necessary to set up a NVIDIA Omniverse instance in an AWS EC2.
There are two possible installations: Workstation and Container. We will set up a remote headless server using a Docker container, and use the GUI via Streaming Client/WebRTC.
Steps for AMI creation
In this section we describe the steps followed for creating the custom AMI, including the AWS instance creation and container installation.
AWS Instance Launching
- From AWS EC2 Console go to Launch Instance section
- Browse into My AMIs
- Select “NVIDIA Omniverse GPU-Optimized AMI”
- Select instance type g5.2xlarge.
- In the Key pair (login) section, click Create new key pair to create a new PEM file or select an existing key pair.
- In the Network settings section, click Edit. Set Inbound and Outbound security groups rules to the following. This step is what allows connecting via VNC Viewer. To configure inbounding, you only need to enable the TCP protocol for ports 22 and 5901 (VCN connection)
- In the Configure storage section, set the Root volume size to 300GB or more (we used 300GB).
- Launch instance.
- Connect to the instance using ubuntu@ instead of root@.
Instance main setup
- Connect to the Instance via SSH using ubuntu@ instead of root@.
- Run the following command:
sudo apt update
- Install XFCE (a light GUI) with the following command:
sudo apt install xfce4 xfce4-goodies -y
. A pink window will appear, press Ok and gdm3. - Install TigerVNC for GUI streaming and netstat to check connectivity:
sudo apt install tigervnc-standalone-server -y
sudo apt install -y net-tools
- Configure TigerVNC:
- Create a password for VNC by running
vncserver
. This will ask for two passwords, set both. - Kill the process with
vncserver -kill :1
- Configure xstartup file to init XFCE with Tiger VNC:
- Open the file with
nano ~/.vnc/xstartup
- Make sure it has the following content:
#!/bin/sh xrdb $HOME/.Xresources startxfce4 &
- Open the file with
- Give execution permissions to xstartup file by running
chmod +x ~/.vnc/xstartup
- Create a password for VNC by running
- Configure Network for VNC
- Configure firewall to allow access to port 5901 by running
sudo ufw allow 5901/tcp
andsudo ufw reload
- Allow TigerVNC to listen all interfaces by running
sudo nano /etc/vnc.conf
and adding the following line:$localhost = "no";
- Configure firewall to allow access to port 5901 by running
- Initialize VNC Server with
vncserver :1
- Verify that the port is listening with
sudo netstat -tuln | grep 5901
. You should see something like: - Install Google Chrome
- Download it by running
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
- Run
sudo dpkg -i google-chrome-stable_current_amd64.deb
. It will show the following error message: - Install missing dependencies with
sudo apt-get install -f
- Run again
sudo dpkg -i google-chrome-stable_current_amd64.deb
- Download it by running
Isaac Sim Container installation
Pulling it from NVIDIA GPU Cloud (NGC) or using a own version stored in docker image . Since the container pulled from NGC may vary over time, it is strongly recommended to use our stored one.
Installation pulling container from NGC
- Verify GPU drivers installation with
nvidia-smi
- Install NVIDIA Container Toolkit to enable GPU use in Docker containers
sudo apt-get install -y nvidia-container-toolkit sudo systemctl restart docker sudo nvidia-ctk runtime configure --runtime=docker sudo systemctl restart docker docker run --rm --runtime=nvidia --gpus all ubuntu nvidia-smi
- Log in to NGC and pull Isaac Sim container
docker login nvcr.io # user $oauthtoken # password # PASSWORD docker pull nvcr.io/nvidia/isaac-sim:4.2.0
- Run Docker container using
docker run --name isaac-sim --entrypoint bash -it --gpus all -e "ACCEPT_EULA=Y" --rm --network=host \ -e "PRIVACY_CONSENT=Y" \ -v ~/docker/isaac-sim/cache/kit:/isaac-sim/kit/cache:rw \ -v ~/docker/isaac-sim/cache/ov:/root/.cache/ov:rw \ -v ~/docker/isaac-sim/cache/pip:/root/.cache/pip:rw \ -v ~/docker/isaac-sim/cache/glcache:/root/.cache/nvidia/GLCache:rw \ -v ~/docker/isaac-sim/cache/computecache:/root/.nv/ComputeCache:rw \ -v ~/docker/isaac-sim/logs:/root/.nvidia-omniverse/logs:rw \ -v ~/docker/isaac-sim/data:/root/.local/share/ov/data:rw -v ~/docker/isaac-sim/documents:/root/Documents:rw \ nvcr.io/nvidia/isaac-sim:4.2.0 ./runheadless.webrtc.sh -v
Download + install + connect RealVNC Viewer
- Download RealVNC Viewer from the official page: https://www.realvnc.com/es/connect/download/viewer/
- Install it.
- Connect to the instance using
<PUBLIC EC2 IP>:5901
. The password is the one set in step 5 of instance main setup. For example:
Saving the AMI
To save an AMI from an EC2 instance, start by stopping the instance. Next, select the instance and go to the “Actions” menu. From there, choose “Images and templates,” and then select “Create Image.” In the “Create Image” screen, enter a name and description for the AMI, and finally, click “Create Image” to complete the process.
Saving the Docker images
In order to save the docker images we have to follow the following steps:
Save the Ubuntu Image
To save the ubuntu image as a .tar file, run the following command: docker save -o ubuntu_latest.tar ubuntu:latest
This will create a ubuntu_latest.tar
file containing the image.
Save the Isaac-Sim Image
To save the nvcr.io/nvidia/isaac-sim
image, use: docker save -o isaac_sim_4.2.0.tar nvcr.io/nvidia/isaac-sim:4.2.0
This will create a isaac_sim_4.2.0.tar file with the Isaac Sim image.
Finally we have to transfer the .tar files to our local machine. Once the files are on your local machine, you can load them into Docker.
Installation with container
First you have to download the previously saved docker image (Docker image) and follow the following steps:
Load the Docker images
Run the following commands:
docker load -i /path/ubuntu_latest.tar
docker load -i /path/isaac_sim_4.2.0.tar
Verify the images were loaded
To confirm that both images are now available on your local machine, use the following command: docker images
You should see both ubuntu:latest and nvcr.io/nvidia/isaac-sim:4.2.0 listed in the output.
Connect to the instance + Launch Isaac Sim + Livestream
There are several ways to run Isaac Sim, depending on which is the streaming mode that will be used.
Livestreaming options are:
- Omniverse Streaming Client: This option only works in Windows or Linux.
- WebRTC: This option works in every web browser in the local network of the instance. To stream across networks, a TURN server must be set (difficult).
Running and Livestreaming via NVIDIA Omniverse Streaming Client
On your Windows or Linux machine (not Mac!), download, install and open Omniverse Launcher and log in. On the Exchange tab, download Omniverse Streaming Client. When done, go to the Library tab and launch it. On Server paste the EC2 Instance Public IP and connect.
Note: if you have opened Omniverse Streaming Client, connected to an instance and you want to connect to a different instance you must restart Omniverse Streaming Client first.
Running and Livestreaming via WebRTC (local network)
- SSH into the instance via SSH:
ssh -i "omniverse-headless-key.pem" ubuntu@ip
- Run Isaac Sim container with
docker run --name isaac-sim --entrypoint bash -it --gpus all -e "ACCEPT_EULA=Y" --rm --network=host -e "PRIVACY_CONSENT=Y" -v ~/docker/isaac-sim/cache/kit:/isaac-sim/kit/cache:rw -v ~/docker/isaac-sim/cache/ov:/root/.cache/ov:rw -v ~/docker/isaac-sim/cache/pip:/root/.cache/pip:rw -v ~/docker/isaac-sim/cache/glcache:/root/.cache/nvidia/GLCache:rw -v ~/docker/isaac-sim/cache/computecache:/root/.nv/ComputeCache:rw -v ~/docker/isaac-sim/logs:/root/.nvidia-omniverse/logs:rw -v ~/docker/isaac-sim/data:/root/.local/share/ov/data:rw -v ~/docker/isaac-sim/documents:/root/Documents:rw nvcr.io/nvidia/isaac-sim:4.2.0
- Run Isaac Sim in headless mode with the command
./runheadless.native.sh -v
and wait until you see Started watching: ‘mdl::Z73file_3A::Z1Fisaac_2Dsim::kit::mdl::core::Volume::OmniVolumeNoise’ - Stop Isaac Sim pressing
Ctrl + C
- Run Isaac Sim in WebRTC mode with the command
./runheadless.webrtc.sh -v
and wait until you see Started watching: ‘mdl::Z73file_3A::Z1Fisaac_2Dsim::kit::mdl::core::Base::OmniPBR’ - Open VNC Viewer. The password is the one configured in step 5 of the “Instance main setup” section.
- Open Google Chrome via GUI using VNC Viewer and go to
http://127.0.0.1:8211/streaming/webrtc-demo/?server=127.0.0.1
and click the red button to see the livestream. Note: the first time you open Google Chrome it may ask for a password. Put one (i.e “omniverse”)
Conclusion
Congratulations on successfully setting up a NVIDIA Omniverse instance on AWS EC2 and connecting to it! This powerful setup unlocks the potential for real-world simulation using cloud resources. Completing your NVIDIA Omniverse Setup enables advanced simulations powered by cloud resources. As a next step, consider exploring the Isaac Sim platform, an excellent tool for simulating robots and developing AI applications within Omniverse. For similar blogs please visit Marvik Blogs.