i use several way to convert my onnx to hef from l...

Created on: February 22, 2026

Answered using GPT-5.2 Thinking by Chat01

Question

i use several way to convert my onnx to hef from linux terminal (hailo ai sw suit version) , i had some sucess in built that they dont work good on my hailo and alots of fail that the building hef be unsuccessful (for example in my system the alls file is just accetable if it be one line with one syntax and on other way we got parsing error).so i search a lot and this problems maybe come from the version bug and some references told to use instalation of hailo with docker, i am very new to docker, i want you to compeletly tell me how to install docker, then install hailo's docker version in my docker, how to active docker and how to use hailo on my docker and how build hef with docker

Thought

Citing relevant Docker and Hailo commands

The community post mentions hailo optimize, hailo compile, and hailo parse commands, and also the hailo tutorial inside Docker, which I’ll cite. The Docker packaging includes the hailo_ai_sw_suite_docker_run.sh script, from Dylan and Macnica, which I'll also reference. For user issues with parsing .alls scripts, I’ll mention that Docker isolates the environment and note .alls scripts are provided in the Model Zoo for defaults, and custom models should build off that.

Providing a structured Docker setup for Hailo

I'll mention that being part of the Docker group gives root-level privileges, which is noted in the Docker post-installation doc. I'll base the setup on Ubuntu 22.04/24.04, since that's what Hailo DFC is designed for, but will adjust if another distro is in use. I’ll include steps from installing Docker, verifying installation, to extracting the Hailo Docker zip, and running the provided script to enter the container, including the option to resume.

Providing Docker setup and HEF build steps

I’ll guide the user through using hailo_ai_sw_suite_2024-10.tar.gz and the associated script for loading the Docker image, as Hailo provides a script that might run the load and run commands automatically. I'll explain Docker concepts, containers, and images. Then, I'll provide step-by-step instructions for building the HEF file, including using the correct hardware architecture for the Hailo-8/8L. Lastly, I’ll note the need for a specific model zoo version for Hailo-8 hardware.

Crafting Docker installation steps for Ubuntu

I'll walk through installing Docker on Ubuntu 22.04/24.04, focusing on removing conflicting packages, adding repositories, and installing Docker packages. Then, I'll explain how to verify the installation and enable the service. I'll also discuss how to use Docker without sudo, but with a security caution about the root-level privileges of the Docker group.

Creating Instructions for Hailo AI Docker Setup and HEF Building

To set up Docker with Hailo, both the software package and PCIe driver need downloading. I’ll include instructions for extracting the zip and using either a run script or manual commands to load the image.

For building HEF, I'll explain parsing ONNX, optimizing, and compiling using Hailo CLI, along with setting up the workspace and using model scripts. I'll also provide useful links and mention the use of Hailo Model Zoo for compatible models.

Providing Instructions for HEF Creation with Hailo Model Zoo

When using Hailo Model Zoo, ensure you're using the correct branch for your hardware. For Hailo-8/8L, opt for v2.x with DFC v3.x. Use the provided commands to parse, optimize, and compile models. I’ll also suggest troubleshooting tips like correcting line break issues in .alls files using Unix line endings.

Clarifying Docker Setup for Hailo AI Software

To install the Hailo AI suite in Docker, you don’t need to install it via apt—it's already included in the Docker image. From Docker, run commands like hailomz parse & hailomz compile inside the container. I’ll ensure the explanation is clear, with assumptions about Ubuntu and concise steps like systemctl for the Docker service.

Thought for 3m 34s

Answer

Below is an end-to-end “copy/paste” guide for doing ONNX → HEF using Hailo’s Docker-based AI Software Suite on Linux, plus the basics of Docker (install, start/enable, run containers).

I’ll assume you’re on Ubuntu 22.04 or 24.04 x86_64, because that’s the most common setup for Hailo’s toolchain. If you’re on another distro, the Docker part is the same idea, but use the install page for your distro. (Docker Documentation)


