diff --git a/docker/Dockerfile.ci b/docker/Dockerfile.ci index cb62fd310..037e890ec 100644 --- a/docker/Dockerfile.ci +++ b/docker/Dockerfile.ci @@ -1,10 +1,11 @@ -# Target vLLM version: v0.30.0 (tag @ ced6857afa0e). -# Use the matching release image and its coherent CUDA/PyTorch/FlashInfer -# runtime. Do not reinstall a commit wheel or repair dependencies on top of -# an older base image at a release boundary. For a future unreleased target, -# restore an explicit wheel pin and validate its complete runtime stack. +# Target an unreleased vLLM main commit. The official commit image carries +# the matching CUDA/PyTorch/FlashInfer stack; do not overlay a nightly wheel +# on the previous release image. Copilot updates this commit pin, which also +# selects the image used by CI. The selected commit must have a published +# nightly image as well as a cu130 wheel. +ARG VLLM_PRECOMPILED_WHEEL_COMMIT=ac9126e58aa7bbab1856ba6593ba4d5003fea516 ARG VLLM_BASE_IMAGE=vllm/vllm-openai -ARG VLLM_BASE_TAG=v0.30.0 +ARG VLLM_BASE_TAG=nightly-${VLLM_PRECOMPILED_WHEEL_COMMIT} # We use registry-based layer caching for the dependencies, # where the tag is determined based on the hash of the contents @@ -12,6 +13,7 @@ ARG VLLM_BASE_TAG=v0.30.0 # everything except the actual project dir, since that should not # change much across branches. FROM ${VLLM_BASE_IMAGE}:${VLLM_BASE_TAG} AS deps +ARG VLLM_PRECOMPILED_WHEEL_COMMIT # Keep APP_DIR outside /workspace so k8s Buildkite workspace mounts cannot # shadow the editable install target (#5364). Docker WORKDIR creates /opt if # needed. @@ -42,6 +44,9 @@ ENV SETUPTOOLS_SCM_PRETEND_VERSION=0.0.0 # Do NOT use a non-editable install here — that copies an empty stub into # site-packages and breaks ``import vllm_omni.entrypoints``. RUN uv pip install --system -e ".[dev]" +# Fail the image build if dependency resolution replaced the selected vLLM +# or its compiled CUDA runtime no longer imports. +RUN python3 -c "import vllm, torch, flashinfer; import vllm._C_stable_libtorch; assert '${VLLM_PRECOMPILED_WHEEL_COMMIT}'[:8] in vllm.__version__, vllm.__version__" # The final stage just copies the working dir on top of the # dependencies image. This uses --link so that we can skip diff --git a/tests/buildkite/test_rocm_dockerfile.py b/tests/buildkite/test_rocm_dockerfile.py index 8101b2157..001772eed 100644 --- a/tests/buildkite/test_rocm_dockerfile.py +++ b/tests/buildkite/test_rocm_dockerfile.py @@ -10,7 +10,7 @@ pytestmark = [pytest.mark.core_model, pytest.mark.cpu] REPO_ROOT = Path(__file__).resolve().parents[2] AMD_TEMPLATE = REPO_ROOT / ".buildkite/amd/test-template-amd-omni.j2" AMD_BUILD_SCRIPT = REPO_ROOT / ".buildkite/amd/scripts/build-ci-image.sh" -CI_DOCKERFILE = REPO_ROOT / "docker/Dockerfile.ci" +CUDA_RELEASE_DOCKERFILE = REPO_ROOT / "docker/Dockerfile.cuda" ROCM_DOCKERFILE = REPO_ROOT / "docker/Dockerfile.rocm" ROCM_DOCKERIGNORE = REPO_ROOT / "docker/Dockerfile.rocm.dockerignore" @@ -30,14 +30,17 @@ def _line_index(lines: list[str], prefix: str) -> int: return matches[0] -def test_rocm_base_tracks_ci_vllm_release() -> None: - ci_release = _docker_arg(CI_DOCKERFILE, "VLLM_BASE_TAG") +def test_rocm_base_tracks_cuda_vllm_release() -> None: + # CUDA CI can target a main-branch nightly independently of the stable + # release images used by the CUDA and ROCm distribution Dockerfiles. + cuda_base = _docker_arg(CUDA_RELEASE_DOCKERFILE, "BASE_IMAGE") + _, _, cuda_release = cuda_base.rpartition(":") rocm_base = _docker_arg(ROCM_DOCKERFILE, "BASE_IMAGE") image_ref, separator, image_tag = rocm_base.rpartition(":") assert separator, f"expected a tagged ROCm base image, got {rocm_base}" assert image_ref.rsplit("/", 1)[-1] == "vllm-openai-rocm", image_ref - assert image_tag == ci_release + assert image_tag == cuda_release def test_rocm_defaults_to_prebuilt_base_image() -> None: @@ -103,11 +106,12 @@ def test_rocm_build_context_excludes_git_history() -> None: assert ".git" in patterns -def test_rocm_source_ref_tracks_ci_vllm_release() -> None: - ci_release = _docker_arg(CI_DOCKERFILE, "VLLM_BASE_TAG") +def test_rocm_source_ref_tracks_cuda_vllm_release() -> None: + cuda_base = _docker_arg(CUDA_RELEASE_DOCKERFILE, "BASE_IMAGE") + _, _, cuda_release = cuda_base.rpartition(":") rocm_source_ref = _docker_arg(ROCM_DOCKERFILE, "VLLM_VERSION_OR_COMMIT_HASH") - assert rocm_source_ref == ci_release + assert rocm_source_ref == cuda_release def test_rocm_dockerfile_contains_vllm_api_canary() -> None: