You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
3. config referenced from `opencode.json`/`opencode.jsonc` placed in this repo root
22
22
23
+
## Running the runner inside Docker
24
+
25
+
When the runner itself runs in a container with access to the host Docker socket, solver/judge workspaces and auth isolation dirs must live on a host-visible path. The Docker daemon resolves bind-mount sources on the host, not inside the runner container.
26
+
27
+
Pass `--host-tmpdir` to a directory that exists on the host and is bind-mounted into the runner container at the **same path**:
28
+
29
+
```bash
30
+
# on the host
31
+
mkdir -p /var/tmp/evals-runner
32
+
33
+
docker run \
34
+
-v /var/run/docker.sock:/var/run/docker.sock \
35
+
-v /var/tmp/evals-runner:/var/tmp/evals-runner \
36
+
... \
37
+
bun runner/run.ts \
38
+
--model openai/gpt-4.1-mini \
39
+
--host-tmpdir /var/tmp/evals-runner \
40
+
--output generated/my-generated
41
+
```
42
+
43
+
When omitted, the runner uses the process temp directory (`os.tmpdir()`, typically `/tmp`). That works for local runs where the runner process and Docker daemon share the same filesystem namespace.
44
+
45
+
The runner creates per-session subdirectories under this root with prefixes `evals-opencode-` (workspaces) and `evals-opencode-home-` (isolated auth copies). They are removed when each session finishes.
46
+
23
47
## Environment variable passthrough
24
48
25
49
The runner forwards matching host environment variables into the container with `docker run -e`.
@@ -57,6 +81,10 @@ Extra prefixes are merged with the defaults above.
57
81
58
82
Both `bun runner/run.ts` and `bun runner/judge.ts` accept:
59
83
84
+
### `--host-tmpdir`
85
+
86
+
Optional host-visible temp root for solver/judge workspaces and isolated auth copies. Use when the runner runs inside a container with access to the host Docker socket. See [Running the runner inside Docker](#running-the-runner-inside-docker).
87
+
60
88
### `--agent-logs`
61
89
62
90
Streams OpenCode agent activity from the server SSE feed. Log lines are prefixed with `[opencode-docker][...][agent]` and include session lifecycle events, tool calls, and session errors.
0 commit comments