AWS - EC2 Instance

This guide shows you how to setup Lumeo Gateways to run in a AWS EC2 instance.

Before using the Lumeo Gateway Installer on your Nvidia GPU enabled AWS EC2 machines, follow these steps :

Launch Nvidia GPU based EC2 instance

In the EC2 console, configure and launch machine instance with the following configuration:

  • Ubuntu 24 (preferred) OS (x86)

  • At least 50 GB of Disk space

  • Instance type must have an Nvidia GPU (**XXdn.XXXXX ** are Nvidia GPUs)

    • AWS GPU Guide
    • G4dn.2xlarge is a single T4 GPU with 8 cores which is suitable and recommended for most applications

Networking considerations

Follow these guidelines for network/security group setup for the instance:

  • Public IP address: Not required unless you need to access the Gateway’s web interface from a public IP or make the Lumeo output streams available via RTSP to an external service.
  • Outbound connections: Allow unrestricted outbound connections along with return connections from the gateway to public internet and to your camera network. If you need to restrict these review Security and Network guide for specific hosts and ports you need to allow.
  • Inbound connections: You can block inbound direct connections from public internet to the Gateway for the most secure setup.

For more detailed network instructions, review Security & Network guide.

Verify and install GPU drivers

After launching the virtual machine instance, log in, execute the following commands to configure the machine instance and install Nvidia GPU drivers

Verify GPU is present

sudo lshw -c video

If you are using the correct instance type (G4DN in this case), you should see the following results:

  *-display:0               
       description: VGA compatible controller
       product: Amazon.com, Inc.
       vendor: Amazon.com, Inc.
       physical id: 3
       bus info: pci@0000:00:03.0
       logical name: /dev/fb0
       version: 00
       width: 32 bits
       clock: 33MHz
       capabilities: vga_controller bus_master fb
       configuration: depth=32 latency=0 resolution=800,600
       resources: memory:c1000000-c13fffff memory:c0000-dffff
  *-display:1
       description: 3D controller
       product: TU104GL [Tesla T4]
       vendor: NVIDIA Corporation
       physical id: 1e
       bus info: pci@0000:00:1e.0
       logical name: /dev/fb0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: pm pciexpress msix bus_master cap_list fb
       configuration: depth=32 driver=nvidia latency=0 mode=800x600 visual=truecolor xres=800 yres=600
       resources: iomemory:80-7f iomemory:80-7f irq:10 memory:c0000000-c0ffffff memory:840000000-84fffffff memory:850000000-851ffffff

The NVIDIA Tesla T4 GPU should be listed in the output.

Then install the GPU drivers:

sudo apt update
sudo apt install -y ubuntu-drivers-common
sudo ubuntu-drivers --gpgpu install

If you need a specific NVIDIA driver version, use e.g. sudo ubuntu-drivers --gpgpu install nvidia:580

Then reboot

sudo reboot

After reboot, verify the nvidia drivers are properly installed, execute the command:

nvidia-smi

To see output like this

ubuntu@ip-172-31-5-37:~$ nvidia-smi
Tue Apr 11 02:12:18 2023       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 535.105.17   Driver Version: 535.105.17   CUDA Version: 12.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  Tesla T4            Off  | 00000000:00:1E.0 Off |                    0 |
| N/A   55C    P0    30W /  70W |      2MiB / 15360MiB |      4%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

If you receive an error, reboot the instance again as it maybe required for the drivers to load properly.

Install Lumeo Gateway Software

Follow steps under Lumeo Gateway Installer to install the Lumeo gateway software on the EC2 instance.