File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,7 +11,9 @@ apt-get install -y \
1111 ca-certificates \
1212 curl \
1313 gnupg \
14- lsb-release
14+ jq \
15+ lsb-release \
16+ rsync
1517
1618mkdir -p /etc/apt/keyrings
1719
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ GHCR_PASSWORD=${GHCR_PASSWORD:-""}
3434GHCR_USERNAME=${GHCR_USERNAME:- " " }
3535
3636if [[ " $EXPERIMENT_MODE " == " snapshot" ]]; then
37+ ssh_with_retry -o ServerAliveInterval=10 -o ServerAliveCountMax=10 " ${SERVER_USERNAME} @${IP_OF_THE_CLIENT} " " rm -rf ~/configurations ~/datasets.json"
3738 scp_with_retry " ${SCRIPT_PATH} /run_experiment.sh" " ${SERVER_USERNAME} @${IP_OF_THE_CLIENT} :~/run_experiment_snapshot.sh"
3839 scp_with_retry " ${SCRIPT_PATH} /../datasets/datasets.json" " ${SERVER_USERNAME} @${IP_OF_THE_CLIENT} :~/datasets.json"
3940 scp_with_retry -r " ${SCRIPT_PATH} /../experiments/configurations" " ${SERVER_USERNAME} @${IP_OF_THE_CLIENT} :~/configurations"
@@ -51,6 +52,7 @@ if [[ "$EXPERIMENT_MODE" == "snapshot" ]]; then
5152 ssh_with_retry -tt -o ServerAliveInterval=120 -o ServerAliveCountMax=10 " ${SERVER_USERNAME} @${IP_OF_THE_CLIENT} " " ${RUN_EXPERIMENT} "
5253
5354else
55+ ssh_with_retry -o ServerAliveInterval=10 -o ServerAliveCountMax=10 " ${SERVER_USERNAME} @${IP_OF_THE_CLIENT} " " rm -rf ~/configurations ~/datasets.json"
5456 scp_with_retry " ${SCRIPT_PATH} /run_experiment.sh" " ${SERVER_USERNAME} @${IP_OF_THE_CLIENT} :~/run_experiment.sh"
5557 scp_with_retry " ${SCRIPT_PATH} /../datasets/datasets.json" " ${SERVER_USERNAME} @${IP_OF_THE_CLIENT} :~/datasets.json"
5658 scp_with_retry -r " ${SCRIPT_PATH} /../experiments/configurations" " ${SERVER_USERNAME} @${IP_OF_THE_CLIENT} :~/configurations"
Original file line number Diff line number Diff line change @@ -12,7 +12,11 @@ if [[ -n "${GHCR_PASSWORD}" ]] || [[ "${VECTOR_DB_BENCHMARK_IMAGE}" == ghcr.io/*
1212 echo " GHCR_PASSWORD and GHCR_USERNAME is required to pull images from ghcr.io"
1313 exit 1
1414 fi
15- echo " ${GHCR_PASSWORD} " | docker login ghcr.io -u " ${GHCR_USERNAME} " --password-stdin
15+ for i in 1 2 3; do
16+ echo " ${GHCR_PASSWORD} " | docker login ghcr.io -u " ${GHCR_USERNAME} " --password-stdin && break
17+ echo " docker login attempt ${i} failed, retrying in $(( i * 10 )) s..."
18+ sleep $(( i * 10 ))
19+ done
1620fi
1721
1822ENGINE_NAME=${ENGINE_NAME:- " qdrant-continuous-benchmark" }
Original file line number Diff line number Diff line change @@ -11,7 +11,8 @@ cleanup() {
1111 # bash -x "${SCRIPT_PATH}/tear_down.sh"
1212}
1313
14- trap ' echo signal received!; kill $(jobs -p); wait; cleanup' SIGINT SIGTERM
14+ # Guarded kill/wait: no-op cleanly when there are no bg jobs (otherwise `set -e` trips on Ctrl-C). EXIT trap below calls cleanup once.
15+ trap ' echo signal received!; bg=$(jobs -p); [ -n "$bg" ] && kill $bg 2>/dev/null; wait 2>/dev/null || true' SIGINT SIGTERM
1516
1617CLOUD_NAME=${CLOUD_NAME:- " hetzner" }
1718
You can’t perform that action at this time.
0 commit comments