0) What Docker is (in 30 seconds)

  • Image = a packaged environment (OS + tools) (e.g., “Hailo AI Software Suite”).
  • Container = a running instance of an image.
  • The Docker daemon runs in the background and starts containers.

1) Install Docker Engine on Ubuntu (recommended method)

1.1 Remove conflicting packages (safe even if nothing is installed)

bash
sudo apt update sudo apt remove $(dpkg --get-selections docker.io docker-compose docker-compose-v2 docker-doc podman-docker containerd runc | cut -f1)

(These are the packages Docker warns can conflict.) (Docker Documentation)

1.2 Add Docker’s official apt repo + install Docker

bash
sudo apt update sudo apt install ca-certificates curl sudo install -m 0755 -d /etc/apt/keyrings sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc sudo chmod a+r /etc/apt/keyrings/docker.asc sudo tee /etc/apt/sources.list.d/docker.sources <<EOF Types: deb URIs: https://download.docker.com/linux/ubuntu Suites: $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") Components: stable Signed-By: /etc/apt/keyrings/docker.asc EOF sudo apt update sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

These commands are straight from Docker’s Ubuntu install guide. (Docker Documentation)

1.3 Start/enable Docker (“activate docker”)

bash
sudo systemctl start docker sudo systemctl enable docker.service sudo systemctl enable containerd.service

Enabling on boot is recommended. (Docker Documentation)

1.4 Quick test

bash
sudo docker run hello-world

Docker uses this as the standard verification test. (Docker Documentation)

1.5 (Optional) Run docker without sudo

bash
sudo groupadd docker sudo usermod -aG docker $USER newgrp docker docker run hello-world

Important security note: the docker group effectively grants root-level power. (Docker Documentation)


2) Get Hailo’s Docker package (AI Software Suite – Docker)

Hailo typically provides the Docker suite as a downloadable archive from their Developer Zone, often containing:

  • a hailo_ai_sw_suite_<version>.tar.gz (Docker image tarball)
  • a helper script like hailo_ai_sw_suite_docker_run.sh (Dylan Tintenfich)

A common flow described by vendors/users is:

  • Download “Hailo AI Software Suite – Docker”
  • (If you need PCIe device access) also download/install the HailoRT PCIe driver deb, then reboot (Macnica)

Example shown:

bash
sudo dpkg --install hailort-pcie-driver_4.17.0_all.deb sudo reboot

(Macnica)

If you are only compiling HEF, you often don’t need the PCIe driver. You mainly need it if you want hailortcli scan / hardware inference from inside the container.


3) Load the Hailo Docker image + enter the container

Option A (simplest): use Hailo’s provided run script

After unzipping:

bash
chmod +x hailo_ai_sw_suite_docker_run.sh ./hailo_ai_sw_suite_docker_run.sh

To re-enter the same container later:

bash
./hailo_ai_sw_suite_docker_run.sh --resume

(Macnica)

Option B (manual): docker load then docker run

If your download includes a *.tar.gz image, load it:

bash
docker load -i hailo_ai_sw_suite_2024-10.tar.gz docker images

(Dylan Tintenfich)

Then run a container. If you want the container to access devices/drivers on the host, a known-working pattern is:

bash
docker run -it --name hailo_container --privileged --network host \ -v /dev:/dev \ -v /lib/firmware:/lib/firmware \ -v /lib/udev/rules.d:/lib/udev/rules.d \ -v /lib/modules:/lib/modules \ -v /home/$USER/hailo_workspace:/workspace \ hailo_ai_sw_suite_2024-10:1

And single-line form (useful if your shell hates line breaks):

bash
docker run -it --name hailo_container --privileged --network host -v /dev:/dev -v /lib/firmware:/lib/firmware -v /lib/udev/rules.d:/lib/udev/rules.d -v /lib/modules:/lib/modules -v /home/$USER/hailo_workspace:/workspace hailo_ai_sw_suite_2024-10:1

(Dylan Tintenfich)


4) Verify Hailo tools inside the container

Once you’re inside:

bash
hailo -h

If you installed drivers and passed devices through, you can also try:

