GstCUDA - Building and Installation Guide

From RidgeRun Developer Wiki
Revision as of 17:50, 21 November 2017 by Mgruner (talk | contribs)

Evaluating GstCUDA


Home

GstCUDA Framework



This page describes the GstCUDA building and installation steps.

Getting the Code

GstCUDA is an add-on to RidgeRun's professional SDK. You can purchase GstCUDA, with full source code, from the RidgeRun Store or using the Shopping Cart:

Contact support@ridgerun.com with any questions.


Dependencies

It is important to recall that GstCUDA is only supported on Tegra X1/X2 platforms. So, the below dependencies and provided guides to meet them corresponds to Tegra platform.

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
  • CUDA 8.0 version or greater
  • Mesa EGL

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

CUDA L4T package

Below are the required steps to install CUDA L4T pacakage on Tegra. The Jetpack default installation will flash and install all the necessary CUDA packages, but in case that a CUDA L4T installation is required the below steps should be followed.

Installation guide:

  1. Copy the CUDA L4T package into your Tegra file system
    1. For this guide we are using: cuda-repo-l4t-8-0-local_8.0.34-1_arm64.deb.
    2. You can find the CUDA L4T package under the jetpack_download directory.
  2. Under the Tegra command line run the following commands:
    1. sudo dpkg -i cuda-repo-l4t-8-0-local_8.0.34-1_arm64.deb
    2. sudo apt-get update
    3. sudo apt-get install cuda-toolkit-8-0

** Note: If you are using Ubuntu 16.04 or later it will warn about the signature of the package, you can ignore this.

$ sudo apt-get update 
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)

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

It is important to recall that GstCUDA is only supported on Tegra X1/X2 platforms. So, the GstCUDA package must be built natively on the Tegra.

In order to build the project run the following commands. Note that the libdir variable corresponds to the Tegra X1/X2 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
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.3.0.1
  License                  Proprietary
  Source module            gst-cuda
  Source release date      2017-11-20 23:12 (UTC)
  Binary package           GStreamer CUDA Plug-in
  Origin URL               Unknown package origin

  cudafilter: cudafilter

  1 features:
  +-- 1 elements

Important Note

After installing GstCUDA and all its dependencies, the Tegra must be rebooted before running a GStreamer pipeline that uses GstCUDA.




Evaluating GstCUDA


Home

GstCUDA Framework