mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-10-08 08:26:25 +00:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
999969252a |
@@ -559,16 +559,6 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
||||
|
||||
</details>
|
||||
|
||||
## 2026-10-08
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- Revert "Immich: Pin to v3.3.0" [@MickLesk](https://github.com/MickLesk) ([#17767](https://github.com/community-scripts/ProxmoxVE/pull/17767))
|
||||
|
||||
### 💾 Core
|
||||
|
||||
- Shared VM helpers: disk import, releases, checksums, first boot, IP by MAC [@MickLesk](https://github.com/MickLesk) ([core#117](https://github.com/community-scripts/core/pull/117))
|
||||
|
||||
## 2026-10-07
|
||||
|
||||
### 🆕 New Scripts
|
||||
|
||||
+1
-6
@@ -48,12 +48,7 @@ function update_script() {
|
||||
|
||||
$STD corepack prepare "pnpm@${PNPM_VERSION}" --activate
|
||||
$STD pnpm install --frozen-lockfile
|
||||
# vite's bundler (rolldown) crashes at random on some builds, rolldown#10860.
|
||||
for attempt in 1 2 3; do
|
||||
$STD pnpm --filter client run build-only && break
|
||||
[[ $attempt -eq 3 ]] && { msg_error "Client build failed three times"; exit 1; }
|
||||
msg_warn "Client build failed (attempt $attempt), retrying"
|
||||
done
|
||||
$STD pnpm --filter client run build-only
|
||||
$STD pnpm --filter server run build
|
||||
cp -r /opt/bookorbit/client/dist /opt/bookorbit/server/public
|
||||
mkdir -p /opt/bookorbit/server/migrations
|
||||
|
||||
+21
-14
@@ -77,7 +77,7 @@ EOF
|
||||
BASE_DIR=${STAGING_DIR}/base-images
|
||||
SOURCE_DIR=${STAGING_DIR}/image-source
|
||||
cd /tmp
|
||||
RELEASE="v3.3.0"
|
||||
RELEASE="v3.2.4"
|
||||
if [[ -f ~/.intel_version ]]; then
|
||||
INTEL_SRC="https://raw.githubusercontent.com/immich-app/immich/${RELEASE}/machine-learning"
|
||||
curl -fsSL "${INTEL_SRC}/scripts/install-intel-runtime.sh" -o ./intel-runtime 2>/dev/null ||
|
||||
@@ -274,13 +274,12 @@ EOF
|
||||
msg_info "Updating Intel OpenVINO machine-learning"
|
||||
for attempt in $(seq 1 3); do
|
||||
$STD sudo --preserve-env=VIRTUAL_ENV,UV_HTTP_TIMEOUT -Pnu immich uv sync --extra openvino --no-dev --active --link-mode copy -n -p "${ML_PYTHON}" --managed-python && break
|
||||
[[ $attempt -eq 3 ]] && { msg_error "uv sync failed three times, the machine-learning environment was not built"; exit 1; }
|
||||
msg_warn "uv sync attempt $attempt failed, retrying..." && sleep 10
|
||||
[[ $attempt -lt 3 ]] && msg_warn "uv sync attempt $attempt failed, retrying..." && sleep 10
|
||||
done
|
||||
patchelf --clear-execstack "${VIRTUAL_ENV}/lib/python3.13/site-packages/onnxruntime/capi/onnxruntime_pybind11_state.cpython-313-$(arch_resolve "x86_64" "aarch64")-linux-gnu.so"
|
||||
msg_ok "Updated Intel OpenVINO machine-learning"
|
||||
else
|
||||
ML_PYTHON="python3.13"
|
||||
ML_PYTHON="python3.11"
|
||||
msg_info "Pre-installing Python ${ML_PYTHON} for machine-learning"
|
||||
for attempt in $(seq 1 3); do
|
||||
$STD sudo --preserve-env=VIRTUAL_ENV -Pnu immich uv python install "${ML_PYTHON}" && break
|
||||
@@ -290,8 +289,7 @@ EOF
|
||||
msg_info "Updating machine-learning"
|
||||
for attempt in $(seq 1 3); do
|
||||
$STD sudo --preserve-env=VIRTUAL_ENV,UV_HTTP_TIMEOUT -Pnu immich uv sync --extra cpu --no-dev --active --link-mode copy -n -p "${ML_PYTHON}" --managed-python && break
|
||||
[[ $attempt -eq 3 ]] && { msg_error "uv sync failed three times, the machine-learning environment was not built"; exit 1; }
|
||||
msg_warn "uv sync attempt $attempt failed, retrying..." && sleep 10
|
||||
[[ $attempt -lt 3 ]] && msg_warn "uv sync attempt $attempt failed, retrying..." && sleep 10
|
||||
done
|
||||
msg_ok "Updated machine-learning"
|
||||
fi
|
||||
@@ -335,10 +333,6 @@ EOF
|
||||
sed -i -e '$a\' "$INSTALL_DIR"/.env
|
||||
echo "IMMICH_HELMET_FILE=true" >>"$INSTALL_DIR"/.env
|
||||
fi
|
||||
if ! grep -q 'MODEL_REVISION' "$INSTALL_DIR"/.env; then
|
||||
sed -i -e '$a\' "$INSTALL_DIR"/.env
|
||||
echo "MACHINE_LEARNING_MODEL_REVISION=v2" >>"$INSTALL_DIR"/.env
|
||||
fi
|
||||
|
||||
if grep -q 'ExecStart=/usr/bin/node' /etc/systemd/system/immich-web.service; then
|
||||
sed -i '/^EnvironmentFile=/d' /etc/systemd/system/immich-web.service
|
||||
@@ -347,12 +341,25 @@ EOF
|
||||
fi
|
||||
|
||||
# MickLesk temporary patch for HEIC thumbnail gen
|
||||
MEDIA_REPO_JS="/opt/immich/app/dist/repositories/media.repository.js"
|
||||
if grep -qF "(0, sharp_1.default)(input).metadata()" "$MEDIA_REPO_JS" 2>/dev/null; then
|
||||
msg_info "Patching media.repository.js"
|
||||
sed -i '0,/(0, sharp_1\.default)(input)\.metadata()/s//(0, sharp_1.default)(input, { unlimited: true, limitInputPixels: false }).metadata()/' "$MEDIA_REPO_JS"
|
||||
msg_ok "Patched media.repository.js"
|
||||
MEDIA_REPO_JS="/opt/immich/app/dist/repositories/media.repository.js"
|
||||
if [[ -f "$MEDIA_REPO_JS" ]]; then
|
||||
python3 - <<'PY'
|
||||
from pathlib import Path
|
||||
p = Path('/opt/immich/app/dist/repositories/media.repository.js')
|
||||
s = p.read_text()
|
||||
old = "(0, sharp_1.default)(input).metadata()"
|
||||
new = "(0, sharp_1.default)(input, { unlimited: true, limitInputPixels: false }).metadata()"
|
||||
if new in s:
|
||||
print('hotfix already there')
|
||||
elif old in s:
|
||||
p.write_text(s.replace(old, new, 1))
|
||||
print('hotfix applied')
|
||||
else:
|
||||
print('pattern not found, skipped')
|
||||
PY
|
||||
fi
|
||||
msg_ok "Patched media.repository.js"
|
||||
|
||||
# chown excluding upload dir contents (may be a mount with restricted permissions)
|
||||
chown immich:immich "$INSTALL_DIR"
|
||||
|
||||
@@ -33,12 +33,7 @@ PNPM_VERSION=$(jq -r '.packageManager | ltrimstr("pnpm@")' /opt/bookorbit/packag
|
||||
|
||||
$STD corepack prepare "pnpm@${PNPM_VERSION}" --activate
|
||||
$STD pnpm install --frozen-lockfile
|
||||
# vite's bundler (rolldown) crashes at random on some builds, rolldown#10860.
|
||||
for attempt in 1 2 3; do
|
||||
$STD pnpm --filter client run build-only && break
|
||||
[[ $attempt -eq 3 ]] && { msg_error "Client build failed three times"; exit 1; }
|
||||
msg_warn "Client build failed (attempt $attempt), retrying"
|
||||
done
|
||||
$STD pnpm --filter client run build-only
|
||||
$STD pnpm --filter server run build
|
||||
cp -r /opt/bookorbit/client/dist /opt/bookorbit/server/public
|
||||
mkdir -p /opt/bookorbit/server/migrations
|
||||
|
||||
+21
-11
@@ -13,7 +13,7 @@ setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
RELEASE="v3.3.0"
|
||||
RELEASE="v3.2.4"
|
||||
if lscpu | grep -q 'GenuineIntel'; then
|
||||
echo ""
|
||||
echo ""
|
||||
@@ -442,13 +442,12 @@ if [[ -f ~/.openvino ]]; then
|
||||
msg_info "Installing Intel OpenVINO machine-learning"
|
||||
for attempt in $(seq 1 3); do
|
||||
$STD sudo --preserve-env=VIRTUAL_ENV,UV_HTTP_TIMEOUT -Pnu immich uv sync --extra openvino --no-dev --active --link-mode copy -n -p "${ML_PYTHON}" --managed-python && break
|
||||
[[ $attempt -eq 3 ]] && { msg_error "uv sync failed three times, the machine-learning environment was not built"; exit 1; }
|
||||
msg_warn "uv sync attempt $attempt failed, retrying..." && sleep 10
|
||||
[[ $attempt -lt 3 ]] && msg_warn "uv sync attempt $attempt failed, retrying..." && sleep 10
|
||||
done
|
||||
patchelf --clear-execstack "${VIRTUAL_ENV}/lib/python3.13/site-packages/onnxruntime/capi/onnxruntime_pybind11_state.cpython-313-$(arch_resolve "x86_64" "aarch64")-linux-gnu.so"
|
||||
msg_ok "Installed Intel OpenVINO machine-learning"
|
||||
else
|
||||
ML_PYTHON="python3.13"
|
||||
ML_PYTHON="python3.11"
|
||||
msg_info "Pre-installing Python ${ML_PYTHON} for machine-learning"
|
||||
for attempt in $(seq 1 3); do
|
||||
$STD sudo --preserve-env=VIRTUAL_ENV -Pnu immich uv python install "${ML_PYTHON}" && break
|
||||
@@ -458,8 +457,7 @@ else
|
||||
msg_info "Installing machine-learning"
|
||||
for attempt in $(seq 1 3); do
|
||||
$STD sudo --preserve-env=VIRTUAL_ENV,UV_HTTP_TIMEOUT -Pnu immich uv sync --extra cpu --no-dev --active --link-mode copy -n -p "${ML_PYTHON}" --managed-python && break
|
||||
[[ $attempt -eq 3 ]] && { msg_error "uv sync failed three times, the machine-learning environment was not built"; exit 1; }
|
||||
msg_warn "uv sync attempt $attempt failed, retrying..." && sleep 10
|
||||
[[ $attempt -lt 3 ]] && msg_warn "uv sync attempt $attempt failed, retrying..." && sleep 10
|
||||
done
|
||||
msg_ok "Installed machine-learning"
|
||||
fi
|
||||
@@ -490,12 +488,25 @@ ln -s "$GEO_DIR" "$APP_DIR"
|
||||
msg_ok "Installed GeoNames data"
|
||||
|
||||
# MickLesk temporary patch for HEIC thumbnail gen
|
||||
msg_info "Patching media.repository.js"
|
||||
MEDIA_REPO_JS="/opt/immich/app/dist/repositories/media.repository.js"
|
||||
if grep -qF "(0, sharp_1.default)(input).metadata()" "$MEDIA_REPO_JS" 2>/dev/null; then
|
||||
msg_info "Patching media.repository.js"
|
||||
sed -i '0,/(0, sharp_1\.default)(input)\.metadata()/s//(0, sharp_1.default)(input, { unlimited: true, limitInputPixels: false }).metadata()/' "$MEDIA_REPO_JS"
|
||||
msg_ok "Patched media.repository.js"
|
||||
if [[ -f "$MEDIA_REPO_JS" ]]; then
|
||||
python3 - <<'PY'
|
||||
from pathlib import Path
|
||||
p = Path('/opt/immich/app/dist/repositories/media.repository.js')
|
||||
s = p.read_text()
|
||||
old = "(0, sharp_1.default)(input).metadata()"
|
||||
new = "(0, sharp_1.default)(input, { unlimited: true, limitInputPixels: false }).metadata()"
|
||||
if new in s:
|
||||
print('hotfix already there')
|
||||
elif old in s:
|
||||
p.write_text(s.replace(old, new, 1))
|
||||
print('hotfix applied')
|
||||
else:
|
||||
print('pattern not found, skipped')
|
||||
PY
|
||||
fi
|
||||
msg_ok "Patched media.repository.js"
|
||||
|
||||
mkdir -p /var/log/immich
|
||||
touch /var/log/immich/{web.log,ml.log}
|
||||
@@ -526,7 +537,6 @@ MACHINE_LEARNING_CACHE_FOLDER=${INSTALL_DIR}/cache
|
||||
## - inference speed while reducing accuracy
|
||||
## - Default is FP32
|
||||
# MACHINE_LEARNING_OPENVINO_PRECISION=FP16
|
||||
MACHINE_LEARNING_MODEL_REVISION=v2
|
||||
|
||||
IMMICH_MEDIA_LOCATION=${UPLOAD_DIR}
|
||||
EOF
|
||||
|
||||
Reference in New Issue
Block a user