@@ -126,13 +126,16 @@ RUN --mount=type=cache,target=/root/.cache/uv \
126
126
FROM base-builder AS cv-builder
127
127
128
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
130
132
ARG ENABLE_HEADLESS=1
131
133
RUN --mount=type=cache,target=/root/.cache/uv \
132
134
source /opt/rh/gcc-toolset-13/enable && \
133
135
git clone --recursive https://github.com/opencv/opencv-python.git -b ${OPENCV_VERSION} && \
134
136
cd opencv-python && \
135
137
sed -i 's/"setuptools==59.2.0",/"setuptools<70.0",/g' pyproject.toml && \
138
+ cd opencv && git cherry-pick --no-commit $OPENCV_PATCH && cd .. && \
136
139
python -m build --wheel --installer=uv --outdir /opencvwheels/
137
140
138
141
###############################################################
@@ -151,6 +154,11 @@ ARG VLLM_TARGET_DEVICE=cpu
151
154
152
155
# this step installs vllm and populates uv cache
153
156
# 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/
154
162
RUN --mount=type=cache,target=/root/.cache/uv \
155
163
--mount=type=bind,from=torch-builder,source=/torchwheels/,target=/torchwheels/,ro \
156
164
--mount=type=bind,from=arrow-builder,source=/arrowwheels/,target=/arrowwheels/,ro \
@@ -159,7 +167,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \
159
167
source /opt/rh/gcc-toolset-13/enable && \
160
168
uv pip install /opencvwheels/*.whl /arrowwheels/*.whl /torchwheels/*.whl && \
161
169
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 && \
163
171
# sentencepiece.pc is in some pkgconfig inside uv cache
164
172
export PKG_CONFIG_PATH=$(find / -type d -name "pkgconfig" 2>/dev/null | tr '\n' ':') && \
165
173
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 \
247
255
--mount=type=bind,from=torch-builder,source=/torchwheels/,target=/torchwheels/,ro \
248
256
--mount=type=bind,from=arrow-builder,source=/arrowwheels/,target=/arrowwheels/,ro \
249
257
--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 \
250
259
--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
252
261
253
262
COPY ./ /workspace/vllm
254
263
WORKDIR /workspace/vllm
0 commit comments