@@ -145,13 +145,16 @@ RUN --mount=type=cache,target=/root/.cache/uv \
145
145
FROM base-builder AS cv-builder
146
146
147
147
ARG MAX_JOBS
148
- ARG OPENCV_VERSION=84
148
+ ARG OPENCV_VERSION=86
149
+ # patch for version 4.11.0.86
150
+ ARG OPENCV_PATCH=97f3f39
149
151
ARG ENABLE_HEADLESS=1
150
152
RUN --mount=type=cache,target=/root/.cache/uv \
151
153
source /opt/rh/gcc-toolset-13/enable && \
152
154
git clone --recursive https://github.com/opencv/opencv-python.git -b ${OPENCV_VERSION} && \
153
155
cd opencv-python && \
154
- sed -i 's/"setuptools==59.2.0",/"setuptools<70.0",/g' pyproject.toml && \
156
+ sed -i -E -e 's/"setuptools.+",/"setuptools",/g' pyproject.toml && \
157
+ cd opencv && git cherry-pick --no-commit $OPENCV_PATCH && cd .. && \
155
158
python -m build --wheel --installer=uv --outdir /opencvwheels/
156
159
157
160
# build opencv dependent packages
@@ -182,6 +185,11 @@ ARG GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1
182
185
183
186
# this step installs vllm & tgis adapter and populates uv cache
184
187
# with all the transitive dependencies
188
+ RUN --mount=type=cache,target=/root/.cache/uv \
189
+ source /opt/rh/gcc-toolset-13/enable && \
190
+ git clone https://github.com/huggingface/xet-core.git && cd xet-core/hf_xet/ && \
191
+ uv pip install maturin && \
192
+ uv build --wheel --out-dir /hf_wheels/
185
193
RUN --mount=type=cache,target=/root/.cache/uv \
186
194
--mount=type=bind,from=torch-builder,source=/torchwheels/,target=/torchwheels/,ro \
187
195
--mount=type=bind,from=arrow-builder,source=/arrowwheels/,target=/arrowwheels/,ro \
@@ -190,7 +198,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \
190
198
source /opt/rh/gcc-toolset-13/enable && \
191
199
uv pip install /opencvwheels/*.whl /arrowwheels/*.whl /torchwheels/*.whl && \
192
200
sed -i -e 's/.*torch.*//g' /src/pyproject.toml /src/requirements/*.txt && \
193
- uv pip install pandas && \
201
+ uv pip install pandas /hf_wheels/*.whl && \
194
202
uv pip install -r /src/requirements/common.txt -r /src/requirements/cpu.txt -r /src/requirements/build.txt --no-build-isolation && \
195
203
cd /src/ && \
196
204
uv build --wheel --out-dir /vllmwheel/ --no-build-isolation && \
@@ -275,8 +283,9 @@ RUN --mount=type=cache,target=/root/.cache/uv \
275
283
--mount=type=bind,from=torch-builder,source=/torchwheels/,target=/torchwheels/,ro \
276
284
--mount=type=bind,from=arrow-builder,source=/arrowwheels/,target=/arrowwheels/,ro \
277
285
--mount=type=bind,from=cv-builder,source=/opencvwheels/,target=/opencvwheels/,ro \
286
+ --mount=type=bind,from=vllmcache-builder,source=/hf_wheels/,target=/hf_wheels/,ro \
278
287
--mount=type=bind,from=vllmcache-builder,source=/vllmwheel/,target=/vllmwheel/,ro \
279
- HOME=/root uv pip install /opencvwheels/*.whl /arrowwheels/*.whl /torchwheels/*.whl /vllmwheel/*.whl
288
+ HOME=/root uv pip install /opencvwheels/*.whl /arrowwheels/*.whl /torchwheels/*.whl /hf_wheels/*.whl / vllmwheel/*.whl
280
289
281
290
WORKDIR /home/vllm
282
291
0 commit comments