Skip to content

NVR with realtime local object detection for IP cameras

Pull sqlite3 from mirror (#19540)

Nicolas Mowen06539c925c3d
diff --git a/docker/main/Dockerfile b/docker/main/Dockerfile
index f58e3d5a9a..1cf752ed54 100644
--- a/docker/main/Dockerfile
+++ b/docker/main/Dockerfile
@@ -152,7 +152,7 @@ ARG TARGETARCH
# Use a separate container to build wheels to prevent build dependencies in final image
RUN apt-get -qq update \
&& apt-get -qq install -y \
- apt-transport-https wget \
+ apt-transport-https wget unzip \
&& apt-get -qq update \
&& apt-get -qq install -y \
python3.11 \
diff --git a/docker/main/build_pysqlite3.sh b/docker/main/build_pysqlite3.sh
index 6375b33fa2..c84c6fcf71 100755
--- a/docker/main/build_pysqlite3.sh
+++ b/docker/main/build_pysqlite3.sh
@@ -2,18 +2,25 @@
set -euxo pipefail
-SQLITE3_VERSION="96c92aba00c8375bc32fafcdf12429c58bd8aabfcadab6683e35bbb9cdebf19e" # 3.46.0
+SQLITE3_VERSION="3.46.1"
PYSQLITE3_VERSION="0.5.3"
-# Fetch the source code for the latest release of Sqlite.
+# Fetch the pre-built sqlite amalgamation instead of building from source
if [[ ! -d "sqlite" ]]; then
- wget https://www.sqlite.org/src/tarball/sqlite.tar.gz?r=${SQLITE3_VERSION} -O sqlite.tar.gz
- tar xzf sqlite.tar.gz
- cd sqlite/
- LIBS="-lm" ./configure --disable-tcl --enable-tempstore=always
- make sqlite3.c
+ mkdir sqlite
+ cd sqlite
+
+ # Download the pre-built amalgamation from sqlite.org
+ # For SQLite 3.46.1, the amalgamation version is 3460100
+ SQLITE_AMALGAMATION_VERSION="3460100"
+
+ wget https://www.sqlite.org/2024/sqlite-amalgamation-${SQLITE_AMALGAMATION_VERSION}.zip -O sqlite-amalgamation.zip
+ unzip sqlite-amalgamation.zip
+ mv sqlite-amalgamation-${SQLITE_AMALGAMATION_VERSION}/* .
+ rmdir sqlite-amalgamation-${SQLITE_AMALGAMATION_VERSION}
+ rm sqlite-amalgamation.zip
+
cd ../
- rm sqlite.tar.gz
fi
# Grab the pysqlite3 source code.