bash
hailortcli scan

These are commonly used sanity checks. (Macnica)

Also, inside the Docker, Hailo support often points people to:

bash
hailo tutorial

(which starts a tutorial/Jupyter flow for each step of conversion). (Hailo Community)


5) Build a HEF inside Docker (two practical workflows)

Workflow 1: Dataflow Compiler CLI (most general for “any ONNX”)

This is the classic 3-step pipeline:

  1. parse ONNX → HAR
  2. optimize HAR (needs calibration + model script / ALLS)
  3. compile optimized HAR → HEF

Hailo community examples show:

bash
# 1) Parse (ONNX -> .har) hailo parser onnx ./model.onnx --hw-arch hailo8l --end-node-names <...> # 2) Optimize (.har -> optimized .har) hailo optimize <har-file> --hw-arch <hailo-board> --model-script <.alls-file> --calib-set-path <calibration-dataset> # 3) Compile (optimized .har -> .hef) hailo compiler <optimized-har-file> --hw-arch <hailo-board>

(Hailo Community)

Notes that matter a lot:

  • Pick --hw-arch correctly (e.g., hailo8 vs hailo8l).
  • Your .alls matters a LOT. If you don’t have one, start from a Model Zoo ALLS for a similar network (Hailo community recommends this). (Hailo Community)
  • To discover flags/options:
bash
hailo -h

(Hailo Community)


Workflow 2: Hailo Model Zoo (hailomz) (best when your model matches a supported architecture like YOLO)

If you’re doing YOLO-family models, hailomz can be smoother because it already knows lots of configs/scripts.

Model Zoo’s own “Getting Started” shows the commands for:

  • parse: hailomz parse …
  • optimize: hailomz optimize … --calib-path …
  • compile: hailomz compile … --hw-arch … (GitHub)

A commonly used YOLO-style flow (example):

bash
cd /workspace/models # Parse (custom checkpoint) hailomz parse --hw-arch hailo8l --ckpt model.onnx yolov8n # Optimize (calibration) hailomz optimize --hw-arch hailo8l --calib-path /workspace/calib --resize 640 640 --classes 80 --har yolov8n.har yolov8n --performance # Compile (HEF) hailomz compile yolov8n --hw-arch hailo8l --calib-path /workspace/calib --resize 640 640 --classes 80 --har yolov8n.har --performance

(Those exact flags/structure are shown in a Docker-based ONNX→HEF walkthrough.) (Dylan Tintenfich)

Very important compatibility note (Hailo-8 / Hailo-8L users):
The official Model Zoo repo warns that Hailo-8/8L use the v2.x branch with DFC v3.x, while master targets newer devices. So match your suite/tools versions carefully. (GitHub)


6) Fix the “my .alls only works in one line / parsing errors” problem (common causes)

Two very common causes when moving scripts between editors/systems:

A) Windows CRLF line endings inside .alls

If your .alls was edited on Windows, convert it:

bash
sudo apt install dos2unix dos2unix your_script.alls

Or:

bash
sed -i 's/\r$//' your_script.alls

B) Hidden non-ASCII quotes

If you copied flags like “hailo8l” (curly quotes) from web pages, replace them with normal quotes "hailo8l".

This single issue causes tons of “why won’t it parse” pain.


7) The “recommended minimal routine” (what I’d actually do)

  1. Install Docker (Section 1).
  2. Download Hailo AI Software Suite – Docker (Section 2).
  3. Run ./hailo_ai_sw_suite_docker_run.sh (Section 3 Option A). (Macnica)
  4. Inside Docker, run hailo tutorial once and follow the notebooks to generate a working HEF pipeline. (Hailo Community)
  5. When your pipeline works, copy your commands into a script so you can reproduce it.

If you paste (a) your Hailo device type (Hailo-8 vs Hailo-8L), and (b) the exact ONNX model type (YOLOv5/8/9? classification? segmentation?), I can give you the exact hailo parser … end-node-names … and a sane starting .alls strategy.

Share this Q&A