NVR with realtime local object detection for IP cameras
TypeScript aicameragoogle-coralhome-assistanthome-automationhomeautomationmqttnvrobject-detectionrealtimertsptensorflow
Integrate ccache into libusb and nginx build scripts for improved build speed (#6886)
Sergey Krashevichb6fce8f0bb71
diff --git a/Dockerfile b/Dockerfileindex 058bb6ad7a..6db81e46b0 100644--- a/Dockerfile+++ b/Dockerfile@@ -18,10 +18,13 @@ WORKDIR /rootfsFROM base AS nginxARG DEBIAN_FRONTEND+ENV CCACHE_DIR /root/.ccache+ENV CCACHE_MAXSIZE 2G# bind /var/cache/apt to tmpfs to speed up nginx buildRUN --mount=type=tmpfs,target=/tmp --mount=type=tmpfs,target=/var/cache/apt \--mount=type=bind,source=docker/build_nginx.sh,target=/deps/build_nginx.sh \+ --mount=type=cache,target=/root/.ccache \/deps/build_nginx.shFROM wget AS go2rtc@@ -61,14 +64,16 @@ RUN mkdir /models \FROM wget as libusb-buildARG TARGETARCHARG DEBIAN_FRONTEND+ENV CCACHE_DIR /root/.ccache+ENV CCACHE_MAXSIZE 2G# Build libUSB without udev. Needed for Openvino NCS2 supportWORKDIR /opt-RUN apt-get update && apt-get install -y unzip build-essential automake libtool-RUN wget -q https://github.com/libusb/libusb/archive/v1.0.25.zip -O v1.0.25.zip && \+RUN apt-get update && apt-get install -y unzip build-essential automake libtool ccache+RUN --mount=type=cache,target=/root/.ccache wget -q https://github.com/libusb/libusb/archive/v1.0.25.zip -O v1.0.25.zip && \unzip v1.0.25.zip && cd libusb-1.0.25 && \./bootstrap.sh && \- ./configure --disable-udev --enable-shared && \+ ./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 && \diff --git a/docker/build_nginx.sh b/docker/build_nginx.shindex fd1432f322..1e7bfad219 100755--- a/docker/build_nginx.sh+++ b/docker/build_nginx.sh@@ -15,6 +15,10 @@ apt-get -yqq build-dep nginxapt-get -yqq install --no-install-recommends ca-certificates wgetupdate-ca-certificates -f+apt install -y ccache++export PATH="/usr/lib/ccache:$PATH"+mkdir /tmp/nginxwget -nv https://nginx.org/download/nginx-${NGINX_VERSION}.tar.gztar -zxf nginx-${NGINX_VERSION}.tar.gz -C /tmp/nginx --strip-components=1@@ -62,5 +66,5 @@ cd /tmp/nginx--add-module=../nginx-rtmp-module \--with-cc-opt="-O3 -Wno-error=implicit-fallthrough"-make -j$(nproc) && make install+make CC="ccache gcc" -j$(nproc) && make installrm -rf /usr/local/nginx/html /usr/local/nginx/conf/*.default