Skip to content

Commit 12eec5f

Browse files
authored
Immich: v2.1.0 (#8348)
- Ensure VectorChord upgrades only run if there is also an Immich update - Ensure pgvector is up-to-date before updating VectorChord - Move postgresql service restart before extension update commands - Add reindex commands to update process - Attempt to address superfluous sharp compilation
1 parent 64ea47c commit 12eec5f

File tree

2 files changed

+23
-17
lines changed

2 files changed

+23
-17
lines changed

ct/immich.sh

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -92,32 +92,35 @@ EOF
9292
done
9393
msg_ok "Image-processing libraries up to date"
9494
fi
95-
RELEASE="2.0.1"
95+
96+
RELEASE="2.1.1"
9697
if check_for_gh_release "immich" "immich-app/immich" "${RELEASE}"; then
9798
msg_info "Stopping Services"
9899
systemctl stop immich-web
99100
systemctl stop immich-ml
100-
msg_ok "Stopped Service"
101-
INSTALL_DIR="/opt/${APP}"
102-
UPLOAD_DIR="$(sed -n '/^IMMICH_MEDIA_LOCATION/s/[^=]*=//p' /opt/immich/.env)"
103-
SRC_DIR="${INSTALL_DIR}/source"
104-
APP_DIR="${INSTALL_DIR}/app"
105-
ML_DIR="${APP_DIR}/machine-learning"
106-
GEO_DIR="${INSTALL_DIR}/geodata"
107-
VCHORD_RELEASE="0.4.3"
108-
# VCHORD_RELEASE="$(curl -fsSL https://api.github.com/repos/tensorchord/vectorchord/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')"
109-
101+
msg_ok "Stopped Services"
102+
VCHORD_RELEASE="0.5.3"
110103
if [[ ! -f ~/.vchord_version ]] || [[ "$VCHORD_RELEASE" != "$(cat ~/.vchord_version)" ]]; then
111-
msg_info "Updating VectorChord"
104+
msg_info "Upgrading VectorChord"
112105
curl -fsSL "https://github.com/tensorchord/vectorchord/releases/download/${VCHORD_RELEASE}/postgresql-16-vchord_${VCHORD_RELEASE}-1_amd64.deb" -o vchord.deb
113106
$STD apt install -y ./vchord.deb
114-
$STD sudo -u postgres psql -d immich -c "ALTER EXTENSION vchord UPDATE;"
115107
systemctl restart postgresql
108+
$STD sudo -u postgres psql -d immich -c "ALTER EXTENSION vector UPDATE;"
109+
$STD sudo -u postgres psql -d immich -c "ALTER EXTENSION vchord UPDATE;"
110+
$STD sudo -u postgres psql -d immich -c "REINDEX INDEX face_index;"
111+
$STD sudo -u postgres psql -d immich -c "REINDEX INDEX clip_index;"
116112
echo "$VCHORD_RELEASE" >~/.vchord_version
117113
rm ./vchord.deb
118-
msg_ok "Updated VectorChord to v${VCHORD_RELEASE}"
114+
msg_ok "Upgraded VectorChord to v${VCHORD_RELEASE}"
119115
fi
120116

117+
INSTALL_DIR="/opt/${APP}"
118+
UPLOAD_DIR="$(sed -n '/^IMMICH_MEDIA_LOCATION/s/[^=]*=//p' /opt/immich/.env)"
119+
SRC_DIR="${INSTALL_DIR}/source"
120+
APP_DIR="${INSTALL_DIR}/app"
121+
ML_DIR="${APP_DIR}/machine-learning"
122+
GEO_DIR="${INSTALL_DIR}/geodata"
123+
121124
cp "$ML_DIR"/ml_start.sh "$INSTALL_DIR"
122125
if grep -qs "set -a" "$APP_DIR"/bin/start.sh; then
123126
cp "$APP_DIR"/bin/start.sh "$INSTALL_DIR"
@@ -162,6 +165,8 @@ EOF
162165
cd "$SRC_DIR"
163166
echo "packageImportMethod: hardlink" >>./pnpm-workspace.yaml
164167
$STD pnpm --filter @immich/sdk --filter immich-web --frozen-lockfile --force install
168+
unset SHARP_FORCE_GLOBAL_LIBVIPS
169+
export SHARP_IGNORE_GLOBAL_LIBVIPS=true
165170
$STD pnpm --filter @immich/sdk --filter immich-web build
166171
cp -a web/build "$APP_DIR"/www
167172
cp LICENSE "$APP_DIR"

install/immich-install.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,7 @@ NODE_VERSION="22" NODE_MODULE="pnpm@${PNPM_VERSION}" setup_nodejs
130130
PG_VERSION="16" PG_MODULES="pgvector" setup_postgresql
131131

132132
msg_info "Setting up Postgresql Database"
133-
VCHORD_RELEASE="0.4.3"
134-
# VCHORD_RELEASE="$(curl -fsSL https://api.github.com/repos/tensorchord/vectorchord/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')"
133+
VCHORD_RELEASE="0.5.3"
135134
curl -fsSL "https://github.com/tensorchord/VectorChord/releases/download/${VCHORD_RELEASE}/postgresql-16-vchord_${VCHORD_RELEASE}-1_amd64.deb" -o vchord.deb
136135
$STD apt install -y ./vchord.deb
137136
rm vchord.deb
@@ -288,7 +287,7 @@ GEO_DIR="${INSTALL_DIR}/geodata"
288287
mkdir -p "$INSTALL_DIR"
289288
mkdir -p {"${APP_DIR}","${UPLOAD_DIR}","${GEO_DIR}","${INSTALL_DIR}"/cache}
290289

291-
fetch_and_deploy_gh_release "immich" "immich-app/immich" "tarball" "v2.0.1" "$SRC_DIR"
290+
fetch_and_deploy_gh_release "immich" "immich-app/immich" "tarball" "v2.1.0" "$SRC_DIR"
292291

293292
msg_info "Installing ${APPLICATION} (patience)"
294293

@@ -310,6 +309,8 @@ sed -i 's|^start|./start|' "$APP_DIR"/bin/immich-admin
310309
cd "$SRC_DIR"
311310
echo "packageImportMethod: hardlink" >>./pnpm-workspace.yaml
312311
$STD pnpm --filter @immich/sdk --filter immich-web --frozen-lockfile --force install
312+
unset SHARP_FORCE_GLOBAL_LIBVIPS
313+
export SHARP_IGNORE_GLOBAL_LIBVIPS=true
313314
$STD pnpm --filter @immich/sdk --filter immich-web build
314315
cp -a web/build "$APP_DIR"/www
315316
cp LICENSE "$APP_DIR"

0 commit comments

Comments
 (0)