From c69dae532677c0d781f7cc877203dd9ef5de41a9 Mon Sep 17 00:00:00 2001 From: MickLesk Date: Mon, 16 Mar 2026 20:23:46 +0100 Subject: [PATCH] immich: use curl with retry function --- ct/immich.sh | 4 ++-- install/immich-install.sh | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ct/immich.sh b/ct/immich.sh index d272d95d8..213f54c48 100644 --- a/ct/immich.sh +++ b/ct/immich.sh @@ -76,7 +76,7 @@ EOF SOURCE_DIR=${STAGING_DIR}/image-source cd /tmp if [[ -f ~/.intel_version ]]; then - curl -fsSLO https://raw.githubusercontent.com/immich-app/immich/refs/heads/main/machine-learning/Dockerfile + curl_with_retry "https://raw.githubusercontent.com/immich-app/immich/refs/heads/main/machine-learning/Dockerfile" "Dockerfile" readarray -t INTEL_URLS < <( sed -n "/intel-[igc|opencl]/p" ./Dockerfile | awk '{print $3}' sed -n "/libigdgmm12/p" ./Dockerfile | awk '{print $3}' @@ -85,7 +85,7 @@ EOF if [[ "$INTEL_RELEASE" != "$(cat ~/.intel_version)" ]]; then msg_info "Updating Intel iGPU dependencies" for url in "${INTEL_URLS[@]}"; do - curl -fsSLO "$url" + curl_with_retry "$url" "$(basename "$url")" done $STD apt-mark unhold libigdgmm12 $STD apt install -y --allow-downgrades ./libigdgmm12*.deb diff --git a/install/immich-install.sh b/install/immich-install.sh index cd0a932bc..898b0b232 100644 --- a/install/immich-install.sh +++ b/install/immich-install.sh @@ -32,13 +32,13 @@ if [ -d /dev/dri ]; then $STD apt install -y --no-install-recommends patchelf tmp_dir=$(mktemp -d) $STD pushd "$tmp_dir" - curl -fsSLO https://raw.githubusercontent.com/immich-app/immich/refs/heads/main/machine-learning/Dockerfile + curl_with_retry "https://raw.githubusercontent.com/immich-app/immich/refs/heads/main/machine-learning/Dockerfile" "Dockerfile" readarray -t INTEL_URLS < <( sed -n "/intel-[igc|opencl]/p" ./Dockerfile | awk '{print $3}' sed -n "/libigdgmm12/p" ./Dockerfile | awk '{print $3}' ) for url in "${INTEL_URLS[@]}"; do - curl -fsSLO "$url" + curl_with_retry "$url" "$(basename "$url")" done $STD apt install -y ./libigdgmm12*.deb rm ./libigdgmm12*.deb @@ -383,10 +383,10 @@ ln -s "$UPLOAD_DIR" "$ML_DIR"/upload msg_info "Installing GeoNames data" cd "$GEO_DIR" -curl -fsSLZ -O "https://download.geonames.org/export/dump/admin1CodesASCII.txt" \ - -O "https://download.geonames.org/export/dump/admin2Codes.txt" \ - -O "https://download.geonames.org/export/dump/cities500.zip" \ - -O "https://raw.githubusercontent.com/nvkelso/natural-earth-vector/v5.1.2/geojson/ne_10m_admin_0_countries.geojson" +curl_with_retry "https://download.geonames.org/export/dump/admin1CodesASCII.txt" "admin1CodesASCII.txt" +curl_with_retry "https://download.geonames.org/export/dump/admin2Codes.txt" "admin2Codes.txt" +curl_with_retry "https://download.geonames.org/export/dump/cities500.zip" "cities500.zip" +curl_with_retry "https://raw.githubusercontent.com/nvkelso/natural-earth-vector/v5.1.2/geojson/ne_10m_admin_0_countries.geojson" "ne_10m_admin_0_countries.geojson" unzip -q cities500.zip date --iso-8601=seconds | tr -d "\n" >geodata-date.txt rm cities500.zip