@@ -52,9 +52,9 @@ FROM base-builder AS torch-builder
5252# build cache without torch dependent packages
5353# sentencepiece has linker issues otherwise
5454RUN --mount=type=cache,target=/root/.cache/uv \
55- --mount=type=bind,src=requirements- common.txt,dst=/requirements- common.txt,ro \
55+ --mount=type=bind,src=requirements/ common.txt,dst=/requirements/ common.txt,ro \
5656 source /opt/rh/gcc-toolset-13/enable && \
57- sed -e 's/.*opencv.*//g; s/.*outlines.*//g; s/.*tensors.*//g' requirements- common.txt | uv pip install -r /dev/stdin && \
57+ sed -e 's/.*opencv.*//g; s/.*outlines.*//g; s/.*tensors.*//g' requirements/ common.txt | uv pip install -r /dev/stdin && \
5858 uv pip list
5959
6060ARG MAX_JOBS
@@ -99,10 +99,10 @@ RUN --mount=type=cache,target=/root/.cache/uv \
9999
100100# build cache with torch dependent packages
101101RUN --mount=type=cache,target=/root/.cache/uv \
102- --mount=type=bind,src=requirements- common.txt,dst=/requirements- common.txt,ro \
102+ --mount=type=bind,src=requirements/ common.txt,dst=/requirements/ common.txt,ro \
103103 source /opt/rh/gcc-toolset-13/enable && \
104- grep "outlines" requirements- common.txt | uv pip install -r /dev/stdin && \
105- grep "tensors" requirements- common.txt | uv pip install -r /dev/stdin && \
104+ grep "outlines" requirements/ common.txt | uv pip install -r /dev/stdin && \
105+ grep "tensors" requirements/ common.txt | uv pip install -r /dev/stdin && \
106106 uv pip list
107107
108108
@@ -144,22 +144,25 @@ RUN --mount=type=cache,target=/root/.cache/uv \
144144FROM base-builder AS cv-builder
145145
146146ARG MAX_JOBS
147- ARG OPENCV_VERSION=84
147+ ARG OPENCV_VERSION=86
148+ # patch for version 4.11.0.86
149+ ARG OPENCV_PATCH=97f3f39
148150ARG ENABLE_HEADLESS=1
149151RUN --mount=type=cache,target=/root/.cache/uv \
150152 source /opt/rh/gcc-toolset-13/enable && \
151153 git clone --recursive https://github.com/opencv/opencv-python.git -b ${OPENCV_VERSION} && \
152154 cd opencv-python && \
153- sed -i 's/"setuptools==59.2.0",/"setuptools<70.0",/g' pyproject.toml && \
155+ sed -i -E -e 's/"setuptools.+",/"setuptools",/g' pyproject.toml && \
156+ cd opencv && git cherry-pick --no-commit $OPENCV_PATCH && cd .. && \
154157 python -m build --wheel --installer=uv --outdir /opencvwheels/
155158
156159# build opencv dependent packages
157160RUN --mount=type=cache,target=/root/.cache/uv \
158- --mount=type=bind,src=requirements- common.txt,dst=/requirements- common.txt,ro \
161+ --mount=type=bind,src=requirements/ common.txt,dst=/requirements/ common.txt,ro \
159162 source /opt/rh/gcc-toolset-13/enable && \
160163 uv pip install /opencvwheels/*.whl && \
161164 uv pip list | grep opencv && \
162- grep "opencv" requirements- common.txt | uv pip install -r /dev/stdin --no-build-isolation && \
165+ grep "opencv" requirements/ common.txt | uv pip install -r /dev/stdin --no-build-isolation && \
163166 uv pip list
164167
165168
@@ -175,22 +178,27 @@ COPY --from=torch-builder /tmp/control /dev/null
175178COPY --from=arrow-builder /tmp/control /dev/null
176179COPY --from=cv-builder /tmp/control /dev/null
177180
178- ARG VLLM_TGIS_ADAPTER_VERSION=0.6.3
181+ ARG VLLM_TGIS_ADAPTER_VERSION=0.7.0
179182ARG VLLM_TARGET_DEVICE=cpu
180183ARG GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1
181184
182185# this step installs vllm & tgis adapter and populates uv cache
183186# with all the transitive dependencies
187+ RUN --mount=type=cache,target=/root/.cache/uv \
188+ source /opt/rh/gcc-toolset-13/enable && \
189+ git clone https://github.com/huggingface/xet-core.git && cd xet-core/hf_xet/ && \
190+ uv pip install maturin && \
191+ uv build --wheel --out-dir /hf_wheels/
184192RUN --mount=type=cache,target=/root/.cache/uv \
185193 --mount=type=bind,from=torch-builder,source=/torchwheels/,target=/torchwheels/,ro \
186194 --mount=type=bind,from=arrow-builder,source=/arrowwheels/,target=/arrowwheels/,ro \
187195 --mount=type=bind,from=cv-builder,source=/opencvwheels/,target=/opencvwheels/,ro \
188196 --mount=type=bind,src=.,dst=/src/,rw \
189197 source /opt/rh/gcc-toolset-13/enable && \
190198 uv pip install /opencvwheels/*.whl /arrowwheels/*.whl /torchwheels/*.whl && \
191- sed -i -e 's/.*torch.*//g' /src/pyproject.toml /src/requirements- *.txt && \
192- uv pip install pandas && \
193- uv pip install -r /src/requirements- common.txt -r /src/requirements- cpu.txt -r /src/requirements- build.txt --no-build-isolation && \
199+ sed -i -e 's/.*torch.*//g' /src/pyproject.toml /src/requirements/ *.txt && \
200+ uv pip install pandas /hf_wheels/*.whl && \
201+ uv pip install -r /src/requirements/ common.txt -r /src/requirements/ cpu.txt -r /src/requirements/ build.txt --no-build-isolation && \
194202 cd /src/ && \
195203 uv build --wheel --out-dir /vllmwheel/ --no-build-isolation && \
196204 uv pip install "$(echo /vllmwheel/*.whl)[tensorizer]" vllm-tgis-adapter==${VLLM_TGIS_ADAPTER_VERSION}
@@ -274,8 +282,9 @@ RUN --mount=type=cache,target=/root/.cache/uv \
274282 --mount=type=bind,from=torch-builder,source=/torchwheels/,target=/torchwheels/,ro \
275283 --mount=type=bind,from=arrow-builder,source=/arrowwheels/,target=/arrowwheels/,ro \
276284 --mount=type=bind,from=cv-builder,source=/opencvwheels/,target=/opencvwheels/,ro \
285+ --mount=type=bind,from=vllmcache-builder,source=/hf_wheels/,target=/hf_wheels/,ro \
277286 --mount=type=bind,from=vllmcache-builder,source=/vllmwheel/,target=/vllmwheel/,ro \
278- HOME=/root uv pip install /opencvwheels/*.whl /arrowwheels/*.whl /torchwheels/*.whl /vllmwheel/*.whl
287+ HOME=/root uv pip install /opencvwheels/*.whl /arrowwheels/*.whl /torchwheels/*.whl /hf_wheels/*.whl / vllmwheel/*.whl
279288
280289WORKDIR /home/vllm
281290
@@ -307,7 +316,7 @@ FROM vllm-openai as vllm-grpc-adapter
307316
308317USER root
309318
310- ARG VLLM_TGIS_ADAPTER_VERSION=0.6.3
319+ ARG VLLM_TGIS_ADAPTER_VERSION
311320RUN --mount=type=cache,target=/root/.cache/uv \
312321 --mount=type=bind,from=vllmcache-builder,source=/vllmwheel/,target=/vllmwheel/,ro \
313322 HOME=/root uv pip install "$(echo /vllmwheel/*.whl)[tensorizer]" vllm-tgis-adapter==${VLLM_TGIS_ADAPTER_VERSION}
0 commit comments