Difference between revisions of "DeepStream Reference Designs/Getting Started/Environment Setup"

From RidgeRun Developer Connection
Jump to: navigation, search
(System Setup)
Line 8: Line 8:
 
We offer several versions of the system, all based on the NVIDIA Jetson boards. Small places that use a single or dual camera may use a Jetson Nano, while big commerce with 32 cameras may need to use the Jetson Xavier AGX.
 
We offer several versions of the system, all based on the NVIDIA Jetson boards. Small places that use a single or dual camera may use a Jetson Nano, while big commerce with 32 cameras may need to use the Jetson Xavier AGX.
 
* RTSP Cameras: 1 to 8 simultaneous cameras.
 
* RTSP Cameras: 1 to 8 simultaneous cameras.
* Jetson Board: portable through Jetson Nano, TX2, NX, and AGX development kits.
+
* Jetson Board: portable through Jetson Orin, Nano, TX2, NX, and AGX development kits.
  
 
The system is based on [https://developer.nvidia.com/deepstream-sdk NVIDIA's DeepStream SDK] to take advantage of the board's hardware and multimedia capabilities. The DeepStream version used in this project is 6.0, which is included as part of the NVIDIA JetPack 4.6. In case you need to install JetPack SDK 4.6, NVIDIA provides the Image SD Card method or it can also be installed through the NVIDIA SDK Manager. For more information on such installation methods, you can refer to the official NVIDIA documentation at the following [https://developer.nvidia.com/embedded/jetpack-sdk-46 Link].
 
The system is based on [https://developer.nvidia.com/deepstream-sdk NVIDIA's DeepStream SDK] to take advantage of the board's hardware and multimedia capabilities. The DeepStream version used in this project is 6.0, which is included as part of the NVIDIA JetPack 4.6. In case you need to install JetPack SDK 4.6, NVIDIA provides the Image SD Card method or it can also be installed through the NVIDIA SDK Manager. For more information on such installation methods, you can refer to the official NVIDIA documentation at the following [https://developer.nvidia.com/embedded/jetpack-sdk-46 Link].

Revision as of 19:25, 2 August 2022



Previous: Getting Started Index Next: Getting Started/Evaluating the Project
Nvidia-preferred-partner-badge-rgb-for-screen.png




System Setup

We offer several versions of the system, all based on the NVIDIA Jetson boards. Small places that use a single or dual camera may use a Jetson Nano, while big commerce with 32 cameras may need to use the Jetson Xavier AGX.

  • RTSP Cameras: 1 to 8 simultaneous cameras.
  • Jetson Board: portable through Jetson Orin, Nano, TX2, NX, and AGX development kits.

The system is based on NVIDIA's DeepStream SDK to take advantage of the board's hardware and multimedia capabilities. The DeepStream version used in this project is 6.0, which is included as part of the NVIDIA JetPack 4.6. In case you need to install JetPack SDK 4.6, NVIDIA provides the Image SD Card method or it can also be installed through the NVIDIA SDK Manager. For more information on such installation methods, you can refer to the official NVIDIA documentation at the following Link.

Dependencies

This project has the following system dependencies:

  • pkg-config
  • gtk-doc-tools
  • libgstreamer1.0-dev
  • libgstreamer-plugins-base1.0-dev
  • gstreamer1.0-tools
  • gstreamer1.0-plugins-good
  • gstreamer1.0-libav
  • python3-pip

You may install the dependencies with the following command:

$ sudo apt-get install -y python3 python3-pip python3-setuptools python3-wheel ninja-build pkg-config gtk-doc-tools libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev  gstreamer1.0-tools gstreamer1.0-plugins-good gstreamer1.0-libav libopencv-dev

GstD

To handle the media instances used in this project, we rely on the methods provided by the Python API of Gstreamer Daemon (GstD). In order to install GStreamer Daemon, we invite you to refer to the following installation guide.

GstInterpipe

The media descriptors built in this project use the Gstreamer plugin called GstInterpipe. To install this plugin, we invite you to follow the building and installation guide.

AMQP Protocol Adapter

The project has a dependency on using a message broker like RabbitMQ. From DeepStream version 5.0, an AMQP protocol adapter is included that DeepStream applications can use out of the box to publish messages using AMQP 0-9-1 message protocol. The AMQP protocol adapter shared library is in the DeepStream package at:

/opt/nvidia/deepstream/deepstream-6.0/lib/libnvds_amqp_proto.so

The AMQP protocol adapter also has its own dependencies. To install the additional dependencies, you can run the following command:

$ sudo apt-get install libglib2.0 libglib2.0-dev libssl-dev

AMQP protocol adapter for DeepStream uses the librabbitmq.so library, built from rabbitmq-c for the underlying AMQP protocol implementation. To build the library, you may enter the following commands:

$ git clone -b v0.8.0  --recursive https://github.com/alanxz/rabbitmq-c.git
$ cd rabbitmq-c
$ mkdir build && cd build
$ cmake ..
$ cmake --build .

To copy the built librabbitmq.so library to its final location on the Jetson, enter the following command:

$ sudo cp ./librabbitmq/librabbitmq.so.4 /usr/lib/aarch64-linux-gnu/

The AMQP protocol communicates with an AMQP 0-9-1 compliant message broker like RabbitMQ. In this project, we use docker to build an image with the RabbitMQ message broker. Docker is one of the packages installed as part of NVIDIA JetPack 4.6, so no extra installation is required. You can check the docker version installed on the Jetson with the following command:

$ docker --version
Docker version 20.10.2, build 20.10.2-0ubuntu1~18.04.2

The first time you run the project, docker will display a message indicating that it could not find the RabbitMQ image locally, however, it will automatically search the remote server to install it correctly.

Nvmsgconv Plugin

As part of its components, this project uses the DeepStream plugin called Gst-nvmsgconv to build the payload messages that will be transmitted by the broker. If you want to know more about this module and its role within the system you can review the Wiki section of APLVR Inference Parser. By default, the library required by the DeepStream pipeline to use nvmsgconv is not built. So in a terminal, you should navigate to the following path and run the make command:

$ cd /opt/nvidia/deepstream/deepstream-6.0/sources/libs/nvmsgconv/ && sudo make

After that, you can inspect the library generated with the "ls" command, and the directory should have the following library (among other files):

$ ls
...
libnvds_msgconv.so
...



Previous: Getting Started Index Next: Getting Started/Evaluating the Project