Skip to content

Commit dd8bb6f

Browse files
authored
Immich v2.3.1: OpenVINO tuning, OCR fixes, Maintenance mode, workflows/plugin framework (#9310)
* Add env var for OpenVINO floating point precision setting * v2.3.1 - Maintenance mode, workflow/plugin framework
1 parent 9879cb4 commit dd8bb6f

File tree

2 files changed

+48
-6
lines changed

2 files changed

+48
-6
lines changed

ct/immich.sh

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,15 @@ EOF
6161
msg_ok "Installed libmimalloc3"
6262
fi
6363

64+
if [[ ! -f /etc/apt/sources.list.d/mise.list ]]; then
65+
msg_info "Installing Mise"
66+
curl -fSs https://mise.jdx.dev/gpg-key.pub | tee /etc/apt/keyrings/mise-archive-keyring.pub 1>/dev/null
67+
echo "deb [signed-by=/etc/apt/keyrings/mise-archive-keyring.pub arch=amd64] https://mise.jdx.dev/deb stable main" | tee /etc/apt/sources.list.d/mise.list
68+
$STD apt update
69+
$STD apt install -y mise
70+
msg_ok "Installed Mise"
71+
fi
72+
6473
STAGING_DIR=/opt/staging
6574
BASE_DIR=${STAGING_DIR}/base-images
6675
SOURCE_DIR=${STAGING_DIR}/image-source
@@ -93,7 +102,7 @@ EOF
93102
msg_ok "Image-processing libraries up to date"
94103
fi
95104

96-
RELEASE="2.2.3"
105+
RELEASE="2.3.1"
97106
if check_for_gh_release "immich" "immich-app/immich" "${RELEASE}"; then
98107
msg_info "Stopping Services"
99108
systemctl stop immich-web
@@ -121,6 +130,7 @@ EOF
121130
UPLOAD_DIR="$(sed -n '/^IMMICH_MEDIA_LOCATION/s/[^=]*=//p' /opt/immich/.env)"
122131
SRC_DIR="${INSTALL_DIR}/source"
123132
APP_DIR="${INSTALL_DIR}/app"
133+
PLUGIN_DIR="${APP_DIR}/corePlugin"
124134
ML_DIR="${APP_DIR}/machine-learning"
125135
GEO_DIR="${INSTALL_DIR}/geodata"
126136

@@ -145,9 +155,7 @@ EOF
145155
rm -rf "${APP_DIR:?}"/*
146156
)
147157

148-
rm -rf "$SRC_DIR"
149-
150-
fetch_and_deploy_gh_release "immich" "immich-app/immich" "tarball" "v${RELEASE}" "$SRC_DIR"
158+
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "immich" "immich-app/immich" "tarball" "v${RELEASE}" "$SRC_DIR"
151159

152160
msg_info "Updating ${APP} web and microservices"
153161
cd "$SRC_DIR"/server
@@ -180,7 +188,18 @@ EOF
180188
$STD pnpm --filter @immich/cli --prod --no-optional deploy "$APP_DIR"/cli
181189
cd "$APP_DIR"
182190
mv "$INSTALL_DIR"/start.sh "$APP_DIR"/bin
183-
msg_ok "Updated ${APP} web and microservices"
191+
192+
# plugins
193+
cd "$SRC_DIR"
194+
$STD mise trust --ignore ./mise.toml
195+
$STD mise trust ./plugins/mise.toml
196+
cd plugins
197+
$STD mise install
198+
$STD mise run build
199+
mkdir -p "$PLUGIN_DIR"
200+
cp -r ./dist "$PLUGIN_DIR"/dist
201+
cp ./manifest.json "$PLUGIN_DIR"
202+
msg_ok "Updated ${APP} server, web, cli and plugins"
184203

185204
cd "$SRC_DIR"/machine-learning
186205
mkdir -p "$ML_DIR" && chown -R immich:immich "$ML_DIR"

install/immich-install.sh

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,13 @@ if [[ "$CTTYPE" == "0" && -d /dev/dri ]]; then
8484
fi
8585
msg_ok "Dependencies Installed"
8686

87+
msg_info "Installing Mise"
88+
curl -fSs https://mise.jdx.dev/gpg-key.pub | tee /etc/apt/keyrings/mise-archive-keyring.pub 1>/dev/null
89+
echo "deb [signed-by=/etc/apt/keyrings/mise-archive-keyring.pub arch=amd64] https://mise.jdx.dev/deb stable main" | tee /etc/apt/sources.list.d/mise.list
90+
$STD apt update
91+
$STD apt install -y mise
92+
msg_ok "Installed Mise"
93+
8794
read -r -p "${TAB3}Install OpenVINO dependencies for Intel HW-accelerated machine-learning? y/N " prompt
8895
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
8996
msg_info "Installing OpenVINO dependencies"
@@ -277,6 +284,7 @@ INSTALL_DIR="/opt/${APPLICATION}"
277284
UPLOAD_DIR="${INSTALL_DIR}/upload"
278285
SRC_DIR="${INSTALL_DIR}/source"
279286
APP_DIR="${INSTALL_DIR}/app"
287+
PLUGIN_DIR="${APP_DIR}/corePlugin"
280288
ML_DIR="${APP_DIR}/machine-learning"
281289
GEO_DIR="${INSTALL_DIR}/geodata"
282290
mkdir -p "$INSTALL_DIR"
@@ -314,7 +322,18 @@ cp LICENSE "$APP_DIR"
314322
$STD pnpm --filter @immich/sdk --filter @immich/cli --frozen-lockfile install
315323
$STD pnpm --filter @immich/sdk --filter @immich/cli build
316324
$STD pnpm --filter @immich/cli --prod --no-optional deploy "$APP_DIR"/cli
317-
msg_ok "Installed Immich Server and Web Components"
325+
326+
# plugins
327+
cd "$SRC_DIR"
328+
$STD mise trust --ignore ./mise.toml
329+
$STD mise trust ./plugins/mise.toml
330+
cd plugins
331+
$STD mise install
332+
$STD mise run build
333+
mkdir -p "$PLUGIN_DIR"
334+
cp -r ./dist "$PLUGIN_DIR"/dist
335+
cp ./manifest.json "$PLUGIN_DIR"
336+
msg_ok "Installed Immich Server, Web and Plugin Components"
318337

319338
cd "$SRC_DIR"/machine-learning
320339
$STD useradd -U -s /usr/sbin/nologin -r -M -d "$INSTALL_DIR" immich
@@ -378,6 +397,10 @@ DB_VECTOR_EXTENSION=vectorchord
378397
REDIS_HOSTNAME=127.0.0.1
379398
IMMICH_MACHINE_LEARNING_URL=http://127.0.0.1:3003
380399
MACHINE_LEARNING_CACHE_FOLDER=${INSTALL_DIR}/cache
400+
## - For OpenVINO only - uncomment below to increase
401+
## - inference speed while reducing accuracy
402+
## - Default is FP32
403+
# MACHINE_LEARNING_OPENVINO_PRECISION=FP16
381404
382405
IMMICH_MEDIA_LOCATION=${UPLOAD_DIR}
383406
EOF

0 commit comments

Comments
 (0)