From 1a3567c5d0674e4ce60e93c395892c611bc8348b Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Fri, 9 Jul 2021 07:20:16 -0500 Subject: [PATCH] arch specific s6-overlay --- docker/Dockerfile.aarch64 | 32 +++++++++++++++++++------------ docker/Dockerfile.amd64 | 10 +++++++++- docker/Dockerfile.amd64nvidia | 14 +++++++++++--- docker/Dockerfile.armv7 | 36 +++++++++++++++++++++-------------- docker/Dockerfile.base | 8 -------- 5 files changed, 62 insertions(+), 38 deletions(-) diff --git a/docker/Dockerfile.aarch64 b/docker/Dockerfile.aarch64 index 5ce548f2d..ba7995521 100644 --- a/docker/Dockerfile.aarch64 +++ b/docker/Dockerfile.aarch64 @@ -5,18 +5,26 @@ ENV DEBIAN_FRONTEND=noninteractive # Install packages for apt repo RUN apt-get -qq update \ && apt-get -qq install --no-install-recommends -y \ - # ffmpeg runtime dependencies - libgomp1 \ - # runtime dependencies - libopenexr24 \ - libgstreamer1.0-0 \ - libgstreamer-plugins-base1.0-0 \ - libopenblas-base \ - libjpeg-turbo8 \ - libpng16-16 \ - libtiff5 \ - libdc1394-22 \ + # ffmpeg runtime dependencies + libgomp1 \ + # runtime dependencies + libopenexr24 \ + libgstreamer1.0-0 \ + libgstreamer-plugins-base1.0-0 \ + libopenblas-base \ + libjpeg-turbo8 \ + libpng16-16 \ + libtiff5 \ + libdc1394-22 \ ## Tensorflow lite && pip3 install https://github.com/google-coral/pycoral/releases/download/release-frogfish/tflite_runtime-2.5.0-cp38-cp38-linux_aarch64.whl \ && rm -rf /var/lib/apt/lists/* \ - && (apt-get autoremove -y; apt-get autoclean -y) \ No newline at end of file + && (apt-get autoremove -y; apt-get autoclean -y) + +# s6-overlay +ADD https://github.com/just-containers/s6-overlay/releases/download/v2.2.0.3/s6-overlay-aarch64-installer /tmp/ +RUN chmod +x /tmp/s6-overlay-aarch64-installer && /tmp/s6-overlay-aarch64-installer / + +ENTRYPOINT ["/init"] + +CMD ["python3", "-u", "-m", "frigate"] \ No newline at end of file diff --git a/docker/Dockerfile.amd64 b/docker/Dockerfile.amd64 index cb02aaaa3..2f4a432d2 100644 --- a/docker/Dockerfile.amd64 +++ b/docker/Dockerfile.amd64 @@ -21,4 +21,12 @@ RUN apt-get -qq update \ && python3.8 -m pip install tflite_runtime-2.5.0-cp38-cp38-linux_x86_64.whl \ && rm tflite_runtime-2.5.0-cp38-cp38-linux_x86_64.whl \ && rm -rf /var/lib/apt/lists/* \ - && (apt-get autoremove -y; apt-get autoclean -y) \ No newline at end of file + && (apt-get autoremove -y; apt-get autoclean -y) + +# s6-overlay +ADD https://github.com/just-containers/s6-overlay/releases/download/v2.2.0.3/s6-overlay-amd64-installer /tmp/ +RUN chmod +x /tmp/s6-overlay-amd64-installer && /tmp/s6-overlay-amd64-installer / + +ENTRYPOINT ["/init"] + +CMD ["python3", "-u", "-m", "frigate"] \ No newline at end of file diff --git a/docker/Dockerfile.amd64nvidia b/docker/Dockerfile.amd64nvidia index 8714f70ad..1db9e94d8 100644 --- a/docker/Dockerfile.amd64nvidia +++ b/docker/Dockerfile.amd64nvidia @@ -4,9 +4,9 @@ LABEL maintainer "blakeb@blakeshome.com" # Install packages for apt repo RUN apt-get -qq update \ && apt-get -qq install --no-install-recommends -y \ - # ffmpeg dependencies - libgomp1 \ - ## Tensorflow lite + # ffmpeg dependencies + libgomp1 \ + ## Tensorflow lite && wget -q https://github.com/google-coral/pycoral/releases/download/release-frogfish/tflite_runtime-2.5.0-cp38-cp38-linux_x86_64.whl \ && python3.8 -m pip install tflite_runtime-2.5.0-cp38-cp38-linux_x86_64.whl \ && rm tflite_runtime-2.5.0-cp38-cp38-linux_x86_64.whl \ @@ -45,3 +45,11 @@ ENV LD_LIBRARY_PATH /usr/local/nvidia/lib:/usr/local/nvidia/lib64 ENV NVIDIA_VISIBLE_DEVICES all ENV NVIDIA_DRIVER_CAPABILITIES compute,utility,video ENV NVIDIA_REQUIRE_CUDA "cuda>=11.1 brand=tesla,driver>=418,driver<419 brand=tesla,driver>=440,driver<441 brand=tesla,driver>=450,driver<451" + +# s6-overlay +ADD https://github.com/just-containers/s6-overlay/releases/download/v2.2.0.3/s6-overlay-amd64-installer /tmp/ +RUN chmod +x /tmp/s6-overlay-amd64-installer && /tmp/s6-overlay-amd64-installer / + +ENTRYPOINT ["/init"] + +CMD ["python3", "-u", "-m", "frigate"] \ No newline at end of file diff --git a/docker/Dockerfile.armv7 b/docker/Dockerfile.armv7 index 2e50cd22c..a1c360813 100644 --- a/docker/Dockerfile.armv7 +++ b/docker/Dockerfile.armv7 @@ -5,20 +5,28 @@ ENV DEBIAN_FRONTEND=noninteractive # Install packages for apt repo RUN apt-get -qq update \ && apt-get -qq install --no-install-recommends -y \ - # ffmpeg runtime dependencies - libgomp1 \ - # runtime dependencies - libopenexr24 \ - libgstreamer1.0-0 \ - libgstreamer-plugins-base1.0-0 \ - libopenblas-base \ - libjpeg-turbo8 \ - libpng16-16 \ - libtiff5 \ - libdc1394-22 \ - libaom0 \ - libx265-179 \ + # ffmpeg runtime dependencies + libgomp1 \ + # runtime dependencies + libopenexr24 \ + libgstreamer1.0-0 \ + libgstreamer-plugins-base1.0-0 \ + libopenblas-base \ + libjpeg-turbo8 \ + libpng16-16 \ + libtiff5 \ + libdc1394-22 \ + libaom0 \ + libx265-179 \ ## Tensorflow lite && pip3 install https://github.com/google-coral/pycoral/releases/download/release-frogfish/tflite_runtime-2.5.0-cp38-cp38-linux_armv7l.whl \ && rm -rf /var/lib/apt/lists/* \ - && (apt-get autoremove -y; apt-get autoclean -y) \ No newline at end of file + && (apt-get autoremove -y; apt-get autoclean -y) + +# s6-overlay +ADD https://github.com/just-containers/s6-overlay/releases/download/v2.2.0.3/s6-overlay-armhf-installer /tmp/ +RUN chmod +x /tmp/s6-overlay-armhf-installer && /tmp/s6-overlay-armhf-installer / + +ENTRYPOINT ["/init"] + +CMD ["python3", "-u", "-m", "frigate"] \ No newline at end of file diff --git a/docker/Dockerfile.base b/docker/Dockerfile.base index f80e3c8f8..1b9e1d144 100644 --- a/docker/Dockerfile.base +++ b/docker/Dockerfile.base @@ -10,10 +10,6 @@ FROM frigate-web as web FROM ubuntu:20.04 LABEL maintainer "blakeb@blakeshome.com" -# s6-overlay -ADD https://github.com/just-containers/s6-overlay/releases/download/v2.2.0.1/s6-overlay-amd64-installer /tmp/ -RUN chmod +x /tmp/s6-overlay-amd64-installer && /tmp/s6-overlay-amd64-installer / - COPY --from=ffmpeg /usr/local /usr/local/ COPY --from=wheels /wheels/. /wheels/ @@ -57,7 +53,3 @@ COPY docker/rootfs/ / EXPOSE 5000 EXPOSE 1935 - -ENTRYPOINT ["/init"] - -CMD ["python3", "-u", "-m", "frigate"]