The following description is applicable to running FlightGoggles on any headless Ubuntu server, including non-AWS instances.
The instructions on this page were derived from here.
Start by spinning up an EC2 instance. We recommend the following configuration:
Instance: p3.2xlarge or g3s.xlarge.
p3.2xlarge is preferred, but g3s.xlarge is usable (will result in lower frame rate).Amazon Base Image: ami-0826e0d47dd8eebf6
Now, we need to set up a virtual display. Install Xorg:
sudo apt-get install xserver-xorg-core
Determine the BusID of the GPU:
nvidia-xconfig --query-gpu-info
For example, on a g3s.xlarge instance, the result is PCI:0:30:0
The BusID needs to be a list of all devices capable of display.
Next, we need to configure Xorg (replacing the BusID, as appropriate):
sudo nvidia-xconfig -a --allow-empty-initial-configuration --virtual=3200x1800 --busid PCI:0:30:0
Examine the output. If it says that it wrote the file XF86Config
, we need to rename that file manually manually:
sudo mv /etc/X11/XF86Config /etc/X11/xorg.conf
Now reboot.
Once restarted, run the following commands:
export DISPLAY=:0 sudo X :0 &
These final two commands need to be run after every reboot.
To make sure that graphical applications are able to run now, try to run glxgears
. If the output looks something like ??? frames in 5.0 seconds = ??? FPS
, then it is working.
You can now follow the regular FlightGoggles Renderer installation instructions for Ubuntu.
If your headless server running the FlightGoggles Renderer is not on the same network as your computer running the FlightGoggles Client (e.g. when using AWS), we recommend that you proceed to Setting up a VPN Server and Client to connect the FlightGoggles Renderer and Client.