Skip to content

Commit 04e9d20

Browse files
committed
updating dockerfile for ppc64le, added opencv patch and hf-xet build from source
Signed-off-by: Md. Shafi Hussain <[email protected]>
1 parent 61de3ef commit 04e9d20

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

docker/Dockerfile.ppc64le

+12-3
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,16 @@ RUN --mount=type=cache,target=/root/.cache/uv \
126126
FROM base-builder AS cv-builder
127127

128128
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
130132
ARG ENABLE_HEADLESS=1
131133
RUN --mount=type=cache,target=/root/.cache/uv \
132134
source /opt/rh/gcc-toolset-13/enable && \
133135
git clone --recursive https://github.com/opencv/opencv-python.git -b ${OPENCV_VERSION} && \
134136
cd opencv-python && \
135137
sed -i 's/"setuptools==59.2.0",/"setuptools<70.0",/g' pyproject.toml && \
138+
cd opencv && git cherry-pick --no-commit $OPENCV_PATCH && cd .. && \
136139
python -m build --wheel --installer=uv --outdir /opencvwheels/
137140

138141
###############################################################
@@ -151,6 +154,11 @@ ARG VLLM_TARGET_DEVICE=cpu
151154

152155
# this step installs vllm and populates uv cache
153156
# with all the transitive dependencies
157+
RUN --mount=type=cache,target=/root/.cache/uv \
158+
source /opt/rh/gcc-toolset-13/enable && \
159+
git clone https://github.com/huggingface/xet-core.git && cd xet-core/hf_xet/ && \
160+
uv pip install maturin && \
161+
uv build --wheel --out-dir /hf_wheels/
154162
RUN --mount=type=cache,target=/root/.cache/uv \
155163
--mount=type=bind,from=torch-builder,source=/torchwheels/,target=/torchwheels/,ro \
156164
--mount=type=bind,from=arrow-builder,source=/arrowwheels/,target=/arrowwheels/,ro \
@@ -159,7 +167,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \
159167
source /opt/rh/gcc-toolset-13/enable && \
160168
uv pip install /opencvwheels/*.whl /arrowwheels/*.whl /torchwheels/*.whl && \
161169
sed -i -e 's/.*torch.*//g' /src/pyproject.toml /src/requirements/*.txt && \
162-
uv pip install pandas pythran pybind11 && \
170+
uv pip install pandas pythran pybind11 /hf_wheels/*.whl && \
163171
# sentencepiece.pc is in some pkgconfig inside uv cache
164172
export PKG_CONFIG_PATH=$(find / -type d -name "pkgconfig" 2>/dev/null | tr '\n' ':') && \
165173
uv pip install -r /src/requirements/common.txt -r /src/requirements/cpu.txt -r /src/requirements/build.txt --no-build-isolation && \
@@ -247,8 +255,9 @@ RUN --mount=type=cache,target=/root/.cache/uv \
247255
--mount=type=bind,from=torch-builder,source=/torchwheels/,target=/torchwheels/,ro \
248256
--mount=type=bind,from=arrow-builder,source=/arrowwheels/,target=/arrowwheels/,ro \
249257
--mount=type=bind,from=cv-builder,source=/opencvwheels/,target=/opencvwheels/,ro \
258+
--mount=type=bind,from=vllmcache-builder,source=/hf_wheels/,target=/hf_wheels/,ro \
250259
--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
260+
HOME=/root uv pip install /opencvwheels/*.whl /arrowwheels/*.whl /torchwheels/*.whl /hf_wheels/*.whl /vllmwheel/*.whl
252261

253262
COPY ./ /workspace/vllm
254263
WORKDIR /workspace/vllm

0 commit comments

Comments
 (0)