@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 54bbf51668
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

[Bugfix] nightly Docker images crash with ImportError: AnthropicOutputConfig since May 28 (#44795)

Signed-off-by: achyuthan.s <113010327+Achyuthan-S@users.noreply.github.com> Signed-off-by: Achyuthan S <achyuthan.sivasankar@gmail.com> Signed-off-by: Achyuthan Sivasankar <achyuthan.sivasankar@gmail.com> Co-authored-by: Shengqi Chen <harry-chen@outlook.com>

achyuthan.s committed Jun 14, 2026 at 08:45 UTC 54bbf5166842932fa7abc34a14df850594daeb5e
2 files changed +67 -1
docker/Dockerfile
+17 -1
@@ -548,9 +548,17 @@ RUN --mount=type=cache,target=/opt/uv/cache \
548 fi && \
549 python3 setup.py bdist_wheel --dist-dir=dist --py-limited-api=cp38
550
551 +# Record the wheel checksum so downstream stages can bust their layer cache
552 +# when the wheel changes, without copying the wheel itself into the image.
553 +RUN sha256sum dist/*.whl > dist/wheel.sha256
554 +
555 # Copy extension wheels from extensions-build stage for later use
556 COPY --from=extensions-build /tmp/ep_kernels_workspace/dist /tmp/ep_kernels_workspace/dist
557
558 +# Record the EP kernels wheel checksum for the same cache-busting purpose.
559 +RUN sha256sum /tmp/ep_kernels_workspace/dist/*.whl \
560 + > /tmp/ep_kernels_workspace/dist/wheels.sha256
561 +
562 # Check the size of the wheel if RUN_WHEEL_CHECK is true
563 COPY .buildkite/check-wheel-size.py check-wheel-size.py
564 # sync the default value with .buildkite/check-wheel-size.py
@@ -838,6 +846,11 @@ ARG PYTORCH_NIGHTLY
846 # Install vLLM wheel first, so that torch etc will be installed.
847 # Check whether to install torch nightly instead of release for this build.
848 COPY --from=base /workspace/torch_lib_versions.txt torch_lib_versions.txt
849 +# Copy only the wheel checksum (a few bytes) so a wheel change invalidates this
850 +# install layer. The wheel itself is bind-mounted below and never enters the
851 +# image. Without this the bind mount is not part of the layer cache key, so a
852 +# warm BuildKit agent can skip the install and ship a stale wheel.
853 +COPY --from=build /workspace/dist/wheel.sha256 /tmp/vllm-wheel.sha256
854 RUN --mount=type=bind,from=build,src=/workspace/dist,target=/vllm-workspace/dist \
855 --mount=type=cache,target=/opt/uv/cache \
856 if [ "${PYTORCH_NIGHTLY}" = "1" ]; then \
@@ -860,7 +873,10 @@ uv pip list
873 # Pytorch now installs NVSHMEM, setting LD_LIBRARY_PATH
874 ENV LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
875
863 -# Install EP kernels wheels (DeepEP) that have been built in the `build` stage
876 +# Install EP kernels wheels (DeepEP) that have been built in the `build` stage.
877 +# As with the vLLM wheel above, copy only the checksum to bust the layer cache
878 +# and bind-mount the wheel for the actual install to keep it out of the image.
879 +COPY --from=build /tmp/ep_kernels_workspace/dist/wheels.sha256 /tmp/ep-kernels-wheels.sha256
880 RUN --mount=type=bind,from=build,src=/tmp/ep_kernels_workspace/dist,target=/vllm-workspace/ep_kernels/dist \
881 --mount=type=cache,target=/opt/uv/cache \
882 uv pip install --system ep_kernels/dist/*.whl --verbose \
tests/entrypoints/anthropic/test_protocol_exports.py new
+50
@@ -0,0 +1,50 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
3 +"""Regression tests for Anthropic protocol exports used by serving.
4 +
5 +Guards against Docker/nightly images shipping a stale protocol module that is
6 +missing symbols imported by ``vllm.entrypoints.anthropic.serving`` (issue #44759).
7 +"""
8 +
9 +import pytest
10 +
11 +from vllm.entrypoints.anthropic.protocol import (
12 + AnthropicContentBlock,
13 + AnthropicContextManagement,
14 + AnthropicCountTokensRequest,
15 + AnthropicCountTokensResponse,
16 + AnthropicDelta,
17 + AnthropicError,
18 + AnthropicMessagesRequest,
19 + AnthropicMessagesResponse,
20 + AnthropicOutputConfig,
21 + AnthropicStreamEvent,
22 + AnthropicUsage,
23 +)
24 +
25 +pytestmark = pytest.mark.skip_global_cleanup
26 +
27 +SERVING_PROTOCOL_EXPORTS = (
28 + AnthropicContentBlock,
29 + AnthropicContextManagement,
30 + AnthropicCountTokensRequest,
31 + AnthropicCountTokensResponse,
32 + AnthropicDelta,
33 + AnthropicError,
34 + AnthropicMessagesRequest,
35 + AnthropicMessagesResponse,
36 + AnthropicOutputConfig,
37 + AnthropicStreamEvent,
38 + AnthropicUsage,
39 +)
40 +
41 +
42 +def test_serving_protocol_exports_are_importable():
43 + for export in SERVING_PROTOCOL_EXPORTS:
44 + assert export is not None
45 +
46 +
47 +def test_anthropic_output_config_instantiation():
48 + config = AnthropicOutputConfig()
49 + assert config.effort is None
50 + assert config.format is None