From cf76b1a4ec5a313304327f054ac2a587150754c4 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Wed, 20 Nov 2024 13:24:25 -0700 Subject: [PATCH] Install correct apt packages --- docker/main/Dockerfile | 16 ++++++---------- docker/main/install_deps.sh | 13 +++++-------- docker/rpi/install_deps.sh | 2 +- 3 files changed, 12 insertions(+), 19 deletions(-) diff --git a/docker/main/Dockerfile b/docker/main/Dockerfile index 9d9e8e093..99f660c5e 100644 --- a/docker/main/Dockerfile +++ b/docker/main/Dockerfile @@ -143,20 +143,19 @@ RUN apt-get -qq update \ gnupg \ wget \ # the key fingerprint can be obtained from https://ftp-master.debian.org/keys.html - && wget -qO- "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xA4285295FC7B1A81600062A9605C66F00D6C9793" | \ - gpg --dearmor > /usr/share/keyrings/debian-archive-bullseye-stable.gpg \ - && echo "deb [signed-by=/usr/share/keyrings/debian-archive-bullseye-stable.gpg] http://deb.debian.org/debian bullseye main contrib non-free" | \ - tee /etc/apt/sources.list.d/debian-bullseye-nonfree.list \ + && wget -qO- "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x4D64FEC119C2029067D6E791F8D2585B8783D481" | \ + gpg --dearmor > /usr/share/keyrings/debian-archive-bookworm-stable.gpg \ + && sed -i 's|/usr/share/keyrings/debian-archive-keyring.gpg|/usr/share/keyrings/debian-archive-bookworm-stable.gpg|g' /etc/apt/sources.list.d/debian.sources \ && apt-get -qq update \ && apt-get -qq install -y \ - python3.10 \ - python3.10-dev \ + python3 \ + python3-dev \ # opencv dependencies build-essential cmake git pkg-config libgtk-3-dev \ libavcodec-dev libavformat-dev libswscale-dev libv4l-dev \ libxvidcore-dev libx264-dev libjpeg-dev libpng-dev libtiff-dev \ gfortran openexr libatlas-base-dev libssl-dev\ - libtbb2 libtbb-dev libdc1394-22-dev libopenexr-dev \ + libtbbmalloc2 libtbb-dev libdc1394-dev libopenexr-dev \ libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev \ # sqlite3 dependencies tclsh \ @@ -164,9 +163,6 @@ RUN apt-get -qq update \ gcc gfortran libopenblas-dev liblapack-dev && \ rm -rf /var/lib/apt/lists/* -# Ensure python3 defaults to python3.10 -RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1 - RUN wget -q https://bootstrap.pypa.io/get-pip.py -O get-pip.py \ && python3 get-pip.py "pip" diff --git a/docker/main/install_deps.sh b/docker/main/install_deps.sh index 5ef54aabb..7faabd490 100755 --- a/docker/main/install_deps.sh +++ b/docker/main/install_deps.sh @@ -11,16 +11,13 @@ apt-get -qq install --no-install-recommends -y \ lbzip2 \ procps vainfo \ unzip locales tzdata libxml2 xz-utils \ - python3.10 \ + python3 \ python3-pip \ curl \ lsof \ jq \ nethogs -# ensure python3 defaults to python3.10 -update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1 - mkdir -p -m 600 /root/.gnupg # add coral repo @@ -44,13 +41,13 @@ rm /tmp/libedgetpu1-max.deb # install python3 & tflite runtime if [[ "${TARGETARCH}" == "amd64" ]]; then - wget -qO /deps/wheels/tflite_runtime-2.17.0-cp310-cp310-linux_x86_64.whl https://github.com/feranick/TFlite-builds/releases/download/v2.17.0/tflite_runtime-2.17.0-cp310-cp310-linux_x86_64.whl - wget -qO /deps/wheels/pycoral-2.0.2-cp310-cp310-linux_x86_64.whl https://github.com/feranick/pycoral/releases/download/2.0.2TF2.17.0/pycoral-2.0.2-cp310-cp310-linux_x86_64.whl + wget -qO /deps/wheels/tflite_runtime-2.17.0-cp311-cp311-linux_x86_64.whl https://github.com/feranick/TFlite-builds/releases/download/v2.17.0/tflite_runtime-2.17.0-cp311-cp311-linux_x86_64.whl + wget -qO /deps/wheels/pycoral-2.0.2-cp311-cp311-linux_x86_64.whl https://github.com/feranick/pycoral/releases/download/2.0.2TF2.17.0/pycoral-2.0.2-cp311-cp311-linux_x86_64.whl fi if [[ "${TARGETARCH}" == "arm64" ]]; then - wget -qO /deps/wheels/tflite_runtime-2.17.0-cp310-cp310-linux_aarch64.whl https://github.com/feranick/TFlite-builds/releases/download/v2.17.0/tflite_runtime-2.17.0-cp310-cp310-linux_aarch64.whl - wget -qO /deps/wheels/pycoral-2.0.2-cp310-cp310-linux_aarch64.whl https://github.com/feranick/pycoral/releases/download/2.0.2TF2.17.0/pycoral-2.0.2-cp310-cp310-linux_aarch64.whl + wget -qO /deps/wheels/tflite_runtime-2.17.0-cp311-cp311-linux_aarch64.whl https://github.com/feranick/TFlite-builds/releases/download/v2.17.0/tflite_runtime-2.17.0-cp311-cp311-linux_aarch64.whl + wget -qO /deps/wheels/pycoral-2.0.2-cp311-cp311-linux_aarch64.whl https://github.com/feranick/pycoral/releases/download/2.0.2TF2.17.0/pycoral-2.0.2-cp311-cp311-linux_aarch64.whl fi # btbn-ffmpeg -> amd64 diff --git a/docker/rpi/install_deps.sh b/docker/rpi/install_deps.sh index 9716623ca..76da198fc 100755 --- a/docker/rpi/install_deps.sh +++ b/docker/rpi/install_deps.sh @@ -24,7 +24,7 @@ sed -i -e's/ main/ main contrib non-free/g' /etc/apt/sources.list if [[ "${TARGETARCH}" == "arm64" ]]; then # add raspberry pi repo gpg --no-default-keyring --keyring /usr/share/keyrings/raspbian.gpg --keyserver keyserver.ubuntu.com --recv-keys 82B129927FA3303E - echo "deb [signed-by=/usr/share/keyrings/raspbian.gpg] https://archive.raspberrypi.org/debian/ bullseye main" | tee /etc/apt/sources.list.d/raspi.list + echo "deb [signed-by=/usr/share/keyrings/raspbian.gpg] https://archive.raspberrypi.org/debian/ bookworm main" | tee /etc/apt/sources.list.d/raspi.list apt-get -qq update apt-get -qq install --no-install-recommends --no-install-suggests -y ffmpeg fi