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/<run id>), 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) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SVmAWnzCmRKAXVUCdc4iNi
This commit is contained in:
1 parent
9beb8a7813
commit
c5970a76f4
2 files changed
+23
-29
No files matched your search
@@ -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 <<EOF
|
||||
{
|
||||
"runs_root": "/data/battery/ci/scratch/${{ github.run_id }}",
|
||||
"runs_root": "/data/battery/scratch/${{ github.run_id }}",
|
||||
"lock_file": "/data/battery/full_run.lock",
|
||||
"gpulock": null,
|
||||
"baseline": null,
|
||||
@@ -98,8 +92,8 @@ jobs:
|
||||
"cod_cache": "/data/battery/cod_cache",
|
||||
"shelxl": "/opt/xtal/ccp4-9/bin/shelxl",
|
||||
"arms": {
|
||||
"open": {"manifest": "open.json", "reference": "deposition", "data_root": "/ssd/data/open"},
|
||||
"inhouse": {"manifest": "inhouse.json", "reference": "xds", "data_root": "/ssd/data/inhouse"}
|
||||
"open": {"manifest": "open.json", "reference": "deposition", "data_root": "/data/open"},
|
||||
"inhouse": {"manifest": "inhouse.json", "reference": "xds", "data_root": "/data/inhouse"}
|
||||
}
|
||||
}
|
||||
EOF
|
||||
@@ -119,10 +113,10 @@ jobs:
|
||||
run: |
|
||||
run=$(sed -n 's/^run directory //p' battery.log | head -1)
|
||||
[ -n "$run" ] && [ -f "$run/report.md" ] || { echo "no report"; exit 1; }
|
||||
mkdir -p battery_out /data/battery/ci/reports
|
||||
mkdir -p battery_out /data/battery/ci_reports
|
||||
cp "$run/report.md" "battery_out/$(basename "$run").md"
|
||||
cp battery.log "battery_out/$(basename "$run").log"
|
||||
cp "$run/report.md" "/data/battery/ci/reports/$(basename "$run").md"
|
||||
cp "$run/report.md" "/data/battery/ci_reports/$(basename "$run").md"
|
||||
# the report's own per-arm summary and failures, into the job log
|
||||
awk '/^## Summary/{p=1} /^### By population/{p=0} p' "$run/report.md"
|
||||
awk '/^### Failures/{p=1;print;next} /^### /{p=0} p' "$run/report.md"
|
||||
@@ -137,6 +131,6 @@ jobs:
|
||||
shell: bash
|
||||
run: |
|
||||
# a finished run directory is read-only; the container runs as root, which deletes it anyway
|
||||
rm -rf "/data/battery/ci/scratch/${{ github.run_id }}"
|
||||
rm -rf "/data/battery/scratch/${{ github.run_id }}"
|
||||
# files written by root in the container go back to the owner of the battery tree
|
||||
chown -R "$(stat -c %u:%g /data/battery/ci)" /data/battery/ci /data/battery/pdb_cache /data/battery/cod_cache 2>/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
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user