can1357/oh-my-pi · error · Error
Apple 'container' CLI not found. Install with: brew install
Error message
Apple 'container' CLI not found. Install with: brew install container && container system start
What it means
The metaharness runner validates that the Apple 'container' CLI is on PATH before running benchmarks with envType 'apple-container'. This error means the runner was configured to use Apple's container runtime but the binary could not be located, so it aborts before launching any task containers.
Source
Thrown at packages/metaharness/src/runner.ts:1549
exitCode: number;
jobName: string;
jobDir: string;
benchDir: string;
tarball: string | null;
elapsedMs: number;
totals: Totals | null;
reportPath: string | null;
}
async function runBenchmark(cfg: Config): Promise<BenchmarkRun> {
if (!which("harbor")) {
throw new Error("harbor not found on PATH. Install with: uv tool install harbor");
}
if (cfg.agent === "omp" && cfg.envType === "docker" && !which("docker")) {
throw new Error("docker not found on PATH (required to run task containers).");
}
if (cfg.envType === "apple-container" && !which("container")) {
throw new Error(
"Apple 'container' CLI not found. Install with: brew install container && container system start",
);
}
const stamp = new Date().toISOString().replace(/[:.]/g, "-").slice(0, 19);
const modelSlug = (cfg.models[0] ?? "model").replace(/[^a-zA-Z0-9]+/g, "-");
const jobName = cfg.jobName ?? `${modelSlug}-${stamp}`;
const jobDir = path.join(cfg.jobsDir, jobName);
const benchDir = path.join(cfg.jobsDir, "_bench", jobName);
fs.mkdirSync(benchDir, { recursive: true });
if (!cfg.resume && !cfg.dryRun) {
// Snapshot the resolved launch config so a later `--resume <job>` can
// rebuild the exact same invocation without re-specifying flags.
fs.writeFileSync(path.join(benchDir, "runner-config.json"), JSON.stringify({ ...cfg, jobName }, null, "\t"));
}
const version = readPkgVersion();
View on GitHub (pinned to 9690622007)
Solutions
- Install the Apple container CLI: brew install container
- Start the container system: container system start
- Verify it resolves: which container (or command -v container)
- If not on macOS, switch the runner config to envType 'docker' instead
Example fix
// before (runner fails: 'container' not on PATH) // $ bun runner.ts --env-type apple-container ... // after (shell) $ brew install container && container system start $ which container # confirm before rerunning
Defensive patterns
Strategy: validation
Validate before calling
import { which } from "@oh-my-pi/pi-utils";
if (cfg.envType === "apple-container" && !which("container")) {
throw new Error("apple-container env requires the 'container' CLI: brew install container && container system start");
} Try / catch
try {
await runBenchmark(cfg);
} catch (err) {
if (err instanceof Error && err.message.includes("Apple 'container' CLI not found")) {
console.error("Install Apple container: brew install container && container system start");
process.exitCode = 1;
return;
}
throw err;
} Prevention
- Probe `which container` at startup and fail fast with an actionable message
- Document macOS-only requirement for envType 'apple-container'
- In CI, add a setup step installing and starting the container system before benchmarks
- Validate the full environment (docker/container) once in a preflight check rather than per-env-type
When it happens
Trigger: Running the benchmark runner with cfg.agent === 'omp' (any agent actually — the check only gates on cfg.envType === 'apple-container') and cfg.envType === 'apple-container' on a machine where which('container') finds no binary.
Common situations: Running on Linux (Apple container CLI is macOS-only); macOS without the container package installed; container installed but the daemon not started so the CLI shim is absent from PATH; installing inside a non-homebrew environment.
Related errors
- docker not found on PATH (required for cleanup).
- imageUrls exposure "${name}" requires the ${name} binary on
- the configured command binary does not exist
- ${availability.reason ?? "Julia kernel unavailable"}
- ${availability.reason ?? "Julia kernel unavailable"}
AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31).
Data as JSON: /api/errors/66e6a8dc77540c1c.
Report an issue: GitHub.