diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8a06ef0e6..4fab7e815 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,7 +49,7 @@ jobs: with: context: . push: true - platforms: linux/amd64,linux/arm64,linux/arm/v7 + platforms: linux/amd64,linux/arm64 target: frigate tags: | ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:${{ github.ref_name }}-${{ env.SHORT_SHA }} diff --git a/.github/workflows/maintain_cache.yml b/.github/workflows/maintain_cache.yml new file mode 100644 index 000000000..b0d6360fc --- /dev/null +++ b/.github/workflows/maintain_cache.yml @@ -0,0 +1,45 @@ +name: Maintain Cache + +on: + schedule: + - cron: "13 0 * * 0,4" + +env: + PYTHON_VERSION: 3.9 + +jobs: + multi_arch_build: + runs-on: ubuntu-latest + name: Image Build + steps: + - name: Remove unnecessary files + run: | + sudo rm -rf /usr/share/dotnet + sudo rm -rf /usr/local/lib/android + sudo rm -rf /opt/ghc + - id: lowercaseRepo + uses: ASzc/change-string-case-action@v5 + with: + string: ${{ github.repository }} + - name: Check out code + uses: actions/checkout@v3 + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Log in to the Container registry + uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Create version file + run: make version + - name: Build and push + uses: docker/build-push-action@v3 + with: + context: . + push: false + platforms: linux/amd64,linux/arm64 + target: frigate + cache-from: type=gha diff --git a/Dockerfile b/Dockerfile index 204fc7c81..4059a8059 100644 --- a/Dockerfile +++ b/Dockerfile @@ -133,11 +133,6 @@ RUN apt-get -qq update \ RUN wget -q https://bootstrap.pypa.io/get-pip.py -O get-pip.py \ && python3 get-pip.py "pip" -RUN if [ "${TARGETARCH}" = "arm" ]; \ - then echo "[global]" > /etc/pip.conf \ - && echo "extra-index-url=https://www.piwheels.org/simple" >> /etc/pip.conf; \ - fi - COPY requirements.txt /requirements.txt RUN pip3 install -r requirements.txt diff --git a/Makefile b/Makefile index c26c86bf2..69455fac0 100644 --- a/Makefile +++ b/Makefile @@ -22,14 +22,11 @@ amd64: arm64: docker buildx build --platform linux/arm64 --target=frigate --tag $(IMAGE_REPO):$(VERSION)-$(COMMIT_HASH) . -armv7: - docker buildx build --platform linux/arm/v7 --target=frigate --tag $(IMAGE_REPO):$(VERSION)-$(COMMIT_HASH) . - -build: version amd64 arm64 armv7 - docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --target=frigate --tag $(IMAGE_REPO):$(VERSION)-$(COMMIT_HASH) . +build: version amd64 arm64 + docker buildx build --platform linux/arm64/v8,linux/amd64 --target=frigate --tag $(IMAGE_REPO):$(VERSION)-$(COMMIT_HASH) . push: build - docker buildx build --push --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --target=frigate --tag $(IMAGE_REPO):${GITHUB_REF_NAME}-$(COMMIT_HASH) . + docker buildx build --push --platform linux/arm64/v8,linux/amd64 --target=frigate --tag $(IMAGE_REPO):${GITHUB_REF_NAME}-$(COMMIT_HASH) . docker buildx build --push --platform linux/amd64 --target=frigate-tensorrt --tag $(IMAGE_REPO):${GITHUB_REF_NAME}-$(COMMIT_HASH)-tensorrt . run: local diff --git a/docker/install_deps.sh b/docker/install_deps.sh index 4b6ea7923..f92e20514 100755 --- a/docker/install_deps.sh +++ b/docker/install_deps.sh @@ -37,15 +37,6 @@ if [[ "${TARGETARCH}" == "amd64" ]]; then rm -rf btbn-ffmpeg.tar.xz /usr/lib/btbn-ffmpeg/doc /usr/lib/btbn-ffmpeg/bin/ffplay fi -# ffmpeg -> arm32 -if [[ "${TARGETARCH}" == "arm" ]]; then - # add raspberry pi repo - gpg --no-default-keyring --keyring /usr/share/keyrings/raspbian.gpg --keyserver keyserver.ubuntu.com --recv-keys 9165938D90FDDD2E - echo "deb [signed-by=/usr/share/keyrings/raspbian.gpg] http://raspbian.raspberrypi.org/raspbian/ bullseye main contrib non-free rpi" | 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 - # ffmpeg -> arm64 if [[ "${TARGETARCH}" == "arm64" ]]; then # add raspberry pi repo @@ -75,16 +66,6 @@ if [[ "${TARGETARCH}" == "arm64" ]]; then libva-drm2 mesa-va-drivers fi -# not sure why 32bit arm requires all these -if [[ "${TARGETARCH}" == "arm" ]]; then - apt-get -qq install --no-install-recommends --no-install-suggests -y \ - 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 libtbb-dev libdc1394-22-dev libopenexr-dev \ - libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev -fi - apt-get purge gnupg apt-transport-https wget xz-utils -y apt-get clean autoclean -y apt-get autoremove --purge -y diff --git a/docker/install_s6_overlay.sh b/docker/install_s6_overlay.sh index 9a849cb65..4e858ef07 100755 --- a/docker/install_s6_overlay.sh +++ b/docker/install_s6_overlay.sh @@ -6,8 +6,6 @@ s6_version="3.1.4.1" if [[ "${TARGETARCH}" == "amd64" ]]; then s6_arch="x86_64" -elif [[ "${TARGETARCH}" == "arm" ]]; then - s6_arch="armhf" elif [[ "${TARGETARCH}" == "arm64" ]]; then s6_arch="aarch64" fi diff --git a/docs/docs/frigate/hardware.md b/docs/docs/frigate/hardware.md index acbd2c7fd..e5233e218 100644 --- a/docs/docs/frigate/hardware.md +++ b/docs/docs/frigate/hardware.md @@ -48,7 +48,7 @@ A single Coral can handle many cameras and will be sufficient for the majority o The OpenVINO detector type is able to run on: - 6th Gen Intel Platforms and newer that have an iGPU -- x86 & Arm32/64 hosts with VPU Hardware (ex: Intel NCS2) +- x86 & Arm64 hosts with VPU Hardware (ex: Intel NCS2) More information is available [in the detector docs](/configuration/detectors#openvino-detector) diff --git a/requirements-wheels.txt b/requirements-wheels.txt index 094059c2f..f0e199de3 100644 --- a/requirements-wheels.txt +++ b/requirements-wheels.txt @@ -23,4 +23,3 @@ zeroconf == 0.47.* # Openvino Library - Custom built with MYRIAD support openvino @ https://github.com/NateMeyer/openvino-wheels/releases/download/multi-arch_2022.2.0/openvino-2022.2.0-000-cp39-cp39-manylinux_2_31_x86_64.whl; platform_machine == 'x86_64' openvino @ https://github.com/NateMeyer/openvino-wheels/releases/download/multi-arch_2022.2.0/openvino-2022.2.0-000-cp39-cp39-linux_aarch64.whl; platform_machine == 'aarch64' -openvino @ https://github.com/NateMeyer/openvino-wheels/releases/download/multi-arch_2022.2.0/openvino-2022.2.0-000-cp39-cp39-linux_armv7l.whl; platform_machine == 'armv7l'