Skip to content

Commit c69dae5

Browse files
committed
immich: use curl with retry function
1 parent fee4617 commit c69dae5

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

ct/immich.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ EOF
7676
SOURCE_DIR=${STAGING_DIR}/image-source
7777
cd /tmp
7878
if [[ -f ~/.intel_version ]]; then
79-
curl -fsSLO https://raw.githubusercontent.com/immich-app/immich/refs/heads/main/machine-learning/Dockerfile
79+
curl_with_retry "https://raw.githubusercontent.com/immich-app/immich/refs/heads/main/machine-learning/Dockerfile" "Dockerfile"
8080
readarray -t INTEL_URLS < <(
8181
sed -n "/intel-[igc|opencl]/p" ./Dockerfile | awk '{print $3}'
8282
sed -n "/libigdgmm12/p" ./Dockerfile | awk '{print $3}'
@@ -85,7 +85,7 @@ EOF
8585
if [[ "$INTEL_RELEASE" != "$(cat ~/.intel_version)" ]]; then
8686
msg_info "Updating Intel iGPU dependencies"
8787
for url in "${INTEL_URLS[@]}"; do
88-
curl -fsSLO "$url"
88+
curl_with_retry "$url" "$(basename "$url")"
8989
done
9090
$STD apt-mark unhold libigdgmm12
9191
$STD apt install -y --allow-downgrades ./libigdgmm12*.deb

install/immich-install.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ if [ -d /dev/dri ]; then
3232
$STD apt install -y --no-install-recommends patchelf
3333
tmp_dir=$(mktemp -d)
3434
$STD pushd "$tmp_dir"
35-
curl -fsSLO https://raw.githubusercontent.com/immich-app/immich/refs/heads/main/machine-learning/Dockerfile
35+
curl_with_retry "https://raw.githubusercontent.com/immich-app/immich/refs/heads/main/machine-learning/Dockerfile" "Dockerfile"
3636
readarray -t INTEL_URLS < <(
3737
sed -n "/intel-[igc|opencl]/p" ./Dockerfile | awk '{print $3}'
3838
sed -n "/libigdgmm12/p" ./Dockerfile | awk '{print $3}'
3939
)
4040
for url in "${INTEL_URLS[@]}"; do
41-
curl -fsSLO "$url"
41+
curl_with_retry "$url" "$(basename "$url")"
4242
done
4343
$STD apt install -y ./libigdgmm12*.deb
4444
rm ./libigdgmm12*.deb
@@ -383,10 +383,10 @@ ln -s "$UPLOAD_DIR" "$ML_DIR"/upload
383383

384384
msg_info "Installing GeoNames data"
385385
cd "$GEO_DIR"
386-
curl -fsSLZ -O "https://download.geonames.org/export/dump/admin1CodesASCII.txt" \
387-
-O "https://download.geonames.org/export/dump/admin2Codes.txt" \
388-
-O "https://download.geonames.org/export/dump/cities500.zip" \
389-
-O "https://raw.githubusercontent.com/nvkelso/natural-earth-vector/v5.1.2/geojson/ne_10m_admin_0_countries.geojson"
386+
curl_with_retry "https://download.geonames.org/export/dump/admin1CodesASCII.txt" "admin1CodesASCII.txt"
387+
curl_with_retry "https://download.geonames.org/export/dump/admin2Codes.txt" "admin2Codes.txt"
388+
curl_with_retry "https://download.geonames.org/export/dump/cities500.zip" "cities500.zip"
389+
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"
390390
unzip -q cities500.zip
391391
date --iso-8601=seconds | tr -d "\n" >geodata-date.txt
392392
rm cities500.zip

0 commit comments

Comments
 (0)