mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-08-01 07:19:30 +00:00
Gate the docker/main/Dockerfile pip --ignore-installed workaround behind a PIP_IGNORE_INSTALLED build arg that is empty for every stock image and set only for the JP7 (Ubuntu 24.04 noble) TensorRT base. Non-JP7 images now build a byte-identical command. Revert the ov-converter change entirely since that stage is always debian:12, never noble. Drop the incidental shell re-quoting in the trt-model-prepare run script, keeping only the functional TensorRT-major-aware runtime library check (.so.8 on JP6, .so.10 on JP7; libnvparsers removed in TRT 10).
263 lines
8.5 KiB
YAML
263 lines
8.5 KiB
YAML
name: CI
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- dev
|
|
- master
|
|
paths-ignore:
|
|
- "docs/**"
|
|
|
|
# only run the latest commit to avoid cache overwrites
|
|
concurrency:
|
|
group: ${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
PYTHON_VERSION: 3.11
|
|
|
|
jobs:
|
|
amd64_build:
|
|
runs-on: ubuntu-22.04
|
|
name: AMD64 Build
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@v6
|
|
with:
|
|
persist-credentials: false
|
|
- name: Set up QEMU and Buildx
|
|
id: setup
|
|
uses: ./.github/actions/setup
|
|
with:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Build and push amd64 standard build
|
|
uses: docker/build-push-action@v7
|
|
with:
|
|
context: .
|
|
file: docker/main/Dockerfile
|
|
push: true
|
|
platforms: linux/amd64
|
|
target: frigate
|
|
tags: ${{ steps.setup.outputs.image-name }}-amd64
|
|
cache-from: type=registry,ref=${{ steps.setup.outputs.cache-name }}-amd64
|
|
cache-to: type=registry,ref=${{ steps.setup.outputs.cache-name }}-amd64,mode=max
|
|
arm64_build:
|
|
runs-on: ubuntu-22.04-arm
|
|
name: ARM Build
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@v6
|
|
with:
|
|
persist-credentials: false
|
|
- name: Set up QEMU and Buildx
|
|
id: setup
|
|
uses: ./.github/actions/setup
|
|
with:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Build and push arm64 standard build
|
|
uses: docker/build-push-action@v7
|
|
with:
|
|
context: .
|
|
file: docker/main/Dockerfile
|
|
push: true
|
|
platforms: linux/arm64
|
|
target: frigate
|
|
tags: |
|
|
${{ steps.setup.outputs.image-name }}-standard-arm64
|
|
cache-from: type=registry,ref=${{ steps.setup.outputs.cache-name }}-arm64
|
|
- name: Build and push RPi build
|
|
uses: docker/bake-action@v7
|
|
with:
|
|
source: .
|
|
push: true
|
|
targets: rpi
|
|
files: docker/rpi/rpi.hcl
|
|
set: |
|
|
rpi.tags=${{ steps.setup.outputs.image-name }}-rpi
|
|
*.cache-from=type=registry,ref=${{ steps.setup.outputs.cache-name }}-arm64
|
|
*.cache-to=type=registry,ref=${{ steps.setup.outputs.cache-name }}-arm64,mode=max
|
|
jetson_jp6_build:
|
|
runs-on: ubuntu-22.04-arm
|
|
name: Jetson Jetpack 6
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@v6
|
|
with:
|
|
persist-credentials: false
|
|
- name: Set up QEMU and Buildx
|
|
id: setup
|
|
uses: ./.github/actions/setup
|
|
with:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Build and push TensorRT (Jetson, Jetpack 6)
|
|
env:
|
|
ARCH: arm64
|
|
BASE_IMAGE: nvcr.io/nvidia/tensorrt:23.12-py3-igpu
|
|
SLIM_BASE: nvcr.io/nvidia/tensorrt:23.12-py3-igpu
|
|
TRT_BASE: nvcr.io/nvidia/tensorrt:23.12-py3-igpu
|
|
uses: docker/bake-action@v7
|
|
with:
|
|
source: .
|
|
push: true
|
|
targets: tensorrt
|
|
files: docker/tensorrt/trt.hcl
|
|
set: |
|
|
tensorrt.tags=${{ steps.setup.outputs.image-name }}-tensorrt-jp6
|
|
*.cache-from=type=registry,ref=${{ steps.setup.outputs.cache-name }}-jp6
|
|
*.cache-to=type=registry,ref=${{ steps.setup.outputs.cache-name }}-jp6,mode=max
|
|
jetson_jp7_build:
|
|
runs-on: ubuntu-22.04-arm
|
|
name: Jetson Jetpack 7
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@v6
|
|
with:
|
|
persist-credentials: false
|
|
- name: Set up QEMU and Buildx
|
|
id: setup
|
|
uses: ./.github/actions/setup
|
|
with:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Build and push TensorRT (Jetson, Jetpack 7)
|
|
env:
|
|
ARCH: arm64
|
|
BASE_IMAGE: nvcr.io/nvidia/tensorrt:26.02-py3-igpu
|
|
SLIM_BASE: nvcr.io/nvidia/tensorrt:26.02-py3-igpu
|
|
TRT_BASE: nvcr.io/nvidia/tensorrt:26.02-py3-igpu
|
|
BUILD_ONNXRUNTIME_FROM_SOURCE: "1"
|
|
ONNXRUNTIME_VERSION: "1.25.1"
|
|
ONNXRUNTIME_BRANCH: rel-1.25.1
|
|
TENSORRT_PYTHON_BRANCH: auto
|
|
L4T_APT_RELEASE: r39.2
|
|
JETSON_SOC_REPO: som
|
|
PIP_IGNORE_INSTALLED: "--ignore-installed"
|
|
uses: docker/bake-action@v7
|
|
with:
|
|
source: .
|
|
push: true
|
|
targets: tensorrt
|
|
files: docker/tensorrt/trt.hcl
|
|
set: |
|
|
tensorrt.tags=${{ steps.setup.outputs.image-name }}-tensorrt-jp7
|
|
*.cache-from=type=registry,ref=${{ steps.setup.outputs.cache-name }}-jp7
|
|
*.cache-to=type=registry,ref=${{ steps.setup.outputs.cache-name }}-jp7,mode=max
|
|
amd64_extra_builds:
|
|
runs-on: ubuntu-22.04
|
|
name: AMD64 Extra Build
|
|
needs:
|
|
- amd64_build
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@v6
|
|
with:
|
|
persist-credentials: false
|
|
- name: Set up QEMU and Buildx
|
|
id: setup
|
|
uses: ./.github/actions/setup
|
|
with:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Build and push TensorRT (x86 GPU)
|
|
env:
|
|
COMPUTE_LEVEL: "50 60 70 80 90"
|
|
uses: docker/bake-action@v7
|
|
with:
|
|
source: .
|
|
push: true
|
|
targets: tensorrt
|
|
files: docker/tensorrt/trt.hcl
|
|
set: |
|
|
tensorrt.tags=${{ steps.setup.outputs.image-name }}-tensorrt
|
|
*.cache-from=type=registry,ref=${{ steps.setup.outputs.cache-name }}-tensorrt
|
|
*.cache-to=type=registry,ref=${{ steps.setup.outputs.cache-name }}-tensorrt,mode=max
|
|
- name: AMD/ROCm general build
|
|
env:
|
|
HSA_OVERRIDE: 0
|
|
uses: docker/bake-action@v7
|
|
with:
|
|
source: .
|
|
push: true
|
|
targets: rocm
|
|
files: docker/rocm/rocm.hcl
|
|
set: |
|
|
rocm.tags=${{ steps.setup.outputs.image-name }}-rocm
|
|
*.cache-to=type=registry,ref=${{ steps.setup.outputs.cache-name }}-rocm,mode=max
|
|
*.cache-from=type=registry,ref=${{ steps.setup.outputs.cache-name }}-rocm
|
|
arm64_extra_builds:
|
|
runs-on: ubuntu-22.04-arm
|
|
name: ARM Extra Build
|
|
needs:
|
|
- arm64_build
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@v6
|
|
with:
|
|
persist-credentials: false
|
|
- name: Set up QEMU and Buildx
|
|
id: setup
|
|
uses: ./.github/actions/setup
|
|
with:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Build and push Rockchip build
|
|
uses: docker/bake-action@v7
|
|
with:
|
|
source: .
|
|
push: true
|
|
targets: rk
|
|
files: docker/rockchip/rk.hcl
|
|
set: |
|
|
rk.tags=${{ steps.setup.outputs.image-name }}-rk
|
|
*.cache-from=type=gha
|
|
synaptics_build:
|
|
runs-on: ubuntu-22.04-arm
|
|
name: Synaptics Build
|
|
needs:
|
|
- arm64_build
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@v6
|
|
with:
|
|
persist-credentials: false
|
|
- name: Set up QEMU and Buildx
|
|
id: setup
|
|
uses: ./.github/actions/setup
|
|
with:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Build and push Synaptics build
|
|
uses: docker/bake-action@v7
|
|
with:
|
|
source: .
|
|
push: true
|
|
targets: synaptics
|
|
files: docker/synaptics/synaptics.hcl
|
|
set: |
|
|
synaptics.tags=${{ steps.setup.outputs.image-name }}-synaptics
|
|
*.cache-from=type=gha
|
|
# The majority of users running arm64 are rpi users, so the rpi
|
|
# build should be the primary arm64 image
|
|
assemble_default_build:
|
|
runs-on: ubuntu-22.04
|
|
name: Assemble and push default build
|
|
needs:
|
|
- amd64_build
|
|
- arm64_build
|
|
steps:
|
|
- id: lowercaseRepo
|
|
uses: ASzc/change-string-case-action@v6
|
|
with:
|
|
string: ${{ github.repository }}
|
|
- name: Log in to the Container registry
|
|
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Create short sha
|
|
run: echo "SHORT_SHA=${GITHUB_SHA::7}" >> $GITHUB_ENV
|
|
- uses: int128/docker-manifest-create-action@v2
|
|
with:
|
|
tags: ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:${{ env.SHORT_SHA }}
|
|
sources: |
|
|
ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:${{ env.SHORT_SHA }}-amd64
|
|
ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:${{ env.SHORT_SHA }}-rpi
|