Skip to content

Commit ee1e99c

Browse files
Add docker file changes in UBI file
1 parent 3e6b6a4 commit ee1e99c

File tree

2 files changed

+32
-4
lines changed

2 files changed

+32
-4
lines changed

Dockerfile.ppc64le.ubi

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,16 @@ RUN --mount=type=cache,target=/root/.cache/uv \
145145
FROM base-builder AS cv-builder
146146

147147
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
149151
ARG ENABLE_HEADLESS=1
150152
RUN --mount=type=cache,target=/root/.cache/uv \
151153
source /opt/rh/gcc-toolset-13/enable && \
152154
git clone --recursive https://github.com/opencv/opencv-python.git -b ${OPENCV_VERSION} && \
153155
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 .. && \
155158
python -m build --wheel --installer=uv --outdir /opencvwheels/
156159

157160
# build opencv dependent packages
@@ -182,6 +185,11 @@ ARG GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1
182185

183186
# this step installs vllm & tgis adapter and populates uv cache
184187
# 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/
185193
RUN --mount=type=cache,target=/root/.cache/uv \
186194
--mount=type=bind,from=torch-builder,source=/torchwheels/,target=/torchwheels/,ro \
187195
--mount=type=bind,from=arrow-builder,source=/arrowwheels/,target=/arrowwheels/,ro \
@@ -190,7 +198,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \
190198
source /opt/rh/gcc-toolset-13/enable && \
191199
uv pip install /opencvwheels/*.whl /arrowwheels/*.whl /torchwheels/*.whl && \
192200
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 && \
194202
uv pip install -r /src/requirements/common.txt -r /src/requirements/cpu.txt -r /src/requirements/build.txt --no-build-isolation && \
195203
cd /src/ && \
196204
uv build --wheel --out-dir /vllmwheel/ --no-build-isolation && \
@@ -275,8 +283,9 @@ RUN --mount=type=cache,target=/root/.cache/uv \
275283
--mount=type=bind,from=torch-builder,source=/torchwheels/,target=/torchwheels/,ro \
276284
--mount=type=bind,from=arrow-builder,source=/arrowwheels/,target=/arrowwheels/,ro \
277285
--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 \
278287
--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
280289

281290
WORKDIR /home/vllm
282291

Dockerfile.s390x.ubi

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,22 @@ RUN --mount=type=cache,target=/root/.cache/uv \
9898
python setup.py bdist_wheel && \
9999
uv pip install dist/*.whl
100100

101+
FROM python-install AS hf-xet-builder
102+
# Install hf-xet
103+
WORKDIR /tmp
104+
ENV CARGO_HOME=/root/.cargo
105+
ENV RUSTUP_HOME=/root/.rustup
106+
ENV PATH="$CARGO_HOME/bin:$RUSTUP_HOME/bin:$PATH"
107+
RUN --mount=type=cache,target=/root/.cache/uv \
108+
--mount=type=bind,from=rust,source=/root/.cargo,target=/root/.cargo,rw \
109+
--mount=type=bind,from=rust,source=/root/.rustup,target=/root/.rustup,rw \
110+
git clone https://github.com/huggingface/xet-core.git && \
111+
cd xet-core/hf_xet/ && \
112+
uv pip install maturin patchelf && \
113+
python -m maturin build --release --out dist && \
114+
mkdir -p /tmp/hf-xet/dist && \
115+
cp dist/*.whl /tmp/hf-xet/dist/
116+
101117
# Final build stage
102118
FROM python-install AS vllm-openai
103119
ARG PYTHON_VERSION
@@ -118,12 +134,15 @@ RUN --mount=type=cache,target=/root/.cache/uv \
118134
--mount=type=bind,from=rust,source=/root/.cargo,target=/root/.cargo,rw \
119135
--mount=type=bind,from=rust,source=/root/.rustup,target=/root/.rustup,rw \
120136
--mount=type=bind,from=pyarrow,source=/tmp/arrow/python/dist,target=/tmp/arrow-wheels \
137+
--mount=type=bind,from=hf-xet-builder,source=/tmp/hf-xet/dist,target=/tmp/hf-xet-wheels/ \
121138
export PATH="/root/.cargo/bin:/root/.rustup/bin:$PATH" \
122139
ARROW_WHL_FILE=$(ls /tmp/arrow-wheels/pyarrow-*.whl | head -n 1) && \
123140
sed -i '/^torch/d' requirements/build.txt && \
124141
sed -i '/^numba/d' requirements/common.txt && \
142+
HF_XET_WHL_FILE=$(ls /tmp/hf-xet-wheels/*.whl | head -n 1) && \
125143
uv pip install -v \
126144
$ARROW_WHL_FILE \
145+
$HF_XET_WHL_FILE \
127146
--extra-index-url https://download.pytorch.org/whl/nightly/cpu \
128147
--index-strategy unsafe-best-match \
129148
-r requirements/build.txt \

0 commit comments

Comments
 (0)