docs(axelera): concrete Docker image recipe and model download guide

* installation.md: replace the hand-waved 'custom image' note with a
  reference Dockerfile that installs the Voyager SDK into the image
  (apt deps, axelera-rt/devkit from the Axelera index, make operators)
  and keeps the /dev/metis passthrough instructions.
* object_detectors.md: document axelera model sourcing under
  'Downloading YOLO Models' (model-zoo preset, axzoo/axcompile, HF
  hosting, default model auto-download).
This commit is contained in:
patrykorwat 2026-08-18 10:58:15 +00:00
parent c43a95bfe2
commit 2e20beee95
2 changed files with 51 additions and 1 deletions

View File

@ -806,3 +806,14 @@ The integration runs inference through a single stream created with `create_infe
The Metis board needs models compiled for its architecture. Compile them from the Voyager model zoo with the SDK tooling, e.g. `axzoo build yolov8n_coco --backend axrelay --cal-source repr` (or compile a custom ONNX model with `axcompile`, see [Building a model](/frigate/installation#building-a-model)), producing a `.axm` file or a compiled model directory. Host the compiled model anywhere reachable, e.g. on Hugging Face, and point `model.path` at it. Plain strings in `model.path` are treated as SDK model-zoo preset names; anything else is treated as a file (downloaded from a URL or used in place).
:::
### Downloading YOLO Models
#### Axelera Metis
The Metis board runs models compiled for its architecture (`.axm` files, or a compiled model directory). Two options are available:
- **SDK model-zoo preset (no compilation or download needed):** the `yolov8n-coco` preset ships with the Voyager SDK. Select it with `model.path: yolov8n-coco`.
- **Compiled model:** build one with the SDK tooling, e.g. `axzoo build yolov8n_coco --backend axrelay --cal-source repr` (model zoo) or `axcompile -i model.onnx -o compiled/` (custom ONNX). See [Building a model](/frigate/installation#building-a-model).
Host the compiled model somewhere Frigate can reach (a local path or an HTTP URL, e.g. on Hugging Face) and point `model.path` at it. With no `model.path`, the detector downloads its compiled default model into the model cache on first startup (a preset hosted on Hugging Face; see `AX_DEFAULT_URL` in the plugin source). Set `model.width` and `model.height` to the compiled model's input size.

View File

@ -535,7 +535,46 @@ To use a custom model in Frigate, configure [hardware object detection](/configu
Frigate must be able to reach the Metis device. After installing the driver, verify the device is present with `ls /dev/metis*`. Grant the user running Frigate read/write access on the Metis device nodes; the installer creates an `axelera` group for this purpose.
Because the Voyager SDK is installed into a Python environment on the host, the plain Frigate Docker image cannot load it. Use a custom image with the SDK installed, then pass the Metis device into the container. Add the following lines to your `docker-compose.yml`:
The Voyager SDK is a Python package (`axelera.app`), so the plain Frigate Docker image cannot load it: the detector imports the SDK inside Frigate's own process. Build a custom image with the SDK installed, then pass the Metis device into the container.
#### Building a custom image
The following reference `Dockerfile` follows the SDK's own installation flow (`install-dependencies.sh`, `pip install axelera-rt`/`axelera-devkit`, `make operators`) and installs the SDK into the image's Python environment so the `axelera` plugin can import it in-process:
```dockerfile
FROM ghcr.io/blakeblackshear/frigate:stable
# Build dependencies for the SDK operators (same set as the SDK install-dependencies.sh).
RUN apt-get update && apt-get install --no-install-recommends -y \
clinfo g++ gcc glslang-tools graphviz gstreamer1.0-libav \
gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-rtsp \
gstreamer1.0-tools libavcodec-dev libavformat-dev libavutil-dev \
libcairo2-dev libeigen3-dev libgirepository1.0-dev \
libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev libavdevice-dev \
libopencv-dev libqt6svg6-dev libsimde-dev libswscale-dev libva-dev \
libvulkan1 ninja-build nlohmann-json3-dev ocl-icd-opencl-dev \
opencl-headers pkg-config python3-dev unzip wget \
&& rm -rf /var/lib/apt/lists/*
# Voyager SDK installed into the image Python (no venv: Frigate runs as `python3`,
# so the SDK must be importable from the system site-packages).
RUN python3 -m pip install --no-cache-dir \
--extra-index-url https://software.axelera.ai/artifactory/api/pypi/axelera-pypi/simple \
'axelera-rt==1.7.0' 'axelera-devkit[all]==1.7.0'
# Compile the SDK operators for this host architecture (run with the SDK runtime
# activated, as the SDK Makefile requires).
RUN git clone --depth 1 https://github.com/axelera-ai-hub/voyager-sdk.git /opt/voyager-sdk \
&& cd /opt/voyager-sdk && make operators
```
:::note
The operator build is architecture-specific. Build and validate the image on the same host architecture (and with the same SDK version) as the Metis card, and match the `axelera-rt`/`axelera-devkit` versions to the installed kernel driver.
:::
Then pass the Metis device into the container. Add the following lines to your `docker-compose.yml`:
```yaml
devices: