Creating images to run GPU applications - AWS RoboMaker

Creating images to run GPU applications

AWS RoboMaker GPU simulation jobs support CUDA, OpenGL, OpenCL and Vulkan API access. Therefore, the application using these APIs should have the corresponding drivers installed in their images.

Note

We recommend using Nvidia base images to get the OpenGL APIs. The example Dockerfile used in the tutorials covers only nvidia/opengl:1.0-glvnd-runtime-ubuntu20.04 which provides OpenGL support. Refer to the Nvidia documentation to find container images that support CUDA, Vulkan, and OpenCL.

To use DCV display with GPU rendering, you must install nice-dcv-gl. Note that X0 is the system's Xorg process that talks to the GPU. X1 and X2 are instead XDCV processes. When you start an OpenGL application on X1 or X2, nice-dcv-gl takes care of redirecting the calls and performing the rendering on X0, where the GPU is available.

To install nice-dcv-gl, download the archive, extract it, and install the nice-dcv-gl package following the DCV public documentation. See Install the NICE DCV Server on Linux.

The following example demonstrates Dockerfile installing nice-dcv-gl_2021.2 on a ubuntu18.04 base image.

FROM nvidia/opengl:1.0-glvnd-runtime-ubuntu20.04 ENV DEBIAN_FRONTEND="noninteractive" RUN apt-get update && apt-get install -y --no-install-recommends \ ca-certificates \ gnupg2 \ wget RUN wget https://d1uj6qtbmh3dt5.cloudfront.net/NICE-GPG-KEY && gpg --import NICE-GPG-KEY && \ wget https://d1uj6qtbmh3dt5.cloudfront.net/2021.2/Servers/nice-dcv-2021.2-11048-ubuntu1804-x86_64.tgz && \ tar xvzf nice-dcv-2021.2-11048-ubuntu1804-x86_64.tgz && \ cd nice-dcv-2021.2-11048-ubuntu1804-x86_64 && \ apt install -y ./nice-dcv-gl_2021.2.944-1_amd64.ubuntu1804.deb

For detailed instructions on building a GPU application, see Running a GPU sample application with ROS2 Foxy and Gazebo 11.