Skip to content

Commit 4dc5a89

Browse files
committed
Immich: backup ml_start.sh during update
1 parent 195a776 commit 4dc5a89

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ct/immich.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,8 @@ function update_script() {
188188
SRC_DIR="${INSTALL_DIR}/source"
189189
APP_DIR="${INSTALL_DIR}/app"
190190
ML_DIR="${APP_DIR}/machine-learning"
191+
GEO_DIR="${INSTALL_DIR}/geodata"
192+
cp "$ML_DIR"/ml_start.sh "$INSTALL_DIR"
191193
rm -rf "${APP_DIR:?}"/*
192194
rm -rf "$SRC_DIR"
193195
immich_zip=$(mktemp)
@@ -236,6 +238,7 @@ function update_script() {
236238
fi
237239
cd "$SRC_DIR"
238240
cp -a machine-learning/{ann,immich_ml} "$ML_DIR"
241+
cp "$INSTALL_DIR"/ml_start.sh "$ML_DIR"
239242
if [[ -f ~/.openvino ]]; then
240243
sed -i "/intra_op/s/int = 0/int = os.cpu_count() or 0/" "$ML_DIR"/immich_ml/config.py
241244
fi
@@ -246,6 +249,7 @@ function update_script() {
246249
sed -i "s@\"/cache\"@\"$INSTALL_DIR/cache\"@g" "$ML_DIR"/immich_ml/config.py
247250
ln -s "$UPLOAD_DIR" "$APP_DIR"/upload
248251
ln -s "$UPLOAD_DIR" "$ML_DIR"/upload
252+
ln -s "$GEO_DIR" "$APP_DIR"
249253

250254
msg_info "Updating Immich CLI"
251255
$STD npm install --build-from-source sharp

0 commit comments

Comments
 (0)