Overview
This guide provides all the command-line code for setting up a Hailo AI accelerator on Raspberry Pi 5. The complete setup includes installing HailoRT 5.3.0, configuring the PCIe driver, installing GenAI Model Zoo, and running local AI models for text generation, vision understanding, and audio transcription.
What you'll set up:
- HailoRT 5.3.0 runtime and PCIe driver
- Python bindings for Hailo
- GenAI Model Zoo with Hailo-Ollama
- LLM text generation (Llama 3.2)
- Vision-Language Models (Qwen2-VL-2B)
- Audio transcription (Whisper-Base)
Prerequisites: Raspberry Pi 5 with Hailo AI accelerator module installed and latest Raspberry Pi OS.
Creating working folders (Page 22)
mkdir -p ~/hailo-5.3-test/{logs,test-assets,backups}
mkdir -p ~/hailo-5.3-test/packages
cd ~/hailo-5.3-test/packagesDownloading the Hailo files (Pages 23-24)
After downloading the required Hailo .deb packages and Python wheel from the Hailo developer zone, move them to the packages directory:
cd ~/Downloads
mv hailort-pcie-driver_5.3.0_all.deb ~/hailo-5.3-test/packages/
mv hailort_5.3.0_arm64.deb ~/hailo-5.3-test/packages/
mv hailort-5.3.0-cp313-cp313-linux_aarch64.whl ~/hailo-5.3-test/packages/
mv *gen*5.3*.deb ~/hailo-5.3-test/packages/ 2>/dev/null || true
mv *zoo*5.3*.deb ~/hailo-5.3-test/packages/ 2>/dev/null || trueThen verify:
cd ~/hailo-5.3-test/packages
ls -lhInstalling runtime packages (Page 25)
cd ~/hailo-5.3-test/packages
ls -lh *5.3*
for f in ./*5.3*.deb; do
echo "=============================="
echo "$f"
dpkg-deb -I "$f" | grep -Ei "Package:|Version:|Architecture:|Depends:"
done
sudo apt install --simulate ./hailort_5.3.0_arm64.deb \
./hailort-pcie-driver_5.3.0_all.deb
sudo apt install -y ./hailort_5.3.0_arm64.deb \
./hailort-pcie-driver_5.3.0_all.debVerifying Hailo runtime (Page 26)
dpkg -l | grep -Ei "hailo|hailort|h10|tappas"
lspci | grep -i hailo
lsmod | grep -i hailo
find /lib/modules/$(uname -r) -iname "*hailo*"
hailortcli scan
hailortcli fw-control identifyInstalling Hailo Python binding (Page 27)
python3 -m venv ~/hailo-5.3-test-venv
source ~/hailo-5.3-test-venv/bin/activate
pip install --upgrade pip
pip install ~/hailo-5.3-test/packages/hailort-5.3.0-cp313-cp313-linux_aarch64.whl
python3 - <<'PY'
import hailo_platform
print("hailo_platform import: OK")
PYInstalling GenAI Model Zoo (Page 28)
which hailo-ollama || echo "hailo-ollama not installed"
cd ~/hailo-5.3-test/packages
sudo apt install --simulate ./*gen*5.3*.deb ./*zoo*5.3*.deb
sudo apt install -y ./*gen*5.3*.deb ./*zoo*5.3*.deb
which hailo-ollama || echo "hailo-ollama still not installed"Starting Hailo-Ollama (Page 29)
In Terminal #1:
hailo-ollamaIn Terminal #2:
mkdir -p ~/hailo-5.3-test/logs/hailo-ollama
curl --silent http://localhost:8000/hailo/v1/list | jq \
| tee ~/hailo-5.3-test/logs/hailo-ollama/model-list.jsonRunning your first text prompt (Page 30)
sudo apt install -y time jq
/usr/bin/time -f "Elapsed: %E CPU: %P MemKB: %M" \
curl --silent -X POST http://localhost:8000/api/chat \
-H "Content-Type: application/json" \
-d '{
"model": "llama3.2:1b",
"messages": [
{
"role": "user",
"content": "Explain in five beginner-friendly sentences what local AI on a Raspberry Pi is useful for."
}
],
"stream": false
}' 2> ~/hailo-5.3-test/logs/hailo-ollama/llama3.2-1b-time.txt \
| jq | tee ~/hailo-5.3-test/logs/hailo-ollama/llama3.2-1b-output.jsonInstalling Hailo Apps without TAPPAS (Page 33-34)
cd ~
git clone https://github.com/hailo-ai/hailo-apps.git
cd hailo-apps
sudo ./install.sh --no-tappas-required \
| tee ~/hailo-5.3-test/logs/hailo-apps-install-no-tappas.txtMake HailoRT Python binding visible (Page 34):
sudo python3 -m pip install --break-system-packages \
~/hailo-5.3-test/packages/hailort-5.3.0-cp313-cp313-linux_aarch64.whl
python3 - <<'PY'
import hailo_platform
print("hailo_platform import: OK")
PY
sudo python3 - <<'PY'
import hailo_platform
print("sudo hailo_platform import: OK")
PYVision-Language Models (Pages 35-39)
List and download VLM resources (Page 35-36)
cd ~/hailo-apps
source setup_env.sh
hailo-download-resources --arch hailo10h --list-models \
| tee ~/hailo-5.3-test/logs/hailo-apps-resource-models.txt
grep -Ei "qwen|vl|vision|whisper|asr" \
~/hailo-5.3-test/logs/hailo-apps-resource-models.txt \
| tee ~/hailo-5.3-test/logs/model-family-search.txtDownload Qwen2-VL-2B (Page 36)
export hailort_version=5.3.0
export model_zoo_version=v5.3.0
export hailo_arch=hailo10h
export host_arch=aarch64
export resources_path=/usr/local/hailo/resources
export virtual_env_name=venv_hailo_apps
export tappas_version=-1
export tappas_postproc_path=/usr/local/hailo/tappas/post_processes
hailo-download-resources --arch hailo10h \
--group vlm_chat \
--resource-name "Qwen2-VL-2B-Instruct" \
--resource-type model \
--dry-run
hailo-download-resources --arch hailo10h \
--group vlm_chat \
--resource-name "Qwen2-VL-2B-Instruct" \
--resource-type model \
| tee ~/hailo-5.3-test/logs/download-qwen2-vl-2b.txt
sudo find /usr/local/hailo/resources -iname "*Qwen2-VL*" -o -iname "*qwen*vl*"Run VLM demo (Page 38-39)
python -m hailo_apps.python.gen_ai_apps.simple_vlm_chat.simple_vlm_chat \
--list-models \
| tee ~/hailo-5.3-test/logs/qwen-vl-list-models.txt
python -m hailo_apps.python.gen_ai_apps.simple_vlm_chat.simple_vlm_chat \
--hef-path /usr/local/hailo/resources/models/hailo10h/Qwen2-VL-2B-Instruct.hef \
| tee ~/hailo-5.3-test/logs/simple-qwen2-vl-output.txtAudio transcription with Whisper (Pages 46-48)
Download Whisper-Base (Page 46)
hailo-download-resources --arch hailo10h \
--group whisper_chat \
--resource-name "Whisper-Base" \
--resource-type model \
--dry-run
hailo-download-resources --arch hailo10h \
--group whisper_chat \
--resource-name "Whisper-Base" \
--resource-type model \
| tee ~/hailo-5.3-test/logs/download-whisper-base.txt
sudo find /usr/local/hailo/resources -iname "*Whisper-Base*" -o -iname "*whisper*base*"Run audio transcription (Page 47)
cd ~/hailo-apps
source setup_env.sh
python -m hailo_apps.python.gen_ai_apps.simple_whisper_chat.simple_whisper_chat \
--audio $(find ~/hailo-apps -iname "audio.wav" | head -1) \
--hef-path /usr/local/hailo/resources/models/hailo10h/Whisper-Base.hef \
| tee ~/hailo-5.3-test/logs/whisper-base-output.txt
/usr/bin/time -f "Elapsed: %E CPU: %P MemKB: %M" \
python -m hailo_apps.python.gen_ai_apps.simple_whisper_chat.simple_whisper_chat \
--audio $(find ~/hailo-apps -iname "audio.wav" | head -1) \
--hef-path /usr/local/hailo/resources/models/hailo10h/Whisper-Base.hef \
2> ~/hailo-5.3-test/logs/whisper-base-time.txt \
| tee ~/hailo-5.3-test/logs/whisper-base-output.txtGenerate test audio (Page 48)
arecord -l
sudo apt install -y espeak-ng ffmpeg
mkdir -p ~/hailo-5.3-test/test-assets
espeak-ng -w ~/hailo-5.3-test/test-assets/test-whisper.wav \
"This is a local speech recognition test on Raspberry Pi using Hailo Whisper Base."
ffmpeg -y -i ~/hailo-5.3-test/test-assets/test-whisper.wav \
-ar 16000 -ac 1 -sample_fmt s16 \
~/hailo-5.3-test/test-assets/test-whisper-16k.wavTroubleshooting (Pages 57-66)
Package verification (Page 57)
cd ~/hailo-5.3-test/packages
ls -lh *5.3*
for f in ./*5.3*.deb; do
echo "=============================="
echo "$f"
dpkg-deb -I "$f" | grep -Ei "Package:|Version:|Architecture:|Depends:"
done
sudo apt install --simulate ./hailort_5.3.0_arm64.deb \
./hailort-pcie-driver_5.3.0_all.debDKMS build failure (Page 58)
dpkg -l | grep -Ei "hailo|hailort|h10|tappas"
sudo dpkg --audit
sudo tail -n 200 /var/log/hailort-pcie-driver.deb.log
sudo grep -R "del_timer_sync" \
/usr/src/hailort-pcie-driver \
/usr/src/hailo1x_pci-5.3.0 \
/var/lib/dkms/hailo1x_pci/5.3.0 2>/dev/null
sudo grep -RIl "del_timer_sync" \
/usr/src/hailort-pcie-driver \
/usr/src/hailo1x_pci-5.3.0 \
/var/lib/dkms/hailo1x_pci/5.3.0 2>/dev/null \
| xargs -r sudo sed -i 's/del_timer_sync/timer_delete_sync/g'
sudo dkms remove hailo1x_pci/5.3.0 --all || true
sudo dpkg --configure -a
dpkg -l | grep -Ei "hailo|hailort|h10|tappas"
dkms status | grep -i hailoHardware verification (Page 60)
lspci | grep -i hailo
lsmod | grep -i hailo
find /lib/modules/$(uname -r) -iname "*hailo*"
hailortcli scan
hailortcli fw-control identifyPython binding visibility (Page 61)
python3 - <<'PY'
try:
import hailo_platform
print("hailo_platform import: OK")
except Exception as e:
print("hailo_platform import failed:")
print(e)
PY
sudo python3 -m pip install --break-system-packages \
~/hailo-5.3-test/packages/hailort-5.3.0-cp313-cp313-linux_aarch64.whlServer and curl issues (Page 62)
which hailo-ollama || echo "hailo-ollama not installed"
hailo-ollama # Terminal 1
ss -ltnp | grep 8000 # Terminal 2
curl --silent http://localhost:8000/hailo/v1/list | jq
curl --silent -X POST http://localhost:8000/api/chat \
-H "Content-Type: application/json" \
-d '{"model":"llama3.2:1b","messages":[{"role":"user","content":"Hello"}],"stream":false}' | jqModel download problems (Page 63-64)
cd ~/hailo-apps
source setup_env.sh
export hailort_version=5.3.0
export model_zoo_version=v5.3.0
export hailo_arch=hailo10h
export host_arch=aarch64
export resources_path=/usr/local/hailo/resources
export virtual_env_name=venv_hailo_apps
export tappas_version=-1
export tappas_postproc_path=/usr/local/hailo/tappas/post_processes
hailo-download-resources --arch hailo10h \
--group vlm_chat \
--resource-name "Qwen2-VL-2B-Instruct" \
--resource-type model \
--dry-run
sudo find /usr/local/hailo/resources \
-iname "*Qwen2.5-1.5B-Instruct*" -deleteFinal verification (Page 65)
dpkg -l | grep -Ei "hailo|hailort|h10|tappas|gen|zoo"
lspci | grep -i hailo
lsmod | grep -i hailo
hailortcli scan
hailortcli fw-control identify
python3 - <<'PY'
import hailo_platform
print("hailo_platform import: OK")
PYCleanup and final report (Page 66)
mkdir -p ~/hailo-5.3-test/final-report
cp -r ~/hailo-5.3-test/logs/* ~/hailo-5.3-test/final-report/ 2>/dev/null || true
cat /etc/os-release | tee ~/hailo-5.3-test/final-report/os-release.txt
uname -a | tee ~/hailo-5.3-test/final-report/uname.txt
dpkg -l | grep -Ei "hailo|hailort|h10|tappas|gen|zoo" \
| tee ~/hailo-5.3-test/final-report/hailo-packages.txt
lspci | grep -i hailo | tee ~/hailo-5.3-test/final-report/lspci-hailo.txt
lsmod | grep -i hailo | tee ~/hailo-5.3-test/final-report/lsmod-hailo.txt
hailortcli scan | tee ~/hailo-5.3-test/final-report/hailortcli-scan.txt
hailortcli fw-control identify | tee ~/hailo-5.3-test/final-report/hailortcli-identify.txt
find /usr/local/hailo/resources/models/hailo10h -maxdepth 1 -type f -name "*.hef" -ls \
| tee ~/hailo-5.3-test/final-report/hailo10h-model-files.txt
cd ~
tar -czf hailo-5.3-test-final-report.tar.gz hailo-5.3-test/final-report
ls -lh hailo-5.3-test-final-report.tar.gz