swactor/examples/pipeline-parallel-inference/Dockerfile.stub

28 lines
1.1 KiB
Text

# CPU-only stub-mode image for the Docker-coordinated localised E2E
# (TEST_SPEC §13b). Runs the existing `pp-gpu-node` binary with the
# Python worker forced into stub mode (`PP_WORKER_STUB=1`) so the image
# needs neither CUDA nor tinygrad — just python3 to exec the worker.
#
# Build context must be the workspace root (the COPY paths assume that):
#
# docker build -f examples/pipeline-parallel-inference/Dockerfile.stub \
# -t pp-gpu-node-stub:latest .
#
# The host must have built the binaries first (release profile) — this
# image only packages them, it does not compile inside the container.
# `scripts/docker-e2e.sh` automates the full build + run.
FROM debian:trixie-slim
RUN apt-get update && \
apt-get install -y --no-install-recommends \
python3 \
ca-certificates && \
rm -rf /var/lib/apt/lists/*
COPY examples/pipeline-parallel-inference/target/release/pp-gpu-node /usr/local/bin/pp-gpu-node
COPY examples/pipeline-parallel-inference/pp_tinygrad_worker.py /usr/local/share/pp_tinygrad_worker.py
ENV WORKER_SCRIPT=/usr/local/share/pp_tinygrad_worker.py
ENV PP_WORKER_STUB=1
CMD ["pp-gpu-node"]