Skip to content

Commit

Permalink
Remove arm32 (blakeblackshear#5935)
Browse files Browse the repository at this point in the history
* remove references to 32bit arm

* scheduled build to maintain actions cache
  • Loading branch information
blakeblackshear committed Apr 8, 2023
1 parent 37db407 commit cefbed6
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/maintain_cache.yml
Original file line number Diff line number Diff line change
@@ -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
5 changes: 0 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
9 changes: 3 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 0 additions & 19 deletions docker/install_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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:https://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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions docker/install_s6_overlay.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/frigate/hardware.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
1 change: 0 additions & 1 deletion requirements-wheels.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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'

0 comments on commit cefbed6

Please sign in to comment.