@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 7b5ecf79bd
Fork 0

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

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 15, 14:45 UTC

s390x: Fix PyArrow build and add CPU test script for Buildkite CI (#16036)

Signed-off-by: Nishan Acharya <Nishan.Acharya@ibm.com>

Nishan Acharya committed Apr 14, 2025 at 23:25 UTC 7b5ecf79bd94aab0d782c70126d0dcc37c16bc60
2 files changed +35 -2
.buildkite/scripts/hardware_ci/run-cpu-test-s390x.sh new
+13
@@ -0,0 +1,13 @@
1 +#!/bin/bash
2 +
3 +# This script build the CPU docker image and run the offline inference inside the container.
4 +# It serves a sanity check for compilation and basic model usage.
5 +set -ex
6 +
7 +# Setup cleanup
8 +remove_docker_container() { docker rm -f cpu-test || true; docker system prune -f; }
9 +trap remove_docker_container EXIT
10 +remove_docker_container
11 +
12 +# Try building the docker image
13 +docker build -t cpu-test -f docker/Dockerfile.s390x .
docker/Dockerfile.s390x
+22 -2
@@ -58,7 +58,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \
58 cd ../../python && \
59 export PYARROW_PARALLEL=4 && \
60 export ARROW_BUILD_TYPE=release && \
61 - uv pip install -r requirements/build.txt && \
61 + uv pip install -r requirements-build.txt && \
62 python setup.py build_ext --build-type=$ARROW_BUILD_TYPE --bundle-arrow-cpp bdist_wheel
63
64 FROM python-install AS numa-build
@@ -96,6 +96,22 @@ RUN --mount=type=cache,target=/root/.cache/uv \
96 uv pip install -v torch==${TORCH_VERSION} --extra-index-url https://download.pytorch.org/whl/nightly/cpu && \
97 python setup.py bdist_wheel
98
99 +FROM python-install AS hf-xet-builder
100 +# Install hf-xet
101 +WORKDIR /tmp
102 +ENV CARGO_HOME=/root/.cargo
103 +ENV RUSTUP_HOME=/root/.rustup
104 +ENV PATH="$CARGO_HOME/bin:$RUSTUP_HOME/bin:$PATH"
105 +RUN --mount=type=cache,target=/root/.cache/uv \
106 + --mount=type=bind,from=rust,source=/root/.cargo,target=/root/.cargo,rw \
107 + --mount=type=bind,from=rust,source=/root/.rustup,target=/root/.rustup,rw \
108 + git clone https://github.com/huggingface/xet-core.git && \
109 + cd xet-core/hf_xet/ && \
110 + uv pip install maturin patchelf && \
111 + python -m maturin build --release --out dist && \
112 + mkdir -p /tmp/hf-xet/dist && \
113 + cp dist/*.whl /tmp/hf-xet/dist/
114 +
115 # Final build stage
116 FROM python-install AS vllm-cpu
117 ARG PYTHON_VERSION
@@ -120,12 +136,15 @@ RUN --mount=type=cache,target=/root/.cache/uv \
136 --mount=type=bind,from=rust,source=/root/.rustup,target=/root/.rustup,rw \
137 --mount=type=bind,from=pyarrow,source=/tmp/arrow/python/dist,target=/tmp/arrow-wheels \
138 --mount=type=bind,from=torch-vision,source=/tmp/vision/dist,target=/tmp/vision-wheels/ \
139 + --mount=type=bind,from=hf-xet-builder,source=/tmp/hf-xet/dist,target=/tmp/hf-xet-wheels/ \
140 sed -i '/^torch/d' requirements/build.txt && \
141 ARROW_WHL_FILE=$(ls /tmp/arrow-wheels/pyarrow-*.whl | head -n 1) && \
142 VISION_WHL_FILE=$(ls /tmp/vision-wheels/*.whl | head -n 1) && \
143 + HF_XET_WHL_FILE=$(ls /tmp/hf-xet-wheels/*.whl | head -n 1) && \
144 uv pip install -v \
145 $ARROW_WHL_FILE \
146 $VISION_WHL_FILE \
147 + $HF_XET_WHL_FILE \
148 --extra-index-url https://download.pytorch.org/whl/nightly/cpu \
149 --index-strategy unsafe-best-match \
150 -r requirements/build.txt \
@@ -149,4 +168,5 @@ USER 2000
168 WORKDIR /home/vllm
169
170 # Set the default entrypoint
152 -ENTRYPOINT ["python", "-m", "vllm.entrypoints.openai.api_server"]
\ No newline at end of file
171 +ENTRYPOINT ["python", "-m", "vllm.entrypoints.openai.api_server"]
172 +