From c5970a76f49f1fb65f9a43d6cf6bec4bc0f34f23 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Fri, 9 Oct 2026 14:38:43 +0200 Subject: [PATCH] ci: the battery workflow keeps the battery machine's own paths and mounts The workflow runs on the battery machine, not on the development workstation, so the data roots (/data/open, /data/inhouse), the whole /data/battery mount, the scratch directory (/data/battery/scratch/), the kept reports (/data/battery/ci_reports) and the runner's valid_volumes are back as that machine has them; the remark tying the image to one host's driver is gone. The private arm stays out because the site config names only open and inhouse. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01SVmAWnzCmRKAXVUCdc4iNi --- .gitea/workflows/battery.yml | 50 ++++++++++++++++-------------------- tools/battery/README.md | 2 +- 2 files changed, 23 insertions(+), 29 deletions(-) diff --git a/.gitea/workflows/battery.yml b/.gitea/workflows/battery.yml index 86b04567c..398babefc 100644 --- a/.gitea/workflows/battery.yml +++ b/.gitea/workflows/battery.yml @@ -1,24 +1,23 @@ name: Validation battery -# Every push runs the ci tier of tools/battery (25 sets, about 10 minutes of rugnux on the RTX 5080, -# plus the build); the full battery (open + inhouse arms, about 2 hours of rugnux) runs only when -# started by hand. Both run on the one machine that holds the battery data, one at a time (the -# concurrency group below), under their own runner label. The private arm is never mounted or run. +# Every push runs the ci tier of tools/battery (25 sets, about 10 minutes of rugnux on an RTX 5080, +# plus the build); the full battery (open + inhouse arms, about 2 hours of rugnux there) runs only +# when started by hand. Both run on the one machine that holds the battery data, one at a time (the +# concurrency group below), under their own runner label, with the data mounted read-only and +# /data/battery (scratch, kept reports, PDB/COD caches, the full-run lock) read-write. The site +# config below names only the open and inhouse arms; the private arm is never run here. # # The job fails when a ci-tier set fails on lattice or space group, crashes or has no input - in any # run that includes those sets, so a manual full run fails on them too. Every other failure and every # metric is reported, not judged: read the table at the end of the battery step and the report. -# Only each run's report.md and battery.log are kept: in /data/battery/ci/reports and as the job's -# artifact; the run directory itself is scratch. +# Only each run's report.md and battery.log are kept: report.md in /data/battery/ci_reports, both as +# the job's artifact; the run directory itself is scratch. # # Runner side (/opt/gitea/config.yaml on that machine, then restart the runner): # runner.labels: + "jfjoch_battery:docker://gitea.psi.ch/leonarski_f/jfjoch_rocky8:2609" # runner.timeout: 12h (the default 3h kills a full battery) -# container.valid_volumes: ["/ssd/data/open", "/ssd/data/inhouse", "/data/battery/ci", -# "/data/battery/pdb_cache", "/data/battery/cod_cache", -# "/data/battery/full_run.lock", "/opt/xtal"] -# mkdir -p /data/battery/ci (scratch run directories and the kept reports) -# CCP4 at /opt/xtal/ccp4-9 (SHELXL for the small-molecule check, REFMAC for --model-check) +# container.valid_volumes: ["/data/open", "/data/inhouse", "/data/battery", "/opt/xtal"] +# CCP4 (SHELXL for the small-molecule check, REFMAC for --model-check) installed at /opt/xtal/ccp4-9 on: push: @@ -48,21 +47,14 @@ jobs: name: Validation battery runs-on: jfjoch_battery container: - # The rocky8 image: its CUDA 12.9 runs on the machine's driver (580, CUDA 13.0); the rocky9 - # image's CUDA 13.3 would need a newer one. image: gitea.psi.ch/leonarski_f/jfjoch_rocky8:2609 # nvidia-smi inside the container still counts every process on the GPU (host and other # containers), so the battery's gpu_others / "timing NOT a reference" marking keeps working. options: --gpus all - # The data at the paths the site config below names; the lock file is the host's, so a full - # run here and one on the host cannot overlap. volumes: - - /ssd/data/open:/ssd/data/open:ro - - /ssd/data/inhouse:/ssd/data/inhouse:ro - - /data/battery/ci:/data/battery/ci - - /data/battery/pdb_cache:/data/battery/pdb_cache - - /data/battery/cod_cache:/data/battery/cod_cache - - /data/battery/full_run.lock:/data/battery/full_run.lock + - /data/open:/data/open:ro + - /data/inhouse:/data/inhouse:ro + - /data/battery:/data/battery - /opt/xtal:/opt/xtal:ro timeout-minutes: 720 env: @@ -87,9 +79,11 @@ jobs: - name: Site config shell: bash run: | + # The run directory (merged files, logs, results.json) is scratch, deleted after the job; + # only report.md is kept, in /data/battery/ci_reports and as the job's artifact. cat > /tmp/site.json </dev/null || true + chown -R "$(stat -c %u:%g /data/battery)" /data/battery/ci_reports /data/battery/pdb_cache /data/battery/cod_cache 2>/dev/null || true diff --git a/tools/battery/README.md b/tools/battery/README.md index 0a61f0e5f..4ab385405 100644 --- a/tools/battery/README.md +++ b/tools/battery/README.md @@ -270,7 +270,7 @@ metric are reported, not judged. **CI.** `.gitea/workflows/battery.yml` builds rugnux with the CI flags and runs the ci tier on every push, or by hand any subset (empty: the full open + inhouse battery), on the machine that holds the -data. The job keeps report.md and the log as its artifact; the private arm is never mounted there. +data. The job keeps report.md and the log as its artifact; its site config names no private arm. **Full runs.** A run without `--only` or `--tier` takes the site lock (`flock`, non-blocking), so two full runs cannot overlap. Do not start one without the owner's go-ahead: it takes hours, and