원클릭으로
raspberry-pi
Raspberry Pi 5 and Hailo-10H NPU system management
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Raspberry Pi 5 and Hailo-10H NPU system management
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | raspberry-pi |
| description | Raspberry Pi 5 and Hailo-10H NPU system management |
This skill provides practical guidance for deploying Hailo-10H services on Raspberry Pi 5—aimed at personal projects, art installations, and experimentation. Pragmatism over perfection; if it works reliably on the Pi, it's good enough.
Scope: Initial system setup, device access, thermal management, systemd service patterns, debugging.
Raspberry Pi 5:
AI HAT+ 2 with Hailo-10H:
hailo-h10-all package (NOT hailo-all for legacy boards)/dev/hailo0 device file0000:01:00.0 PCIe addressBefore any AI service deployment:
sudo apt update
sudo apt full-upgrade -y
sudo rpi-eeprom-update -a
sudo reboot
sudo apt install dkms hailo-h10-all
sudo reboot
# Check device detection
hailortcli fw-control identify
# Check kernel logs
dmesg | grep -i hailo | tail -20
Expected output shows: Firmware was loaded successfully and device registered as /dev/hailo0.
vcgencmd measure_temp or /sys/class/thermal/thermal_zone0/temp[Unit]
Description=Hailo Ollama AI Service
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=hailo
Group=hailo
WorkingDirectory=/opt/hailo/ollama
ExecStart=/usr/local/bin/hailo-ollama-service
Restart=always
RestartSec=10
StandardOutput=journal
StandardError=journal
# Resource limits for Raspberry Pi
MemoryLimit=2G
CPUQuota=75%
[Install]
WantedBy=multi-user.target
# Create dedicated user with no shell, no home
sudo useradd -r -s /usr/sbin/nologin -d /opt/hailo hailo
# Add to groups for device access
sudo usermod -aG hailo,plugdev,dialout hailo
# Hailo device group (usually created by hailo-h10-all package)
# If missing: sudo groupadd hailo && sudo chgrp hailo /dev/hailo0 && sudo chmod g+rw /dev/hailo0
Default approach: Per-service virtual environment in /opt
Python-based Hailo services (e.g., hailo-clip, hailo-vision, hailo-whisper) use isolated virtual environments to:
Standard pattern:
# Installer creates dedicated venv per service
python3 -m venv /opt/hailo-service-name/venv
/opt/hailo-service-name/venv/bin/pip install -r requirements.txt
# systemd unit references venv Python
ExecStart=/opt/hailo-service-name/venv/bin/python3 /opt/hailo-service-name/service.py
Why /opt?
/usrAlternative: Packaged binaries (PyInstaller, Nuitka, PEX)
Use when installation simplicity outweighs build complexity:
Not recommended: System Python with pip
Avoiding system Python prevents:
Service-specific considerations:
# In installer script, ensure proper device permissions:
if [ -e /dev/hailo0 ]; then
sudo chgrp hailo /dev/hailo0
sudo chmod g+rw /dev/hailo0
else
echo "ERROR: /dev/hailo0 not found. Hailo driver not installed."
exit 1
fi
# Multiple services can share /dev/hailo0 access
# Each service user should be in the 'hailo' group:
sudo usermod -aG hailo hailo-ollama-user
sudo usermod -aG hailo hailo-whisper-user
# etc.
127.0.0.1:PORT; use systemd socket activation or reverse proxy for external access# View service logs
sudo journalctl -u hailo-ollama.service -f
# Filter by priority
sudo journalctl -u hailo-ollama.service -p err..alert
# Export to file for analysis
sudo journalctl -u hailo-ollama.service -o json > service_logs.json
# Verify driver loaded
lsmod | grep hailo
# Check PCIe device
lspci | grep -i hailo
# If missing, reinstall:
sudo apt install --reinstall hailo-h10-all
sudo reboot
/dev/hailo0# Check ownership and permissions
ls -l /dev/hailo0
# Ensure service user is in hailo group
id hailo-service-user
# If not, add with: sudo usermod -aG hailo hailo-service-user
# Then restart service: sudo systemctl restart service-name
# Check total memory consumption
free -h
# Identify which service is using most memory
ps aux --sort=-%mem | grep hailo
# Reduce memory per service:
# - Use smaller models (e.g., orca-mini instead of llama2)
# - Unload models via /api/unload when not in use
# - Reduce number of concurrent services
# Check current temperature
vcgencmd measure_temp
# Monitor over time
watch -n 1 vcgencmd measure_temp
# Check throttle history
vcgencmd get_throttled # Returns hex bitmask; decode at https://www.raspberrypi.org/forums/
# Check unit status
sudo systemctl status hailo-ollama.service
# View error logs
sudo journalctl -u hailo-ollama.service -n 50
# Test service startup manually
sudo systemctl start hailo-ollama.service
# Validate unit file syntax
sudo systemd-analyze verify hailo-ollama.service
# Check current governor
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
# Set to performance (higher power, lower latency)
echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
# Disable swap if performance-critical
sudo dphys-swapfile disable
# Check available memory
free -h
Reference Files:
reference_documentation/system_setup.md - Full setup walkthrough