File size: 5,508 Bytes
76999ca | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 | ---
license: apache-2.0
task_categories:
- text-generation
- question-answering
- text-classification
language:
- en
tags:
- docker
- compose
- ci
- software-engineering
- code-repair
- agent-benchmark
- build-failures
- synthetic
pretty_name: Sabnock Docker
size_categories:
- 100<n<1K
configs:
- config_name: default
data_files:
- split: seed
path: data/sabnock_docker_seed_split.json
- split: train
path: data/sabnock_docker_train.json
- split: validation
path: data/sabnock_docker_validation.json
- split: challenge
path: data/sabnock_docker_challenge.json
---
# Sabnock Docker
Sabnock Docker is a synthetic benchmark for testing whether AI agents can repair real Docker, Compose, and containerized CI failures.
It is built for AI engineers, not model hype. Each task contains a broken mini-repository, failing build/runtime logs, an expected fix, and machine-checkable scoring hints.
## Why This Exists
Most coding-agent demos look good until the work touches Docker, Compose, dependency resolution, build context, network binding, secrets, or CI logs. Sabnock Docker targets that exact failure class.
The v1 benchmark contains 108 synthetic tasks covering:
- Missing build-context files
- `npm ci` lockfile failures
- Multi-stage binary copy mistakes
- Compose readiness bugs
- `.dockerignore` production artifact mistakes
- Alpine native dependency failures
- Python `src/` layout container bugs
- Poetry `--no-root` mistakes
- Compose bind mounts hiding `node_modules`
- BuildKit secret handling
- `apt-get update` ordering
- Container network binding failures
## Repo Layout
```text
data/sabnock_docker_seed.json Hand-written seed tasks
data/sabnock_docker_v1.json 108-task benchmark dataset
data/sabnock_docker_*.json HF-ready split files
sabnock_docker/ Loader, validator, scorer, CLI
scripts/build_dataset.py Deterministic v1 dataset builder
app.py Hugging Face Space UI
tests/ Dataset and scorer smoke tests
```
## Dataset Row Shape
Each row has:
```json
{
"id": "sbd-0001",
"split": "seed",
"title": "Python image forgets requirements.txt",
"failure_type": "missing_build_context_file",
"ecosystem": "python",
"difficulty": "easy",
"files": [{"path": "Dockerfile", "content": ["FROM python:3.12-slim"]}],
"failure_log": ["ERROR: Could not open requirements file"],
"build": {"command": "docker build -t sabnock/sbd-0001 ."},
"verify": {"commands": ["docker build -t sabnock/sbd-0001 ."]},
"oracle_patch": ["diff --git a/Dockerfile b/Dockerfile"],
"scoring": {
"must_touch": ["Dockerfile"],
"must_contain": [{"path": "Dockerfile", "text": "COPY requirements.txt ."}],
"must_not_contain": []
}
}
```
The `content`, `failure_log`, and `oracle_patch` fields are arrays of lines so the dataset stays readable on Hugging Face.
## Splits
```text
seed 12 hand-written tasks
train 72 generated training/evaluation tasks
validation 12 validation tasks
challenge 12 harder public challenge tasks
```
The public `challenge` split is a placeholder for leaderboard-style scoring. For a serious leaderboard, keep future hidden tasks private and run them in a controlled evaluator.
## Local Use
Rebuild the v1 dataset:
```bash
python3 scripts/build_dataset.py
```
Validate the dataset:
```bash
python3 -m sabnock_docker.cli validate
```
Print benchmark statistics:
```bash
python3 -m sabnock_docker.cli stats
```
List tasks:
```bash
python3 -m sabnock_docker.cli list
```
Filter tasks:
```bash
python3 -m sabnock_docker.cli list --ecosystem compose --difficulty medium
```
Export a broken task to a directory:
```bash
python3 -m sabnock_docker.cli export sbd-0001 /tmp/sbd-0001
```
Score a proposed patch statically:
```bash
python3 -m sabnock_docker.cli score-patch sbd-0001 fix.patch
```
Verify with Docker locally:
```bash
python3 -m sabnock_docker.cli verify sbd-0001 --patch fix.patch
```
The `score-patch` command applies the patch to a temp copy of the broken repo and checks the final files. The `verify` command exports the task, applies the patch with `git apply`, then runs the task's verification commands. It requires Docker for Docker-backed checks.
Render a Markdown report:
```bash
python3 -m sabnock_docker.cli report -o BENCHMARK.md
```
Score a JSONL agent submission file:
```bash
python3 -m sabnock_docker.cli score-submissions submissions.jsonl
```
See `SUBMISSIONS.md` and `schemas/submission.schema.json` for the leaderboard submission format.
## Hugging Face Space
Run the browser UI:
```bash
pip install -r requirements.txt
python3 app.py
```
The Space lets people browse tasks, filter the benchmark, inspect files/logs, score a patch, and view a leaderboard scaffold. Docker execution is intentionally local-first because public hosted Spaces should not run arbitrary Docker builds.
## Leaderboard Metrics
Recommended metrics:
- `pass_at_1`: first-patch success rate
- `patch_apply_rate`: whether the patch applies cleanly
- `docker_pass_rate`: whether local Docker verification passes
- `median_runtime_seconds`: wall time per task
- `mean_patch_lines`: patch size
- `cost_usd`: approximate model/tool cost
Submission row:
```json
{"agent":"my-agent","task_id":"sbd-0001","patch":"diff --git ...","runtime_seconds":12.4,"cost_usd":0.03}
```
## License
Apache-2.0. All seed tasks are synthetic and original.
|