Manual installing TAPPAS requires preparations, our recommended method is to begin with Hailo SW Suite
or Pre-built Docker image
.
In this guide we instruct how to install our required components manually.
Note
Only Ubuntu 20.04 and 22.04 are supported
First you will need to install HailoRT + HailoRT PCIe driver, follow HailoRT installation guide for further instructions. And then Make sure that HailoRT works
Download from Hailo developer zone tappas_VERSION_linux_installer.zip
.
Unzip tappas_VERSION_linux_installer.zip
unzip tappas_VERSION_linux_installer.zip
Unzip TAPPAS and clone HailoRT sources
unzip tappas_VERSION_linux_installer.zip
change directory to TAPPAS, make directory named
hailort
and cloneHailoRT
sourcescd `tappas_VERSION` mkdir hailort git clone https://github.com/hailo-ai/hailort.git hailort/sources
Install the following APT packages:
- ffmpeg
- x11-utils
- python3 (pip and setuptools)
Warning
Python 3.6 will be deprecated in TAPPAS future version
- python3-virtualenv
- python-gi-dev
- libgirepository1.0-dev
- gcc-9 and g++-9
- cmake
- libzmq3-dev
- git
To install the above packages, run the following command:
sudo apt-get install -y ffmpeg x11-utils python3-dev python3-pip python3-setuptools python3-virtualenv python-gi-dev libgirepository1.0-dev gcc-9 g++-9 cmake git libzmq3-dev
The following packages are required as well, and see their installation instructions below:
In case any requirements are missing, a requirements table will be printed when calling manual installation.
# Download Opencv and unzip
wget https://github.com/opencv/opencv/archive/4.5.2.zip
unzip 4.5.2.zip
# cd and make build dir
cd opencv-4.5.2
mkdir build
cd build
# Make and install
cmake -DOPENCV_GENERATE_PKGCONFIG=ON \
-DBUILD_LIST=core,imgproc,imgcodecs,calib3d,features2d,flann \
-DCMAKE_BUILD_TYPE=RELEASE \
-DWITH_PROTOBUF=OFF -DWITH_QUIRC=OFF \
-DWITH_WEBP=OFF -DWITH_OPENJPEG=OFF \
-DWITH_GSTREAMER=OFF -DWITH_GTK=OFF \
-DOPENCV_DNN_OPENCL=OFF -DBUILD_opencv_python2=OFF \
-DINSTALL_C_EXAMPLES=ON \
-DINSTALL_PYTHON_EXAMPLES=ON \
-DCMAKE_INSTALL_PREFIX=/usr/local ..
num_cores_to_use=$(($(nproc)/2))
make -j$num_cores_to_use
sudo make install
# Update the linker
sudo ldconfig
Run the following command to install GStreamer:
apt-get install -y libcairo2-dev libgirepository1.0-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio gcc-9 g++-9 python-gi-dev
Please refer to: GStreamer offical installation guide for more details
Run the following command to install PyGobject:
sudo apt install python3-gi python3-gi-cairo gir1.2-gtk-3.0
Please refer to: PyGobject offical installation guide for more details
On x86, run:
./install.sh --skip-hailort
And then, Make sure that HailoRT works
On Raspberry Pi, run:
./install.sh --skip-hailort --target-platform rpi
And then, Get back to Raspberry Pi section
To Upgrade TAPPAS, first clean GStreamer cache
rm -rf ~/.cache/gstreamer-1.0/
Remove old libgsthailotools.so
rm /usr/lib/$(uname -m)-linux-gnu/gstreamer-1.0/libgsthailotools.so
And then, TAPPAS installation section
In some sceneraios (especially aarch64), you might face the following error:
(gst-plugin-scanner:15): GStreamer-WARNING **: 13:58:20.557: Failed to load plugin '/usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstlibav.so': /lib/aarch64-linux-gnu/libgomp.so.1: cannot allocate memory in static TLS block
The solution is to export an enviroment variable:
export LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libgomp.so.1