mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-08-01 07:19:30 +00:00
Adds a `-tensorrt-jp7` Frigate image for JetPack 7.2 / L4T R39.2 Jetson hosts, built on nvcr.io/nvidia/tensorrt:26.02-py3-igpu (TensorRT 10.11, CUDA 13, py3.12), keeping the existing JP6 path unchanged. ONNX Runtime GPU is built from source (no public aarch64 onnxruntime-gpu wheel), TensorRT-Python branch is selected by the base image, and TensorRT runtime library checks are major-version aware. VALIDATED on a real AGX Orin (L4T R39.2 / nv_tegra_release R39 rev 2.0): - image frigate:test-tensorrt-jp7 builds (rc=0, 16.3GB, sha256:c9e4d382f1603ee130ee4a7315b4f71f9461405e3785707251505e2d6d088df3) - ONNX Runtime 1.25.1 exposes CUDAExecutionProvider, and a real Add-model inference RAN on the iGPU CUDA EP (functional, not just listed) - frigate.util.model.get_ort_providers(False,"AUTO") = [CUDA, CPU] (CUDA first, CPU last, TensorRT EP excluded) -> the ONNX detector GPU-accelerates on JP7 - /etc/TENSORRT_VER = 10.11.0 Native `type: tensorrt` (.trt gen) + the ORT TensorRT EP stay DRAFT-GATED: the L4T R39 host ships NO libnvdla_compiler.so (absent from host AND base image), so `import tensorrt` and libonnxruntime_providers_tensorrt.so fail to load. ONNX detector GPU acceleration is the supported JP7 path; native trt is deferred. Build fixes the new noble/CUDA-13 base surfaced (beyond the plan): - build_nginx.sh: enable deb-src for the deb822 ubuntu.sources (Ubuntu 24.04) - tensorrt_libyolo.sh: strip -lnvToolsExt (removed in CUDA 13) + -lnvparsers (dropped in TensorRT 10) when those libs are absent - docker/main: noble/py3.12 build adjustments (Dockerfile, build_sqlite_vec.sh) Reproducible: `make -C docker/tensorrt ... local-trt-jp7` (JETPACK7_ARGS) on any arm64 builder; built on-device only because the GPU smoke test needs the iGPU.
46 lines
1.6 KiB
Bash
Executable File
46 lines
1.6 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
set -euxo pipefail
|
|
|
|
SQLITE_VEC_VERSION="0.1.3"
|
|
|
|
source /etc/os-release
|
|
|
|
# Enable deb-src so `apt-get build-dep sqlite3` can find the source package. Detect the apt
|
|
# source FORMAT rather than guessing by distro: Debian 12 + Ubuntu 24.04 (noble — the JP7
|
|
# TensorRT igpu base) use the deb822 *.sources format with a `Types:` line; older Ubuntu
|
|
# (e.g. the JP6 22.04 jammy base) uses the legacy one-line /etc/apt/sources.list. On noble the
|
|
# legacy /etc/apt/sources.list is effectively empty, so the old copy+sed path enabled nothing.
|
|
if [[ -f /etc/apt/sources.list.d/debian.sources ]]; then
|
|
sed -i '/^Types:/s/deb/& deb-src/' /etc/apt/sources.list.d/debian.sources
|
|
elif [[ -f /etc/apt/sources.list.d/ubuntu.sources ]]; then
|
|
sed -i '/^Types:/s/deb/& deb-src/' /etc/apt/sources.list.d/ubuntu.sources
|
|
elif [[ -f /etc/apt/sources.list ]]; then
|
|
cp /etc/apt/sources.list /etc/apt/sources.list.d/sources-src.list
|
|
sed -i 's|deb http|deb-src http|g' /etc/apt/sources.list.d/sources-src.list
|
|
fi
|
|
|
|
apt-get update
|
|
apt-get -yqq build-dep sqlite3 gettext git
|
|
|
|
mkdir /tmp/sqlite_vec
|
|
# Grab the sqlite_vec source code.
|
|
wget -nv https://github.com/asg017/sqlite-vec/archive/refs/tags/v${SQLITE_VEC_VERSION}.tar.gz
|
|
tar -zxf v${SQLITE_VEC_VERSION}.tar.gz -C /tmp/sqlite_vec
|
|
|
|
cd /tmp/sqlite_vec/sqlite-vec-${SQLITE_VEC_VERSION}
|
|
|
|
mkdir -p vendor
|
|
wget -O sqlite-amalgamation.zip https://www.sqlite.org/2024/sqlite-amalgamation-3450300.zip
|
|
unzip sqlite-amalgamation.zip
|
|
mv sqlite-amalgamation-3450300/* vendor/
|
|
rmdir sqlite-amalgamation-3450300
|
|
rm sqlite-amalgamation.zip
|
|
|
|
# build loadable module
|
|
make loadable
|
|
|
|
# install it
|
|
cp dist/vec0.* /usr/local/lib
|
|
|