Skip to content

NVR with realtime local object detection for IP cameras

remove libusb build (#11571)

Nicolas Mowen7bed854ff728
diff --git a/docker/main/Dockerfile b/docker/main/Dockerfile
index 0eb4eb6692..ad3857dca4 100644
--- a/docker/main/Dockerfile
+++ b/docker/main/Dockerfile
@@ -41,7 +41,6 @@ ADD --link --chmod=755 "https://github.com/AlexxIT/go2rtc/releases/download/v1.9
# OpenVino Support
#
# 1. Download and convert a model from Intel's Public Open Model Zoo
-# 2. Build libUSB without udev to handle NCS2 enumeration
#
####
# Download and Convert OpenVino model
@@ -63,35 +62,6 @@ RUN --mount=type=bind,source=docker/main/build_ov_model.py,target=/build_ov_mode
&& tar -xvf ssdlite_mobilenet_v2_coco_2018_05_09.tar.gz \
&& python3 /build_ov_model.py
-
-# libUSB - No Udev
-FROM wget as libusb-build
-ARG TARGETARCH
-ARG DEBIAN_FRONTEND
-ENV CCACHE_DIR /root/.ccache
-ENV CCACHE_MAXSIZE 2G
-
-# Build libUSB without udev. Needed for Openvino NCS2 support
-WORKDIR /opt
-RUN apt-get update && apt-get install -y unzip build-essential automake libtool ccache pkg-config
-RUN --mount=type=cache,target=/root/.ccache wget -q https://github.com/libusb/libusb/archive/v1.0.26.zip -O v1.0.26.zip && \
- unzip v1.0.26.zip && cd libusb-1.0.26 && \
- ./bootstrap.sh && \
- ./configure CC='ccache gcc' CCX='ccache g++' --disable-udev --enable-shared && \
- make -j $(nproc --all)
-RUN apt-get update && \
- apt-get install -y --no-install-recommends libusb-1.0-0-dev && \
- rm -rf /var/lib/apt/lists/*
-WORKDIR /opt/libusb-1.0.26/libusb
-RUN /bin/mkdir -p '/usr/local/lib' && \
- /bin/bash ../libtool --mode=install /usr/bin/install -c libusb-1.0.la '/usr/local/lib' && \
- /bin/mkdir -p '/usr/local/include/libusb-1.0' && \
- /usr/bin/install -c -m 644 libusb.h '/usr/local/include/libusb-1.0' && \
- /bin/mkdir -p '/usr/local/lib/pkgconfig' && \
- cd /opt/libusb-1.0.26/ && \
- /usr/bin/install -c -m 644 libusb-1.0.pc '/usr/local/lib/pkgconfig' && \
- ldconfig
-
FROM wget AS models
# Get model and labels
@@ -161,7 +131,6 @@ RUN pip3 wheel --wheel-dir=/wheels -r /requirements-wheels.txt
FROM scratch AS deps-rootfs
COPY --from=nginx /usr/local/nginx/ /usr/local/nginx/
COPY --from=go2rtc /rootfs/ /
-COPY --from=libusb-build /usr/local/lib /usr/local/lib
COPY --from=s6-overlay /rootfs/ /
COPY --from=models /rootfs/ /
COPY docker/main/rootfs/ /
@@ -191,8 +160,6 @@ RUN --mount=type=bind,from=wheels,source=/wheels,target=/deps/wheels \
COPY --from=deps-rootfs / /
-RUN ldconfig
-
EXPOSE 5000
EXPOSE 8554
EXPOSE 8555/tcp 8555/udp