Skip to content

Commit 9034454

Browse files
authored
Fix jetson build (#21173)
1 parent 7167cf5 commit 9034454

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

docker/main/build_pysqlite3.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,27 @@ set -euxo pipefail
55
SQLITE3_VERSION="3.46.1"
66
PYSQLITE3_VERSION="0.5.3"
77

8+
# Install libsqlite3-dev if not present (needed for some base images like NVIDIA TensorRT)
9+
if ! dpkg -l | grep -q libsqlite3-dev; then
10+
echo "Installing libsqlite3-dev for compilation..."
11+
apt-get update && apt-get install -y libsqlite3-dev && rm -rf /var/lib/apt/lists/*
12+
fi
13+
814
# Fetch the pre-built sqlite amalgamation instead of building from source
915
if [[ ! -d "sqlite" ]]; then
1016
mkdir sqlite
1117
cd sqlite
12-
18+
1319
# Download the pre-built amalgamation from sqlite.org
1420
# For SQLite 3.46.1, the amalgamation version is 3460100
1521
SQLITE_AMALGAMATION_VERSION="3460100"
16-
22+
1723
wget https://www.sqlite.org/2024/sqlite-amalgamation-${SQLITE_AMALGAMATION_VERSION}.zip -O sqlite-amalgamation.zip
1824
unzip sqlite-amalgamation.zip
1925
mv sqlite-amalgamation-${SQLITE_AMALGAMATION_VERSION}/* .
2026
rmdir sqlite-amalgamation-${SQLITE_AMALGAMATION_VERSION}
2127
rm sqlite-amalgamation.zip
22-
28+
2329
cd ../
2430
fi
2531

docker/tensorrt/Dockerfile.arm64

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ RUN apt-get update \
112112
&& apt-get install -y protobuf-compiler libprotobuf-dev \
113113
&& rm -rf /var/lib/apt/lists/*
114114
RUN --mount=type=bind,source=docker/tensorrt/requirements-models-arm64.txt,target=/requirements-tensorrt-models.txt \
115-
pip3 wheel --wheel-dir=/trt-model-wheels -r /requirements-tensorrt-models.txt
115+
pip3 wheel --wheel-dir=/trt-model-wheels --no-deps -r /requirements-tensorrt-models.txt
116116

117117
FROM wget AS jetson-ffmpeg
118118
ARG DEBIAN_FRONTEND
@@ -145,7 +145,8 @@ COPY --from=trt-wheels /etc/TENSORRT_VER /etc/TENSORRT_VER
145145
RUN --mount=type=bind,from=trt-wheels,source=/trt-wheels,target=/deps/trt-wheels \
146146
--mount=type=bind,from=trt-model-wheels,source=/trt-model-wheels,target=/deps/trt-model-wheels \
147147
pip3 uninstall -y onnxruntime \
148-
&& pip3 install -U /deps/trt-wheels/*.whl /deps/trt-model-wheels/*.whl \
148+
&& pip3 install -U /deps/trt-wheels/*.whl \
149+
&& pip3 install -U /deps/trt-model-wheels/*.whl \
149150
&& ldconfig
150151

151152
WORKDIR /opt/frigate/

0 commit comments

Comments
 (0)