mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-15 15:45:27 +03:00
update to hailo driver 4.19
This commit is contained in:
parent
357ce0382e
commit
a7ceb955d8
@ -2,6 +2,9 @@
|
|||||||
|
|
||||||
ARG DEBIAN_FRONTEND=noninteractive
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
# NOTE: also update user_installation.sh
|
||||||
|
ARG HAILO_VERSION=4.19.0
|
||||||
|
|
||||||
# Build Python wheels
|
# Build Python wheels
|
||||||
FROM wheels AS h8l-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
|
# Build HailoRT and create wheel
|
||||||
FROM wheels AS build-hailort
|
FROM wheels AS build-hailort
|
||||||
ARG TARGETARCH
|
ARG TARGETARCH
|
||||||
|
ARG HAILO_VERSION
|
||||||
|
|
||||||
SHELL ["/bin/bash", "-c"]
|
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 && \
|
RUN . /etc/environment && \
|
||||||
git clone https://github.com/hailo-ai/hailort.git /opt/hailort && \
|
git clone https://github.com/hailo-ai/hailort.git /opt/hailort && \
|
||||||
cd /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 -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 libhailort && \
|
||||||
cmake --build build --config release --target _pyhailort && \
|
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
|
# Use deps as the base image
|
||||||
FROM deps AS h8l-frigate
|
FROM deps AS h8l-frigate
|
||||||
|
ARG HAILO_VERSION
|
||||||
|
|
||||||
# Copy the wheels from the wheels stage
|
# Copy the wheels from the wheels stage
|
||||||
COPY --from=h8l-wheels /h8l-wheels /deps/h8l-wheels
|
COPY --from=h8l-wheels /h8l-wheels /deps/h8l-wheels
|
||||||
@ -91,7 +96,7 @@ RUN pip3 install -U /deps/hailo-wheels/*.whl
|
|||||||
RUN . /etc/environment && \
|
RUN . /etc/environment && \
|
||||||
mv /usr/local/lib/python${PYTHON_VERSION}/dist-packages/hailo_platform/pyhailort/libhailort.so /usr/lib/${CC} && \
|
mv /usr/local/lib/python${PYTHON_VERSION}/dist-packages/hailo_platform/pyhailort/libhailort.so /usr/lib/${CC} && \
|
||||||
cd /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 base files from the rootfs stage
|
||||||
COPY --from=rootfs / /
|
COPY --from=rootfs / /
|
||||||
|
|||||||
@ -13,7 +13,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Clone the HailoRT driver repository
|
# 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
|
# Build and install the HailoRT driver
|
||||||
cd hailort-drivers/linux/pcie
|
cd hailort-drivers/linux/pcie
|
||||||
@ -38,7 +38,7 @@ cd ../../
|
|||||||
if [ ! -d /lib/firmware/hailo ]; then
|
if [ ! -d /lib/firmware/hailo ]; then
|
||||||
sudo mkdir /lib/firmware/hailo
|
sudo mkdir /lib/firmware/hailo
|
||||||
fi
|
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
|
# Install udev rules
|
||||||
sudo cp ./linux/pcie/51-hailo-udev.rules /etc/udev/rules.d/
|
sudo cp ./linux/pcie/51-hailo-udev.rules /etc/udev/rules.d/
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user