[CPU][s390x] Pin protobuf to 7.36.1 and drop C++ extension removal workaround (#54978)
Signed-off-by: coderfornow <Ritik.Dhiranan@ibm.com> Co-authored-by: Li, Jiang <jiang1.li@intel.com>
coderfornow committed
Sep 17, 2026 at 14:05 UTC
88afb777008bab6d33a6f5ea965e2a0d83a0a7ec
3 files changed
+2
-20
docker/Dockerfile.s390x
-6
@@ -169,8 +169,6 @@ ENV PKG_CONFIG_PATH="/opt/rh/gcc-toolset-14/root/usr/lib64/pkgconfig:/usr/local/
169
ENV PATH="${VIRTUAL_ENV:+${VIRTUAL_ENV}/bin}:/opt/rh/gcc-toolset-14/root/usr/bin:/usr/local/bin:$CARGO_HOME/bin:$RUSTUP_HOME/bin:$PATH"
170
ENV PIP_EXTRA_INDEX_URL=${PIP_EXTRA_INDEX_URL}
171
ENV UV_EXTRA_INDEX_URL=${PIP_EXTRA_INDEX_URL}
172
-# Force pure Python protobuf to avoid s390x C++ extension crashes
173
-ENV PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python
172
COPY . /workspace/vllm
173
WORKDIR /workspace/vllm
174
@@ -214,10 +212,6 @@ RUN --mount=type=cache,target=/root/.cache/uv \
212
VLLM_TARGET_DEVICE=cpu VLLM_CPU_MOE_PREPACK=0 python setup.py bdist_wheel && \
213
uv pip install "$(echo dist/*.whl)[tensorizer]"
214
217
-# Remove protobuf C++ extension that crashes on s390x
218
-RUN rm -rf /opt/vllm/lib64/python${PYTHON_VERSION}/site-packages/google/_upb/*.so \
219
- /opt/vllm/lib64/python${PYTHON_VERSION}/site-packages/google/protobuf/pyext/*.so 2>/dev/null || true
220
-
215
# setup non-root user for vllm
216
RUN umask 002 && \
217
/usr/sbin/useradd --uid 2000 --gid 0 vllm && \
docs/getting_started/installation/cpu.s390x.inc.md
-13
@@ -138,19 +138,6 @@ VLLM_TARGET_DEVICE=cpu VLLM_CPU_MOE_PREPACK=0 python setup.py bdist_wheel && \
138
The Docker image (`Dockerfile.s390x`) already includes TCMalloc and sets
139
`LD_PRELOAD` automatically.
140
141
-!!! warning "Protobuf workaround for s390x"
142
- The C++ protobuf extension crashes on s390x. After installation, set the
143
- following environment variable and remove the C++ extensions:
144
-
145
- ```bash
146
- export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python
147
-
148
- # Remove C++ protobuf extensions that crash on s390x
149
- SITE_PKGS=$(python -c "import site; print(site.getsitepackages()[0])")
150
- rm -rf "$SITE_PKGS/google/_upb/"*.so \
151
- "$SITE_PKGS/google/protobuf/pyext/"*.so 2>/dev/null || true
152
- ```
153
-
141
--8<-- [end:build-wheel-from-source]
142
--8<-- [start:pre-built-images]
143
requirements/common.txt
+2
-1
@@ -11,7 +11,8 @@ transformers >= 5.10.4
11
huggingface_hub >= 1.31.0 # Required for the `huggingface_hub.utils.httpx` re-export
12
tokenizers >= 0.21.1 # Required for fast incremental detokenization.
13
safetensors >= 0.6.2 # MXFP4/MXFP6 dtype support (F8_E8M0, F4) added in 0.6.0: https://github.com/huggingface/safetensors/pull/611
14
-protobuf >= 5.29.6, !=6.30.*, !=6.31.*, !=6.32.*, !=6.33.0.*, !=6.33.1.*, !=6.33.2.*, !=6.33.3.*, !=6.33.4.* # Required by LlamaTokenizer, gRPC. CVE-2026-0994
14
+protobuf >= 5.29.6, !=6.30.*, !=6.31.*, !=6.32.*, !=6.33.0.*, !=6.33.1.*, !=6.33.2.*, !=6.33.3.*, !=6.33.4.*; platform_machine != "s390x"
15
+protobuf == 7.36.1; platform_machine == "s390x"
16
fastapi[standard] >= 0.133.0, < 0.137.0 # First version supporting Starlette 1.0; < 0.137.0 avoids route-tree change that breaks model-hosting-container-standards handler overrides.
17
starlette >= 1.0.1 # CVE-2026-48710: Host header injection in < 1.0.1
18
aiohttp >= 3.13.3