Skip to content

Commit 65e8466

Browse files
authored
[Bugfix] Fix environment variable setting in CPU Dockerfile (#21730)
Signed-off-by: jiang1.li <[email protected]>
1 parent 1b769dc commit 65e8466

File tree

2 files changed

+18
-19
lines changed

2 files changed

+18
-19
lines changed

.buildkite/scripts/hardware_ci/run-cpu-test.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,12 @@ function cpu_tests() {
7878
# VLLM_USE_V1=0 pytest -s -v \
7979
# tests/quantization/test_ipex_quant.py"
8080

81+
# Run multi-lora tests
82+
docker exec cpu-test-"$NUMA_NODE" bash -c "
83+
set -e
84+
pytest -s -v \
85+
tests/lora/test_qwen2vl.py"
86+
8187
# online serving
8288
docker exec cpu-test-"$NUMA_NODE" bash -c '
8389
set -e
@@ -89,12 +95,6 @@ function cpu_tests() {
8995
--model meta-llama/Llama-3.2-3B-Instruct \
9096
--num-prompts 20 \
9197
--endpoint /v1/completions'
92-
93-
# Run multi-lora tests
94-
docker exec cpu-test-"$NUMA_NODE" bash -c "
95-
set -e
96-
pytest -s -v \
97-
tests/lora/test_qwen2vl.py"
9898
}
9999

100100
# All of CPU tests are expected to be finished less than 40 mins.

docker/Dockerfile.cpu

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,14 @@
1919
# VLLM_CPU_AVX512VNNI=false (default)|true
2020
#
2121

22-
######################### BASE IMAGE #########################
23-
FROM ubuntu:22.04 AS base
22+
######################### COMMON BASE IMAGE #########################
23+
FROM ubuntu:22.04 AS base-common
2424

2525
WORKDIR /workspace/
2626

2727
ARG PYTHON_VERSION=3.12
2828
ARG PIP_EXTRA_INDEX_URL="https://download.pytorch.org/whl/cpu"
2929

30-
ENV LD_PRELOAD=""
31-
3230
# Install minimal dependencies and uv
3331
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
3432
--mount=type=cache,target=/var/lib/apt,sharing=locked \
@@ -63,17 +61,18 @@ RUN --mount=type=cache,target=/root/.cache/uv \
6361
ARG TARGETARCH
6462
ENV TARGETARCH=${TARGETARCH}
6563

66-
RUN if [ "$TARGETARCH" = "arm64" ]; then \
67-
PRELOAD_PATH="/usr/lib/aarch64-linux-gnu/libtcmalloc_minimal.so.4"; \
68-
else \
69-
PRELOAD_PATH="/usr/lib/x86_64-linux-gnu/libtcmalloc_minimal.so.4:/opt/venv/lib/libiomp5.so"; \
70-
fi && \
71-
echo "export LD_PRELOAD=$PRELOAD_PATH" >> ~/.bashrc
64+
######################### x86_64 BASE IMAGE #########################
65+
FROM base-common AS base-amd64
66+
67+
ENV LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libtcmalloc_minimal.so.4:/opt/venv/lib/libiomp5.so"
7268

73-
# Ensure that the LD_PRELOAD environment variable for export is in effect.
74-
SHELL ["/bin/bash", "-c"]
69+
######################### arm64 BASE IMAGE #########################
70+
FROM base-common AS base-arm64
7571

76-
ENV LD_PRELOAD=${LD_PRELOAD}
72+
ENV LD_PRELOAD="/usr/lib/aarch64-linux-gnu/libtcmalloc_minimal.so.4"
73+
74+
######################### BASE IMAGE #########################
75+
FROM base-${TARGETARCH} AS base
7776

7877
RUN echo 'ulimit -c 0' >> ~/.bashrc
7978

0 commit comments

Comments
 (0)