From a7ceb955d8eb92b48a0554585575a23b7b2e89bb Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Wed, 23 Oct 2024 06:57:18 -0500 Subject: [PATCH] update to hailo driver 4.19 --- docker/hailo8l/Dockerfile | 9 +++++++-- docker/hailo8l/user_installation.sh | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/docker/hailo8l/Dockerfile b/docker/hailo8l/Dockerfile index 479ef9b27..6b62f38c8 100644 --- a/docker/hailo8l/Dockerfile +++ b/docker/hailo8l/Dockerfile @@ -2,6 +2,9 @@ ARG DEBIAN_FRONTEND=noninteractive +# NOTE: also update user_installation.sh +ARG HAILO_VERSION=4.19.0 + # Build Python wheels FROM wheels AS h8l-wheels @@ -19,6 +22,7 @@ RUN pip3 wheel --wheel-dir=/h8l-wheels -c /requirements-wheels.txt -r /requireme # Build HailoRT and create wheel FROM wheels AS build-hailort ARG TARGETARCH +ARG HAILO_VERSION SHELL ["/bin/bash", "-c"] @@ -50,7 +54,7 @@ RUN PYTHON_VERSION=$(python3 --version 2>&1 | awk '{print $2}' | cut -d. -f1,2) RUN . /etc/environment && \ git clone https://github.com/hailo-ai/hailort.git /opt/hailort && \ cd /opt/hailort && \ - git checkout v4.18.0 && \ + git checkout v${HAILO_VERSION} && \ cmake -H. -Bbuild -DCMAKE_BUILD_TYPE=Release -DHAILO_BUILD_PYBIND=1 -DPYBIND11_PYTHON_VERSION=${PYTHON_VERSION} && \ cmake --build build --config release --target libhailort && \ cmake --build build --config release --target _pyhailort && \ @@ -76,6 +80,7 @@ RUN cd /opt/hailort/hailort/libhailort/bindings/python/platform && \ # Use deps as the base image FROM deps AS h8l-frigate +ARG HAILO_VERSION # Copy the wheels from the wheels stage COPY --from=h8l-wheels /h8l-wheels /deps/h8l-wheels @@ -91,7 +96,7 @@ RUN pip3 install -U /deps/hailo-wheels/*.whl RUN . /etc/environment && \ mv /usr/local/lib/python${PYTHON_VERSION}/dist-packages/hailo_platform/pyhailort/libhailort.so /usr/lib/${CC} && \ cd /usr/lib/${CC}/ && \ - ln -s libhailort.so libhailort.so.4.18.0 + ln -s libhailort.so libhailort.so.${HAILO_VERSION} # Copy base files from the rootfs stage COPY --from=rootfs / / diff --git a/docker/hailo8l/user_installation.sh b/docker/hailo8l/user_installation.sh index 853652ffa..2cf44126f 100644 --- a/docker/hailo8l/user_installation.sh +++ b/docker/hailo8l/user_installation.sh @@ -13,7 +13,7 @@ else fi # Clone the HailoRT driver repository -git clone --depth 1 --branch v4.18.0 https://github.com/hailo-ai/hailort-drivers.git +git clone --depth 1 --branch v4.19.0 https://github.com/hailo-ai/hailort-drivers.git # Build and install the HailoRT driver cd hailort-drivers/linux/pcie @@ -38,7 +38,7 @@ cd ../../ if [ ! -d /lib/firmware/hailo ]; then sudo mkdir /lib/firmware/hailo fi -sudo mv hailo8_fw.4.18.0.bin /lib/firmware/hailo/hailo8_fw.bin +sudo mv hailo8_fw.*.bin /lib/firmware/hailo/hailo8_fw.bin # Install udev rules sudo cp ./linux/pcie/51-hailo-udev.rules /etc/udev/rules.d/