GstCUDA - Building and Installation Guide
Getting the Code
GstCUDA is a RidgeRun's professional product. You can purchase GstCUDA, with full source code, from the RidgeRun Store or using the Shopping Cart:
Dependencies
GstCUDA is only supported on Jetson TX1/TX2 platforms. The following packages are needed in order to build and use GstCUDA:
- GStreamer 1.8.0.1 version or greater:
- gstreamer-1.0
- gstreamer-plugins-base-1.0
- gstreamer-base-1.0
- gstreamer-check-1.0
- gstreamer-video-1.0
- gstreamer-controller-1.0
- gstreamer-plugins-bad-1.0
- CUDA 8.0 version or greater *
- Mesa EGL
- Installed by JetPack by default, if not got to Installing_CUDA-toolkit_and_VisionWorks_Jetson_TX2/Xavier/Nano
GStreamer
The GStreamer packages are likely already installed in your Tegra Ubuntu OS distribution. In case you want to double check and install the missing packages, run the following commands.
sudo apt install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-bad
CUDA L4T package
The Jetpack default installation will flash and install all the necessary CUDA packages. This section describes how to perform a manual installation, which is typically __NOT__ needed
Installation guide:
- Copy the CUDA L4T package into your Jetson file system
- For this guide we are using: cuda-repo-l4t-8-0-local_8.0.34-1_arm64.deb. Please adjust as needed.
- You can find the CUDA L4T package under the jetpack_download directory.
- New releases use the Nvidia SDK Manager.
- Run the following commands on your target hardware
sudo dpkg -i cuda-repo-l4t-8-0-local_8.0.34-1_arm64.deb sudo apt-get update sudo apt-key add /var/cuda-repo-10-0-local-10.0.166/7fa2af80.pub sudo apt-get install cuda-toolkit-8-0 echo "# Add 32-bit CUDA library & binary paths:" >> ~/.bashrc echo "export PATH=/usr/local/cuda-8.0/bin:\$PATH" >> ~/.bashrc echo "export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib:\$LD_LIBRARY_PATH" >> ~/.bashrc source ~/.bashrc
If you are using Ubuntu 16.04 or newer you may get the following warning, which is safe to ignore:
Get:1 file:/var/cuda-repo-8-0-local InRelease Ign:1 file:/var/cuda-repo-8-0-local InRelease Get:2 file:/var/cuda-repo-8-0-local Release [574 B] Get:2 file:/var/cuda-repo-8-0-local Release [574 B] Hit:4 http://ports.ubuntu.com/ubuntu-ports xenial InRelease Hit:5 http://ports.ubuntu.com/ubuntu-ports xenial-updates InRelease Hit:6 http://ports.ubuntu.com/ubuntu-ports xenial-security InRelease Reading package lists... Done W: file:///var/cuda-repo-8-0-local/Release.gpg: Signature by key 889BEE522DA690103C4B085ED88C3D385C37D3BE uses weak digest algorithm (SHA1)
Finally, install the Multimedia API:
sudo dpkg -i nvidia-l4t-jetson-multimedia-api_32.4.2-20200408182620_arm64.deb
Mesa EGL
Run the following command to install the Mesa EGL package:
sudo apt install libegl1-mesa-dev
GTK-Doc
Run the following command to install the GTK-Doc package:
sudo apt install gtk-doc-tools
Building the project
The GstCUDA package must be built natively on the Jetson hardware.
In order to build the project run the following commands. Note that the libdir variable corresponds to the Jetson TX1/TX2 system.
./autogen.sh --prefix=/usr/ --libdir=/usr/lib/aarch64-linux-gnu/ make
The autogen.sh script will automatically run the configure script. In case a more complex configuration is needed, the configure step may be executed manually:
./autogen.sh --noconfigure ./configure --prefix=/usr/ --libdir=/usr/lib/aarch64-linux-gnu/ <additional advanced options> make
Finally, the status of the current version may be checked by running the unit tests:
make check
Installing the plugin
The plugin is installed to the GStreamer's default plug-in location in the file system by running:
sudo make install
To verify that the plug-in was correctly installed, you should run:
gst-inspect-1.0 cuda
with expected output
Plugin Details: Name cuda Description Allows frames to be processed by the GPU using a custom CUDA library algorithm Filename /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstcuda.so Version 0.7.0.1 License Proprietary Source module gst-cuda Source release date 2019-08-14 21:15 (UTC) Binary package GStreamer CUDA Plug-in Origin URL Unknown package origin cudamux: cudamux cudafilter: cudafilter 2 features: +-- 2 elements
After installing GstCUDA and all its dependencies, the Linux O.S. running on Jetson must be rebooted before running a GStreamer pipeline that uses GstCUDA.