This guide covers the Pi-first deployment paths added for RTSPanda without changing the default x86/GPU workflow.
Runs:
rtspanda-pionly- Go backend
- Embedded frontend
- mediamtx
Does not run:
- local AI worker
- model download/export during Pi startup
Start it:
git clone https://github.com/248Tech/RTSPanda.git
cd RTSPanda
chmod +x ./scripts/pi-*.sh
./scripts/pi-up.shThis is equivalent to:
docker compose -f docker-compose.yml -f docker-compose.standalone.yml --profile pi build rtspanda-pi
docker compose -f docker-compose.yml -f docker-compose.standalone.yml --profile pi up -d --no-build rtspanda-piIf AI_WORKER_URL is not set, the Pi stays usable for RTSP ingestion, playback, and recording while detection health remains degraded.
Point the Pi at a second machine running the standalone AI worker:
export AI_WORKER_URL="http://192.168.1.50:8090"
./scripts/pi-up.shThe Pi continues to:
- ingest RTSP streams
- capture frames with ffmpeg
- forward frames over HTTP to the remote AI worker
Running the full local YOLO AI worker on a Pi is not recommended and is not a supported configuration. Raspberry Pi does not support real-time YOLO inference (see DEC-018):
- YOLOv8n ONNX requires ~400–600 MB RAM at runtime, consuming nearly all headroom on a 4 GB Pi running the full stack.
- ONNX Runtime on arm64 runs at 3–8 FPS on Pi 4 CPU — not viable for real-time alerting.
- Thermal throttling degrades performance under sustained load.
Use remote AI worker (Mode 2 above) instead. If you have a second machine available on the LAN, the Pi + remote worker split is the correct architecture for Pi deployments.
For snap-based AI analysis on Pi without a remote worker, use Snapshot AI (Mode 1 with SNAPSHOT_AI_ENABLED=true).
The AI worker is ONNX-only in Docker.
Default behavior:
export MODEL_SOURCE=remote
export YOLO_MODEL_NAME=yolo11n
export YOLO_MODEL_RELEASE=v8.3.0Optional explicit URL:
export YOLO_MODEL_URL="https://your-mirror.example/yolo11n.onnx"Place a prebuilt model at either location before building:
./model.onnx
./ai_worker/model/model.onnx
Then set:
export MODEL_SOURCE=local
PI_DEPLOYMENT_MODE=full ./scripts/pi-up.shFor native or custom Docker runs, mount a model at:
/model/model.onnx
Backend:
curl -s http://127.0.0.1:8080/api/v1/health
curl -s http://127.0.0.1:8080/api/v1/health/ready
curl -s http://127.0.0.1:8080/api/v1/detections/healthThe detection health payload now includes:
ai_modeai_worker_urldetector_url
- Raspberry Pi 4/5 works best with the lightweight Pi mode.
- Remote AI mode gives the cleanest first-run result on Pi because the worker is not built or run locally.
- Full local-AI mode is viable on 64-bit Pi OS with enough RAM, but inference throughput is still CPU-limited.
- 32-bit Pi OS is not recommended for the AI worker.
- The Docker AI worker will not export models or install PyTorch as a fallback.
- In lightweight mode, detection remains degraded until
AI_WORKER_URLorDETECTOR_URLis configured.