Skip to content

Commit fd08927

Browse files
authored
fix(harness): pin codex deps so the harness image builds on glibc (#85)
2 parents 0cb837e + 561628d commit fd08927

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

agentkit/toolkit/executors/init_executor.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,20 @@
143143
# Container image for the harness server. The base image's apt mirror is an
144144
# unreachable internal host, so apt is repointed at aliyun; the source branch is
145145
# cloned via the ghfast proxy with a github fallback; uv installs from aliyun.
146-
# `openai-codex` is installed alongside veadk so the `codex` runtime works
147-
# (it bundles the Codex CLI binary); without it `--runtime codex` fails.
146+
#
147+
# Codex runtime: veadk's `--runtime codex` does `import openai_codex`, which pins
148+
# the Codex engine binary `openai-codex-cli-bin`. Both are prereleases, so they are
149+
# pinned to exact versions — an exact `==` pin auto-enables that prerelease in uv,
150+
# so no global `--prerelease=allow` is needed. aliyun mirrors both (including the
151+
# `openai-codex-cli-bin==0.137.0a4` manylinux x86_64/aarch64 wheel that matches this
152+
# glibc image), so everything installs from the fast domestic mirror in one step.
153+
# `openai-codex`'s only other runtime dep, `pydantic>=2.12`, is satisfied by veadk.
148154
_HARNESS_DOCKERFILE = """\
149155
FROM agentkit-cn-beijing.cr.volces.com/base/py-simple:python3.12-bookworm-slim-latest
150156
ENV PYTHONUNBUFFERED=1
157+
# Large wheels (google-adk, the 86MB Codex engine binary) can exceed uv's 30s
158+
# default HTTP timeout on a slow build network; give them more headroom.
159+
ENV UV_HTTP_TIMEOUT=300
151160
RUN set -eux; \\
152161
rm -f /etc/apt/sources.list.d/*; \\
153162
printf 'deb http://mirrors.aliyun.com/debian bookworm main contrib non-free non-free-firmware\\n\\
@@ -168,7 +177,8 @@
168177
done; \\
169178
test -d src/veadk
170179
RUN uv pip install --system --index-url https://mirrors.aliyun.com/pypi/simple/ \\
171-
./src fastapi "uvicorn[standard]" openai-codex
180+
./src fastapi "uvicorn[standard]" \\
181+
openai-codex==0.1.0b3 openai-codex-cli-bin==0.137.0a4
172182
EXPOSE 8000
173183
CMD ["python", "-m", "uvicorn", "veadk.cloud.harness_app.app:app", "--host", "0.0.0.0", "--port", "8000"]
174184
"""

0 commit comments

Comments
 (0)