@@ -24,25 +24,39 @@ RUN --mount=type=bind,source=./container/deps/requirements.test.txt,target=/tmp/
2424 --requirement /tmp/requirements.test.txt; \
2525 fi
2626
27- USER dynamo
28-
2927# Copy pytest configuration (markers, filterwarnings, asyncio_mode, etc.)
3028COPY --chmod=664 --chown=dynamo:0 pyproject.toml /workspace/pyproject.toml
3129# Required: blocks dynamo.vllm/sglang from shadowing the installed packages.
3230COPY --chmod=664 --chown=dynamo:0 conftest.py /workspace/conftest.py
3331COPY --chmod=775 --chown=dynamo:0 benchmarks/ /workspace/benchmarks/
3432
33+ # The ARC runner executes the job pod as uid 1001 with a non-dynamo gid (see
34+ # shared-test.yml), which lands in "other" perms on this baked dynamo:0 tree.
35+ # Tests create files in their CWD (fault-tolerance engine configs in
36+ # /workspace, launch-script ./logs dirs under examples/), so grant others the
37+ # directory write bit. Directories only: creating a file needs w on its parent
38+ # dir, and touching file modes would copy every file into a new image layer.
39+ # The distroless planner base has no find here — it takes the skip branch and
40+ # test_distroless below repeats the chmod after the runner tools land.
41+ RUN if command -v find; then find /workspace -type d -exec chmod o+w {} +; else echo "skipped (distroless planner)"; fi
42+
43+ USER dynamo
44+
3545FROM debian:bookworm-slim AS github_runner_tools
3646
47+ # glibc-family libs (loader, libc, libm) are excluded from the harvest: they
48+ # must resolve from the base image. A copied bookworm libm shadows the base's
49+ # newer one via LD_LIBRARY_PATH and breaks its consumers — libpython needs
50+ # GLIBC_2.38 symbols that bookworm's 2.36 libm lacks.
3751RUN set -eux; \
38- tools="bash tail tar gzip cat grep env tr head mkdir chmod mv sleep"; \
52+ tools="bash tail tar gzip cat grep env tr head mkdir chmod mv sleep find "; \
3953 mkdir -p /github-runner-tools/usr/local/bin /github-runner-tools/opt/dynamo/lib; \
4054 for tool in ${tools}; do \
4155 tool_path="$(command -v "${tool}")"; \
4256 cp -L "${tool_path}" "/github-runner-tools/usr/local/bin/${tool}"; \
4357 ldd "${tool_path}" \
4458 | awk '/=> \// { print $3 } /^\// { print $1 }' \
45- | grep -Ev '/(ld-linux|libc\.so)' \
59+ | grep -Ev '/(ld-linux|libc\.so|libm\.so )' \
4660 | while read -r lib_path; do \
4761 cp -L "${lib_path}" "/github-runner-tools/opt/dynamo/lib/$(basename "${lib_path}")"; \
4862 done; \
@@ -55,4 +69,8 @@ USER root
5569COPY --from=github_runner_tools /github-runner-tools/usr/local/bin/ /usr/local/bin/
5670COPY --from=github_runner_tools /github-runner-tools/opt/dynamo/lib/ /opt/dynamo/lib/
5771
72+ # find/chmod exist now (copied above): apply the /workspace dir-write fix that
73+ # test_image skipped on this distroless base.
74+ RUN find /workspace -type d -exec chmod o+w {} +
75+
5876USER dynamo
0 commit comments