From 06fd9ffcc4ce51f38a482ca406abcf1d42cc2757 Mon Sep 17 00:00:00 2001 From: Andreas Karatzas Date: Fri, 3 Apr 2026 21:41:41 -0500 Subject: [PATCH] [ROCm][CI] Fix ROCm Dockerfile conftest generation for older Docker parsers (#38959) Signed-off-by: Andreas Karatzas --- docker/Dockerfile.rocm | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/docker/Dockerfile.rocm b/docker/Dockerfile.rocm index c56fea05d6..fad79af9cf 100644 --- a/docker/Dockerfile.rocm +++ b/docker/Dockerfile.rocm @@ -390,21 +390,21 @@ ENV MIOPEN_DEBUG_CONV_GEMM=0 RUN mkdir src && mv vllm src/vllm # This is a workaround to ensure pytest exits with the correct status code in CI tests. -RUN cat << 'EOF' > /vllm-workspace/conftest.py -import os - -_exit_code = 1 - -def pytest_sessionfinish(session, exitstatus): - global _exit_code - _exit_code = int(exitstatus) - -def pytest_unconfigure(config): - import sys - sys.stdout.flush() - sys.stderr.flush() - os._exit(_exit_code) -EOF +RUN printf '%s\n' \ + 'import os' \ + '' \ + '_exit_code = 1' \ + '' \ + 'def pytest_sessionfinish(session, exitstatus):' \ + ' global _exit_code' \ + ' _exit_code = int(exitstatus)' \ + '' \ + 'def pytest_unconfigure(config):' \ + ' import sys' \ + ' sys.stdout.flush()' \ + ' sys.stderr.flush()' \ + ' os._exit(_exit_code)' \ + > /vllm-workspace/conftest.py # ----------------------- # Final vLLM image