mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-11-20 20:45:15 +00:00
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
This commit is contained in:
29
ct/immich.sh
29
ct/immich.sh
@@ -61,6 +61,15 @@ EOF
|
||||
msg_ok "Installed libmimalloc3"
|
||||
fi
|
||||
|
||||
if [[ ! -f /etc/apt/sources.list.d/mise.list ]]; then
|
||||
msg_info "Installing Mise"
|
||||
curl -fSs https://mise.jdx.dev/gpg-key.pub | tee /etc/apt/keyrings/mise-archive-keyring.pub 1>/dev/null
|
||||
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
|
||||
$STD apt update
|
||||
$STD apt install -y mise
|
||||
msg_ok "Installed Mise"
|
||||
fi
|
||||
|
||||
STAGING_DIR=/opt/staging
|
||||
BASE_DIR=${STAGING_DIR}/base-images
|
||||
SOURCE_DIR=${STAGING_DIR}/image-source
|
||||
@@ -93,7 +102,7 @@ EOF
|
||||
msg_ok "Image-processing libraries up to date"
|
||||
fi
|
||||
|
||||
RELEASE="2.2.3"
|
||||
RELEASE="2.3.1"
|
||||
if check_for_gh_release "immich" "immich-app/immich" "${RELEASE}"; then
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop immich-web
|
||||
@@ -121,6 +130,7 @@ EOF
|
||||
UPLOAD_DIR="$(sed -n '/^IMMICH_MEDIA_LOCATION/s/[^=]*=//p' /opt/immich/.env)"
|
||||
SRC_DIR="${INSTALL_DIR}/source"
|
||||
APP_DIR="${INSTALL_DIR}/app"
|
||||
PLUGIN_DIR="${APP_DIR}/corePlugin"
|
||||
ML_DIR="${APP_DIR}/machine-learning"
|
||||
GEO_DIR="${INSTALL_DIR}/geodata"
|
||||
|
||||
@@ -145,9 +155,7 @@ EOF
|
||||
rm -rf "${APP_DIR:?}"/*
|
||||
)
|
||||
|
||||
rm -rf "$SRC_DIR"
|
||||
|
||||
fetch_and_deploy_gh_release "immich" "immich-app/immich" "tarball" "v${RELEASE}" "$SRC_DIR"
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "immich" "immich-app/immich" "tarball" "v${RELEASE}" "$SRC_DIR"
|
||||
|
||||
msg_info "Updating ${APP} web and microservices"
|
||||
cd "$SRC_DIR"/server
|
||||
@@ -180,7 +188,18 @@ EOF
|
||||
$STD pnpm --filter @immich/cli --prod --no-optional deploy "$APP_DIR"/cli
|
||||
cd "$APP_DIR"
|
||||
mv "$INSTALL_DIR"/start.sh "$APP_DIR"/bin
|
||||
msg_ok "Updated ${APP} web and microservices"
|
||||
|
||||
# plugins
|
||||
cd "$SRC_DIR"
|
||||
$STD mise trust --ignore ./mise.toml
|
||||
$STD mise trust ./plugins/mise.toml
|
||||
cd plugins
|
||||
$STD mise install
|
||||
$STD mise run build
|
||||
mkdir -p "$PLUGIN_DIR"
|
||||
cp -r ./dist "$PLUGIN_DIR"/dist
|
||||
cp ./manifest.json "$PLUGIN_DIR"
|
||||
msg_ok "Updated ${APP} server, web, cli and plugins"
|
||||
|
||||
cd "$SRC_DIR"/machine-learning
|
||||
mkdir -p "$ML_DIR" && chown -R immich:immich "$ML_DIR"
|
||||
|
||||
@@ -84,6 +84,13 @@ if [[ "$CTTYPE" == "0" && -d /dev/dri ]]; then
|
||||
fi
|
||||
msg_ok "Dependencies Installed"
|
||||
|
||||
msg_info "Installing Mise"
|
||||
curl -fSs https://mise.jdx.dev/gpg-key.pub | tee /etc/apt/keyrings/mise-archive-keyring.pub 1>/dev/null
|
||||
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
|
||||
$STD apt update
|
||||
$STD apt install -y mise
|
||||
msg_ok "Installed Mise"
|
||||
|
||||
read -r -p "${TAB3}Install OpenVINO dependencies for Intel HW-accelerated machine-learning? y/N " prompt
|
||||
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
|
||||
msg_info "Installing OpenVINO dependencies"
|
||||
@@ -277,6 +284,7 @@ INSTALL_DIR="/opt/${APPLICATION}"
|
||||
UPLOAD_DIR="${INSTALL_DIR}/upload"
|
||||
SRC_DIR="${INSTALL_DIR}/source"
|
||||
APP_DIR="${INSTALL_DIR}/app"
|
||||
PLUGIN_DIR="${APP_DIR}/corePlugin"
|
||||
ML_DIR="${APP_DIR}/machine-learning"
|
||||
GEO_DIR="${INSTALL_DIR}/geodata"
|
||||
mkdir -p "$INSTALL_DIR"
|
||||
@@ -314,7 +322,18 @@ cp LICENSE "$APP_DIR"
|
||||
$STD pnpm --filter @immich/sdk --filter @immich/cli --frozen-lockfile install
|
||||
$STD pnpm --filter @immich/sdk --filter @immich/cli build
|
||||
$STD pnpm --filter @immich/cli --prod --no-optional deploy "$APP_DIR"/cli
|
||||
msg_ok "Installed Immich Server and Web Components"
|
||||
|
||||
# plugins
|
||||
cd "$SRC_DIR"
|
||||
$STD mise trust --ignore ./mise.toml
|
||||
$STD mise trust ./plugins/mise.toml
|
||||
cd plugins
|
||||
$STD mise install
|
||||
$STD mise run build
|
||||
mkdir -p "$PLUGIN_DIR"
|
||||
cp -r ./dist "$PLUGIN_DIR"/dist
|
||||
cp ./manifest.json "$PLUGIN_DIR"
|
||||
msg_ok "Installed Immich Server, Web and Plugin Components"
|
||||
|
||||
cd "$SRC_DIR"/machine-learning
|
||||
$STD useradd -U -s /usr/sbin/nologin -r -M -d "$INSTALL_DIR" immich
|
||||
@@ -378,6 +397,10 @@ DB_VECTOR_EXTENSION=vectorchord
|
||||
REDIS_HOSTNAME=127.0.0.1
|
||||
IMMICH_MACHINE_LEARNING_URL=http://127.0.0.1:3003
|
||||
MACHINE_LEARNING_CACHE_FOLDER=${INSTALL_DIR}/cache
|
||||
## - For OpenVINO only - uncomment below to increase
|
||||
## - inference speed while reducing accuracy
|
||||
## - Default is FP32
|
||||
# MACHINE_LEARNING_OPENVINO_PRECISION=FP16
|
||||
|
||||
IMMICH_MEDIA_LOCATION=${UPLOAD_DIR}
|
||||
EOF
|
||||
|
||||
Reference in New Issue
Block a user