EdgeBench-kit / README.md
Odysseusqsl's picture
remove license from README metadata
58a5650 verified
|
Raw
History Blame Contribute Delete
3.6 kB
---
pretty_name: EdgeBench Build Kits
---
# EdgeBench Build Kits
Self-contained, auditable build kits for rebuilding the **EdgeBench** task
environment images from scratch on your own infrastructure — no access to any
private registry or network required.
Every released EdgeBench task image is exactly: **a public base image + a set
of filesystem layers on top**. A kit ships that upper-layer content in an
inspectable form, so a rebuild covers the same audit surface as a from-scratch
build, while you audit the exact shipped bits rather than a build recipe that
could drift from them.
## Repository layout
```
bases/<key>/Dockerfile # reference recipes for the language base images
# (generated from EdgeBench tasks/BENCHMARK.yaml)
kits/<task_id>/work/ # one kit per released image
kits/<task_id>/judge/
Dockerfile # FROM <base tag> [+ RUN rm] + ADD context.tar + config replay
context.tar # merged filesystem diff above the base (ownership/modes preserved)
MANIFEST.sha256 # per-file sha256 + mode + uid:gid + size — the audit anchor
kit.json # provenance: source/base image IDs, layer digests, final image name
build_from_kit.py # standalone builder/verifier (python3 stdlib + docker CLI only)
```
Notes on the format:
- `context.tar` is the **merged final view** of the task layers: files added
and later deleted by intermediate layers are collapsed away and never ship.
- Layer whiteouts are materialized as `RUN rm` **only** when they delete files
that exist in the base image; the pilot kits are purely additive (no `RUN rm`).
- `ADD context.tar /` preserves every file's owner, mode, and symlinks exactly
as recorded in the released image's layers.
## Quick start (with the SForge harness)
Base images build from public official images (`ubuntu:22.04`, `python:3.11`,
`maven:3.9-eclipse-temurin-17`, ...). Base tags are deterministic — they hash
the base definition in `tasks/BENCHMARK.yaml` — so a base you build yourself
gets exactly the name each kit's `FROM` line expects.
```bash
# builds the base automatically, then work + judge from the kits,
# then re-verifies every file against MANIFEST.sha256
python -m sforge build --task ad_placement_optimization --kits-dir kits/ --verify
python -m sforge run --task ad_placement_optimization --agent ...
```
## Quick start (standalone, no harness)
```bash
# base (tag must match the kit Dockerfile's FROM line, see bases/)
docker build -t edgebench.base.cpp:19685ea8d3f4 bases/cpp/
# task images — the kit directory is the docker build context;
# tag with kit.json's "final_name"
docker build -t edgebench.work.ad_placement_optimization:49747cad3ebd \
kits/ad_placement_optimization/work
docker build -t edgebench.judge.ad_placement_optimization:56cbfc81cfa1 \
kits/ad_placement_optimization/judge
# optional: file-by-file verification against the manifest
python3 build_from_kit.py --kit kits/ad_placement_optimization/work --verify
```
## Verifying the kits themselves
Each `kit.json` records the source image ID the kit was derived from. To
cross-check independently: pull the corresponding published EdgeBench image,
compute its filesystem diff over the published base, and compare with
`MANIFEST.sha256` — the manifests are reproducible byte-for-byte.
## Current coverage
Pilot batch (3 tasks / 6 kits): `ad_placement_optimization` (cpp),
`k12_math_recommendation` (python), `exchange_core_throughput` (java).
Remaining tasks will be added incrementally.