From 102545a7d7d5ff21bcf43bdd63aa2a4dd517dbfd Mon Sep 17 00:00:00 2001 From: Kemal Yaylali Date: Sun, 27 Sep 2026 19:36:49 +0100 Subject: [PATCH] cloud trial: set HOME/PATH for cloud-init, unit tests non-fatal The first run stopped after 1 minute (HOME unbound under set -u) and terminated itself as designed. --- scripts/cloud/userdata.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/cloud/userdata.sh b/scripts/cloud/userdata.sh index a700ded..5f51696 100755 --- a/scripts/cloud/userdata.sh +++ b/scripts/cloud/userdata.sh @@ -9,6 +9,8 @@ # so nothing keeps costing money afterwards. A CloudWatch alarm (layer 3) terminates an idle instance from # outside, in case the OS hangs. set -uo pipefail +export HOME=/root # cloud-init runs user-data without HOME +export PATH="/root/.local/bin:/snap/bin:$PATH" BUCKET="__BUCKET__" RUN="__RUN__" MAX_MINUTES="__MAX_MINUTES__" @@ -40,7 +42,6 @@ mkdir -p /work && cd /work $S3 cp "s3://$BUCKET/$RUN/repo.tar.gz" . --only-show-errors mkdir repo && tar -xzf repo.tar.gz -C repo && cd repo curl -LsSf https://astral.sh/uv/install.sh | sh -export PATH="$HOME/.local/bin:$PATH" uv venv -q --python 3.12 .venv && uv pip install -q -e ".[dev]" mkdir -p refs && git clone -q --depth 1 https://github.com/Illumina/BeadArrayFiles.git refs/BeadArrayFiles @@ -54,7 +55,7 @@ $S3 cp --no-sign-request "$SRC/Omni25_idats_gtcs_2141_samples.tgz" - | pigz -dc echo "=== extracted $(du -sh $D/data | cut -f1) at $(date -u +%T) ===" echo "=== validation $(date -u +%T) ===" -.venv/bin/python -m pytest tests/unit -q -p no:cacheprovider +.venv/bin/python -m pytest tests/unit -q -p no:cacheprovider || echo "unit tests reported failures (continuing)" .venv/bin/python scripts/validate_p1_large.py --root $D/data --bpm $D/HumanOmni2.5-4v1-Multi_B.bpm \ --egt $D/HumanOmni2.5-4v1-Multi_B.egt --csv $D/HumanOmni2.5-4v1_B.csv --out /work/summary.json \ --workers "$(nproc)" || echo "validation reported differences (see summary.json)"