install wheels in a separate layer for better parallel builds

This commit is contained in:
Blake Blackshear 2022-11-23 14:59:24 -06:00
parent 0ab6c99ecd
commit 3386887838
2 changed files with 3 additions and 2 deletions

View File

@ -107,9 +107,11 @@ ENV PATH="/usr/lib/btbn-ffmpeg/bin:/usr/local/go2rtc/bin:/usr/local/nginx/sbin:$
# Install dependencies # Install dependencies
RUN --mount=type=bind,source=docker/install_deps.sh,target=/deps/install_deps.sh \ 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 /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 / / COPY --from=deps-rootfs / /
EXPOSE 5000 EXPOSE 5000

View File

@ -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 update
apt-get -qq install --no-install-recommends --no-install-suggests -y \ apt-get -qq install --no-install-recommends --no-install-suggests -y \
libedgetpu1-max python3-tflite-runtime python3-pycoral libedgetpu1-max python3-tflite-runtime python3-pycoral
pip3 install -U /deps/wheels/*.whl
# btbn-ffmpeg -> amd64 / arm64 # btbn-ffmpeg -> amd64 / arm64
if [[ "${TARGETARCH}" == "amd64" || "${TARGETARCH}" == "arm64" ]]; then if [[ "${TARGETARCH}" == "amd64" || "${TARGETARCH}" == "arm64" ]]; then