Installing DPDK Framework for Holoscan Platform

From RidgeRun Developer Wiki



Previous: Holoscan SDK/Introduction Index Next: Contact_Us






Introduction

This subsection shows the steps to install the Holoscan SDK on a Jetson Orin board using a .deb package. It also shows how to perform some basic testing to confirm that the installation is correct by executing some of the examples included in the SDK package.

Installing Dependencies

CUDA is required to use the Holoscan SDK in Jetson platforms. Usually CUDA is installed by default when a board is flashed using SDKManager, but if CUDA is not installed, use the following command to install it:

sudo apt update && sudo apt install -y cuda-toolkit-12-6

Keep in mind that the previous command will install version 12.6 of CUDA, which is the official version supported in JetPack 6. It is recommended to use the CUDA version officially supported by the corresponding JetPack release.

Installing Holoscan SDK

For this guide, the Debian package installation method will be used. With this method, simply execute the following commands in the Jetson board:

sudo apt update

# Install Holoscan SDK
sudo apt install holoscan

It is important to know that this method will only install the C++ API, as Python support is removed from the Holoscan SDK Debian package as of version 3.0.0.

If the SDK is being installed on an x86 PC, it is possible that the following error appears when executing the previous commands:

E: Unable to locate package holoscan

If the previous error appears, use the following commands instead:

wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb
sudo dpkg -i cuda-keyring_1.1-1_all.deb
sudo apt-get update
sudo apt-get -y install holoscan

Testing the SDK

After the installation process is completed, the Holoscan SDK will be located in the path /opt/nvidia/holoscan, This path has the following contents:

nvidia@nvidia:/opt/nvidia/holoscan$ ls

bin  examples  include  lib  NOTICE  README

One easy way to verify that the Holoscan SDK installation was successful is to execute the included examples. You can execute the Hello World example by executing the following commands:

cd /opt/nvidia/holoscan/

./examples/hello_world/cpp/hello_world

If the installation was completed successfully, the following output will be displayed:

[info] [fragment.cpp:705] Loading extensions from configs...
[info] [gxf_executor.cpp:265] Creating context
[info] [gxf_executor.cpp:2395] Activating Graph...
[info] [gxf_executor.cpp:2425] Running Graph...
[info] [gxf_executor.cpp:2427] Waiting for completion...
[info] [greedy_scheduler.cpp:191] Scheduling 1 entities

Hello World!

[info] [greedy_scheduler.cpp:338] Scheduler stopped: no more entities to schedule
[info] [greedy_scheduler.cpp:401] Scheduler finished.
[info] [gxf_executor.cpp:2430] Deactivating Graph...
[info] [gxf_executor.cpp:2438] Graph execution finished.
[info] [gxf_executor.cpp:295] Destroying context

Among the included examples, there is one to show how to capture from a V4L2 device and display the output using Holoscan. The example can be executed with the following commands:

cd /opt/nvidia/holoscan/

./examples/v4l2_camera/cpp/v4l2_camera

After executing the commands, the camera will start capturing, and the output will be displayed using Holoviz, which is a Holoscan operator for displaying video output. An example output can be seen in the following image:

It is important to know that in order for this example to work correctly, it is necessary for the board to have a camera connected, and the video output of the board must be connected to a monitor; otherwise, the execution will show the following errors:

[info] [fragment.cpp:705] Loading extensions from configs...
[info] [gxf_executor.cpp:265] Creating context
[info] [gxf_executor.cpp:2395] Activating Graph...
[info] [gxf_executor.cpp:2425] Running Graph...
[info] [gxf_executor.cpp:2427] Waiting for completion...
[info] [greedy_scheduler.cpp:191] Scheduling 3 entities
Opening in O_NONBLOCKING MODE 
[info] [v4l2_video_capture.cpp:833] Using V4L2 format YUYV (YUYV 4:2:2), 1920x1080, 5 fps
Glfw Error 65550: Failed to detect any supported platform
[error] [gxf_wrapper.cpp:63] An exception occurred when starting the operator: 'visualizer' - Failed to initialize glfw
[warning] [entity_executor.cpp:539] Failed to start entity [visualizer]
[warning] [greedy_scheduler.cpp:243] Error while executing entity 20 named 'visualizer': GXF_FAILURE
[error] [entity_executor.cpp:641] Entity [visualizer] must be in Started, Tick Pending, Ticking, or Idle stage before stopping. Current state is StartPending
[info] [greedy_scheduler.cpp:401] Scheduler finished.
[error] [program.cpp:580] wait failed. Deactivating...
[error] [runtime.cpp:1649] Graph wait failed with error: GXF_FAILURE
[warning] [gxf_executor.cpp:2428] GXF call GxfGraphWait(context) in line 2428 of file /workspace/holoscan-sdk/src/core/executors/gxf/gxf_executor.cpp failed with 'GXF_FAILURE' (1)
[info] [gxf_executor.cpp:2438] Graph execution finished.
[error] [gxf_executor.cpp:2446] Graph execution error: GXF_FAILURE
terminate called after throwing an instance of 'std::runtime_error'
  what():  Failed to initialize glfw
Aborted (core dumped)




Previous: Holoscan SDK/Introduction Index Next: Contact_Us