fix(envs): migrate remaining envs to uv and fix Docker health checks#466
fix(envs): migrate remaining envs to uv and fix Docker health checks#466mroyme wants to merge 4 commits into
Conversation
Greptile SummaryThis PR migrates Confidence Score: 3/5Safe to merge after fixing the one-character typo in the browsergym Dockerfile; all other changes are clean. All env migrations follow the established uv pattern correctly and the test script improvements are solid. However, envs/browsergym_env/server/Dockerfile — line 4 has Important Files Changed
Prompt To Fix All With AIThis is a comment left during a code review.
Path: envs/browsergym_env/server/Dockerfile
Line: 4
Comment:
**Stray `g` prefix breaks Docker build**
`gWORKDIR` is not a valid Dockerfile instruction. Docker will reject the build at this line with `unknown instruction: GWORKDIR` (instructions are case-insensitive). This was introduced when the `# Set working directory` comment was removed — the `g` leaked from the editor/search operation. The file currently has no valid `WORKDIR` set, so the subsequent `COPY . .` and all `RUN` steps would run in whatever default directory the base Playwright image provides (which is not `/app/env`).
```suggestion
WORKDIR /app/env
```
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "fix(envs): migrate remaining envs to uv ..." | Re-trigger Greptile |
277a83f to
a1c20d9
Compare
Fixes huggingface#461 and applies the same fixes to browsergym-env, calendar-env, grid-world-env, and carla-env which are not built in CI. Changes: - browsergym-env: replace pip/requirements.txt with uv sync; add override-dependencies to resolve beartype cross-platform conflict - calendar-env: rewrite Dockerfile to echo_env multi-stage uv pattern - grid-world-env: rewrite Dockerfile to uv multi-stage; fix requires-python (>=3.12 → >=3.10) so uv uses the base image Python rather than downloading an isolated 3.13 that disappears in the final stage; apply try/except fallback for relative model imports (same pattern as connect4-env, maze-env, snake-env); remove stale uv.lock with broken local path reference - carla-env: replace pip install calls with uv pip install; add missing deps (websockets, numpy, shapely, networkx) to pyproject.toml - Remove all requirements.txt files superseded by pyproject.toml + uv - test-docker-builds.sh: add dual-platform support (linux/amd64 + linux/arm64 by default, --platform= to override); add browsergym-env, grid-world-env, calendar-env to the test matrix; switch env builds from docker buildx --load to plain docker build --platform so locally-tagged base images are found; improve container start error reporting
- Add .dockerignore for leaner, reproducible builds - Switch to openenv-core[core] and browsergym-core to avoid dependency conflicts with openai and beartype - Add openai<2 override in uv.lock for compatibility with open_apps - Update Dockerfile to ensure venv PATH is set for all commands
f27e4a5 to
05241bc
Compare
Fixes #461 (
browsergym-envbuild in CI) and also applies the same fixes tocalendar-env,grid-world-env, andcarla-envwhich are not built in CI.Changes:
browsergym-env: replace pip/requirements.txt with uv sync; add override-dependencies to resolve beartype cross-platform conflictcalendar-env: rewrite Dockerfile to echo_env multi-stage uv patterngrid-world-env: rewrite Dockerfile to uv multi-stage; fix requires-python (>=3.12 → >=3.10) so uv uses the base image Python rather than downloading an isolated 3.13 that disappears in the final stage; apply try/except fallback for relative model imports (same pattern as connect4-env, maze-env, snake-env); remove stale uv.lock with broken local path referencecarla-env: replace pip install calls with uv pip install; add missing deps (websockets, numpy, shapely, networkx) to pyproject.tomlrequirements.txtfiles superseded bypyproject.toml+ uvtest-docker-builds.sh: add dual-platform support (linux/amd64 + linux/arm64 by default, --platform= to override); add browsergym-env, grid-world-env, calendar-env to the test matrix; switch env builds from docker buildx --load to plain docker build --platform so locally-tagged base images are found; improve container start error reportingSummary
browsergym-env,calendar-env,grid-world-env, andcarla-envfrom pip/requirements.txt to uv sync, matching the pattern established in fix(envs): standardize Docker builds with uv and per-env pyproject.toml #452.grid-world-envwhere requirespython = ">=3.12"caused uv to download Python 3.13, which then disappeared in the multi-stage final image; also applies the standard try/except relative-import fallback pattern.test-docker-builds.shto test both linux/amd64 and linux/arm64 by default with --platform= override, and adds the three previously-untested envs to the matrix. All 6 checks (3 envs × 2 platforms) pass.Type of Change
Alignment Checklist
Before submitting, verify:
.claude/docs/PRINCIPLES.mdand this PR aligns with our principles.claude/docs/INVARIANTS.mdand no invariants are violated/pre-submit-pr(orbash .claude/hooks/lint.shand tests) and addressed all issuesRFC Status
Test Plan
Verified using
scripts/test-docker-builds.sh, which builds each env image and polls /health before passing:bash scripts/test-docker-builds.sh "browsergym-env,grid-world-env,calendar-env" Results: ✓ Passed (6): browsergym-env (linux-amd64) grid-world-env (linux-amd64) calendar-env (linux-amd64) browsergym-env (linux-arm64) grid-world-env (linux-arm64) calendar-env (linux-arm64) ✓ All checks passed.carla-envchanges were not run-tested locally (requires GPU + external CARLA 0.9.x server) but the migration is mechanical -pip install -r requirements.txtreplaced withuv pip install --systemwith equivalent packages, and missing transitive deps added topyproject.toml.Claude Code Review
Alignment Review Report
Automated Checks
Open RFCs Context
All 5 RFCs (000–005) are "In Review". None are relevant to this PR — the RFCs cover abstractions, env spec, MCP support, rubrics, and agentic harnesses. This PR is purely build
tooling (Dockerfiles, uv migration, test script).
Tier 1: Fixes Required
None.
Tier 2: Alignment Discussion
Principle Conflicts
None identified. No changes to public APIs, reward computation, agent/orchestration boundaries, or client-server separation.
RFC Conflicts
None identified. RFCs 001–005 address runtime behavior and API design; this PR only changes packaging and build infrastructure.
Summary
The PR is a pure build hygiene change. The one runtime-visible change (from models import ... fallback in grid_world_env) follows the established pattern from connect4_env,
maze_env, and snake_env and has no alignment implications.