From 3386887838ee498427c955ac7adaec4fee98a7f6 Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Wed, 23 Nov 2022 14:59:24 -0600 Subject: [PATCH] install wheels in a separate layer for better parallel builds --- Dockerfile | 4 +++- docker/install_deps.sh | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 420563332..86cebc1e4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -107,9 +107,11 @@ ENV PATH="/usr/lib/btbn-ffmpeg/bin:/usr/local/go2rtc/bin:/usr/local/nginx/sbin:$ # Install dependencies RUN --mount=type=bind,source=docker/install_deps.sh,target=/deps/install_deps.sh \ - --mount=type=bind,from=wheels,source=/wheels,target=/deps/wheels \ /deps/install_deps.sh +RUN --mount=type=bind,from=wheels,source=/wheels,target=/deps/wheels \ + pip3 install -U /deps/wheels/*.whl + COPY --from=deps-rootfs / / EXPOSE 5000 diff --git a/docker/install_deps.sh b/docker/install_deps.sh index 88d1b45b8..4929d2dd2 100755 --- a/docker/install_deps.sh +++ b/docker/install_deps.sh @@ -28,7 +28,6 @@ sed -i -e's/ main/ main contrib non-free/g' /etc/apt/sources.list apt-get -qq update apt-get -qq install --no-install-recommends --no-install-suggests -y \ libedgetpu1-max python3-tflite-runtime python3-pycoral -pip3 install -U /deps/wheels/*.whl # btbn-ffmpeg -> amd64 / arm64 if [[ "${TARGETARCH}" == "amd64" || "${TARGETARCH}" == "arm64" ]]; then