[ROCm][CI] Pin OpenTelemetry to LMCache's cap in the ROCm images (#59051)
Signed-off-by: Rohan Potdar <rohan.potdar@amd.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Rohan Potdar committed
Sep 28, 2026 at 12:33 UTC
7a160c6fe5910957a0feac50074ec6fc183c2a92
2 files changed
+10
-20
docker/Dockerfile.rock
+5
-10
@@ -499,17 +499,9 @@ RUN printf '%s\n' "${LMCACHE_REF}" | grep -Eq '^[0-9a-f]{40}$' \
499
/app/lmcache/requirements/common.txt)" -eq 2 \
500
&& test "$(grep -Fxc 'numpy<=2.2.6' \
501
/app/lmcache/requirements/common.txt)" -eq 1 \
502
- && test "$(grep -Fxc 'opentelemetry-api >= 1.20.0, <= 1.40.0' \
503
- /app/lmcache/requirements/common.txt)" -eq 1 \
504
- && test "$(grep -Fxc 'opentelemetry-sdk >= 1.20.0' \
505
- /app/lmcache/requirements/common.txt)" -eq 1 \
506
- && test "$(grep -Fxc 'opentelemetry-exporter-otlp >= 1.20.0' \
507
- /app/lmcache/requirements/common.txt)" -eq 1 \
502
&& sed -i -E \
503
-e '/^(cufile-python|nvtx)([<=>[:space:]]|$)/d' \
504
-e 's/^numpy<=2\.2\.6$/numpy<=2.3.5/' \
511
- -e 's/^opentelemetry-sdk >= 1\.20\.0$/opentelemetry-sdk >= 1.20.0, <= 1.40.0/' \
512
- -e 's/^opentelemetry-exporter-otlp >= 1\.20\.0$/opentelemetry-exporter-otlp >= 1.20.0, <= 1.40.0/' \
505
/app/lmcache/requirements/common.txt \
506
&& rm -rf /app/lmcache/.git
507
@@ -934,12 +926,15 @@ RUN --mount=type=cache,target=/root/.cache/uv \
926
927
# Install vLLM using uv (inherited from base stage)
928
# Note: No -U flag to avoid upgrading PyTorch ROCm to CUDA version
929
+# Keep OpenTelemetry within LMCache's cap.
930
RUN --mount=type=bind,from=export_vllm,src=/,target=/install \
931
--mount=type=cache,target=/root/.cache/uv \
932
cd /install \
940
- && uv pip install --system -c /etc/rocm-constraints.txt -r requirements/rocm.txt \
933
+ && echo "opentelemetry-api<=1.40.0" > /tmp/otel-constraints.txt \
934
+ && uv pip install --system -c /etc/rocm-constraints.txt -c /tmp/otel-constraints.txt -r requirements/rocm.txt \
935
&& pip uninstall -y vllm \
942
- && uv pip install --system -c /etc/rocm-constraints.txt *.whl
936
+ && uv pip install --system -c /etc/rocm-constraints.txt -c /tmp/otel-constraints.txt *.whl \
937
+ && rm /tmp/otel-constraints.txt
938
939
# Install NIXL ROCm wheel
940
RUN --mount=type=bind,from=build_nixl,src=/app/install,target=/nixl_install \
docker/Dockerfile.rocm
+5
-10
@@ -497,17 +497,9 @@ RUN printf '%s\n' "${LMCACHE_REF}" | grep -Eq '^[0-9a-f]{40}$' \
497
/app/lmcache/requirements/common.txt)" -eq 2 \
498
&& test "$(grep -Fxc 'numpy<=2.2.6' \
499
/app/lmcache/requirements/common.txt)" -eq 1 \
500
- && test "$(grep -Fxc 'opentelemetry-api >= 1.20.0, <= 1.40.0' \
501
- /app/lmcache/requirements/common.txt)" -eq 1 \
502
- && test "$(grep -Fxc 'opentelemetry-sdk >= 1.20.0' \
503
- /app/lmcache/requirements/common.txt)" -eq 1 \
504
- && test "$(grep -Fxc 'opentelemetry-exporter-otlp >= 1.20.0' \
505
- /app/lmcache/requirements/common.txt)" -eq 1 \
500
&& sed -i -E \
501
-e '/^(cufile-python|nvtx)([<=>[:space:]]|$)/d' \
502
-e 's/^numpy<=2\.2\.6$/numpy<=2.3.5/' \
509
- -e 's/^opentelemetry-sdk >= 1\.20\.0$/opentelemetry-sdk >= 1.20.0, <= 1.40.0/' \
510
- -e 's/^opentelemetry-exporter-otlp >= 1\.20\.0$/opentelemetry-exporter-otlp >= 1.20.0, <= 1.40.0/' \
503
/app/lmcache/requirements/common.txt \
504
&& rm -rf /app/lmcache/.git
505
@@ -956,12 +948,15 @@ RUN --mount=type=cache,target=/root/.cache/uv \
948
949
# Install vLLM using uv (inherited from base stage)
950
# Note: No -U flag to avoid upgrading PyTorch ROCm to CUDA version
951
+# Keep OpenTelemetry within LMCache's cap.
952
RUN --mount=type=bind,from=export_vllm,src=/,target=/install \
953
--mount=type=cache,target=/root/.cache/uv \
954
cd /install \
962
- && uv pip install --system -r requirements/rocm.txt \
955
+ && echo "opentelemetry-api<=1.40.0" > /tmp/otel-constraints.txt \
956
+ && uv pip install --system -c /tmp/otel-constraints.txt -r requirements/rocm.txt \
957
&& pip uninstall -y vllm \
964
- && uv pip install --system *.whl
958
+ && uv pip install --system -c /tmp/otel-constraints.txt *.whl \
959
+ && rm /tmp/otel-constraints.txt
960
961
# Install NIXL ROCm wheel
962
RUN --mount=type=bind,from=build_nixl,src=/app/install,target=/nixl_install \