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
[fix]: Dockerfile.ppc64le fixes for opencv-python and hf-xet (#16048)
Signed-off-by: Md. Shafi Hussain <Md.Shafi.Hussain@ibm.com>
Md. Shafi Hussain committed
Apr 14, 2025 at 21:38 UTC
6bf27affb6d451a02e158aa5728a7d8c45507303
1 file changed
+14
-4
docker/Dockerfile.ppc64le
+14
-4
@@ -126,13 +126,16 @@ RUN --mount=type=cache,target=/root/.cache/uv \
126
FROM base-builder AS cv-builder
127
128
ARG MAX_JOBS
129
-ARG OPENCV_VERSION=84
129
+ARG OPENCV_VERSION=86
130
+# patch for version 4.11.0.86
131
+ARG OPENCV_PATCH=97f3f39
132
ARG ENABLE_HEADLESS=1
133
RUN --mount=type=cache,target=/root/.cache/uv \
134
source /opt/rh/gcc-toolset-13/enable && \
135
git clone --recursive https://github.com/opencv/opencv-python.git -b ${OPENCV_VERSION} && \
136
cd opencv-python && \
135
- sed -i 's/"setuptools==59.2.0",/"setuptools<70.0",/g' pyproject.toml && \
137
+ sed -i -E -e 's/"setuptools.+",/"setuptools",/g' pyproject.toml && \
138
+ cd opencv && git cherry-pick --no-commit $OPENCV_PATCH && cd .. && \
139
python -m build --wheel --installer=uv --outdir /opencvwheels/
140
141
###############################################################
@@ -148,9 +151,15 @@ COPY --from=arrow-builder /tmp/control /dev/null
151
COPY --from=cv-builder /tmp/control /dev/null
152
153
ARG VLLM_TARGET_DEVICE=cpu
154
+ARG GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1
155
156
# this step installs vllm and populates uv cache
157
# with all the transitive dependencies
158
+RUN --mount=type=cache,target=/root/.cache/uv \
159
+ source /opt/rh/gcc-toolset-13/enable && \
160
+ git clone https://github.com/huggingface/xet-core.git && cd xet-core/hf_xet/ && \
161
+ uv pip install maturin && \
162
+ uv build --wheel --out-dir /hf_wheels/
163
RUN --mount=type=cache,target=/root/.cache/uv \
164
--mount=type=bind,from=torch-builder,source=/torchwheels/,target=/torchwheels/,ro \
165
--mount=type=bind,from=arrow-builder,source=/arrowwheels/,target=/arrowwheels/,ro \
@@ -159,7 +168,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \
168
source /opt/rh/gcc-toolset-13/enable && \
169
uv pip install /opencvwheels/*.whl /arrowwheels/*.whl /torchwheels/*.whl && \
170
sed -i -e 's/.*torch.*//g' /src/pyproject.toml /src/requirements/*.txt && \
162
- uv pip install pandas pythran pybind11 && \
171
+ uv pip install pandas pythran pybind11 /hf_wheels/*.whl && \
172
# sentencepiece.pc is in some pkgconfig inside uv cache
173
export PKG_CONFIG_PATH=$(find / -type d -name "pkgconfig" 2>/dev/null | tr '\n' ':') && \
174
uv pip install -r /src/requirements/common.txt -r /src/requirements/cpu.txt -r /src/requirements/build.txt --no-build-isolation && \
@@ -247,8 +256,9 @@ RUN --mount=type=cache,target=/root/.cache/uv \
256
--mount=type=bind,from=torch-builder,source=/torchwheels/,target=/torchwheels/,ro \
257
--mount=type=bind,from=arrow-builder,source=/arrowwheels/,target=/arrowwheels/,ro \
258
--mount=type=bind,from=cv-builder,source=/opencvwheels/,target=/opencvwheels/,ro \
259
+ --mount=type=bind,from=vllmcache-builder,source=/hf_wheels/,target=/hf_wheels/,ro \
260
--mount=type=bind,from=vllmcache-builder,source=/vllmwheel/,target=/vllmwheel/,ro \
251
- HOME=/root uv pip install /opencvwheels/*.whl /arrowwheels/*.whl /torchwheels/*.whl /vllmwheel/*.whl
261
+ HOME=/root uv pip install /opencvwheels/*.whl /arrowwheels/*.whl /torchwheels/*.whl /hf_wheels/*.whl /vllmwheel/*.whl
262
263
COPY ./ /workspace/vllm
264
WORKDIR /workspace/vllm