Guide: Installing HailoRT 4.18 and Driver on Raspberry Pi 5
This guide covers the manual installation of HailoRT 4.18 and its driver on a Raspberry Pi 5, including setup for the Python API.
Clean Installation
Step 1: Remove Old Installations
Run the following commands:
sudo dpkg --purge hailort hailo-all hailofw hailo-tappas-core-3.28.2 hailort-pcie-driver
Then, check for any remaining Hailo files:
find /usr/lib/ | grep hailo
Delete any remaining Hailo files found.
Step 2: Install DKMS
Ensure DKMS is installed:
sudo apt install dkms
Step 3: Prepare Installation Files
Copy these files to your Raspberry Pi:
hailort_4.18.0_arm64.deb
hailort-4.18.0-cp311-cp311-linux_aarch64.whl
hailort-pcie-driver_4.18.0_all.deb
Step 4: Install the Driver
Install the PCIe driver:
sudo dpkg --install Downloads/hailort-pcie-driver_4.18.0_all.deb
Reboot your Raspberry Pi.
Step 5: Install HailoRT
Install HailoRT:
sudo dpkg --install Downloads/hailort_4.18.0_arm64.deb
Step 6: Set Up Python Environment
Create a virtual environment and install pyHailoRT:
python3 -m venv hailo_platform_venv
source hailo_platform_venv/bin/activate
pip install ./hailort-4.18.0-cp311-cp311-linux_aarch64.whl
Note: Replace <python_version>
, <version>
, <python_tag>
, <abi_tag>
, and <platform_tag>
with the appropriate values for your system and the HailoRT version youâre installing.
PCIe Page Size Issue:
Some hosts (Like the Pi) do not support certain PCIe descriptor page sizes.
If you get an error like this:
[HailoRT] [error] CHECK_AS_EXPECTED failed - max_desc_page_size given 16384 is bigger than hw max desc page size 4096
Make sure the /etc/modprobe.d/hailo_pci.conf
exists and contains the following line:
options hailo_pci force_desc_page_size=4096
To complete the installation process reboot your Pi. You can now use the HailoRT Python API within the created virtual environment.
If you want only the Python API and donât use the rpi5 example with tappas and Gstreamer then you can skip this part.
Step 7: Install Tappas Core
First, ensure that you have all the necessary dependencies installed:
sudo apt-get install -y rsync ffmpeg x11-utils python3-dev python3-pip python3-setuptools python3-virtualenv python-gi-dev libgirepository1.0-dev gcc-12 g++-12 cmake git libzmq3-dev
If you havenât already installed OpenCV and GStreamer (these might be installed if you were using HailoRT 4.18), make sure to do so.
Next, download the tappas_3.29.1_installer
from the Hailo Developer Zone.
Once downloaded, install it by following the Guide in here: tappas/docs/installation/manual-install.rst at master · hailo-ai/tappas · GitHub
Note for Non-x86 Platforms
- Unzip the TAPPAS installer:
unzip tappas_VERSION_linux_installer.zip
- Change the directory to TAPPAS, create a directory named
hailort
, and clone theHailoRT
sources:
cd tappas_VERSION
mkdir hailort
git clone https://github.com/hailo-ai/hailort.git hailort/sources
- To ensure compatibility with Raspberry Pi 5, make the following adjustment:In the
downloader/common.py
file of the decompressed TAPPAS directory, add a new line to include Raspberry Pi 5 as a valid platform option:
class Platform(Enum):
X86 = 'x86'
ARM = 'arm'
IMX8 = 'imx8'
Rockchip = 'rockchip'
RaspberryPI = 'rpi'
RaspberryPI5 = 'rpi5' # added this line
- Run the installation script with the
rpi5
target platform:
./install.sh --skip-hailort --target-platform rpi5