From 05414c7766420e65decac5fb06604f6fc64bea64 Mon Sep 17 00:00:00 2001 From: Robbie Court Date: Wed, 26 Aug 2026 02:57:08 +0000 Subject: [PATCH] Build numpy without a fixed SIMD baseline in the Docker image --- Dockerfile | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Dockerfile b/Dockerfile index 1cf0812d..8e42c354 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,6 +7,17 @@ RUN apt-get update && \ apt-get install -y --no-install-recommends gcc g++ && \ rm -rf /var/lib/apt/lists/* +# Build numpy from source with no fixed SIMD baseline. The PyPI wheels for +# numpy >= 2.4 are compiled for x86-64-v2 (SSE4.2/POPCNT) and refuse to import +# on the VFB Rancher/k8s hosts, whose QEMU "qemu64" CPU model does not expose +# those flags. cpu-baseline=none keeps every SIMD path as a runtime-dispatched +# option (X86_V2/V3/V4 are still used where the CPU has them), so there is no +# speed cost on modern hosts. Installed first so pip treats the numpy +# requirement from vfb_connect/pandas as already satisfied. +ARG NUMPY_SPEC=numpy +RUN pip install --no-cache-dir --no-binary numpy \ + -Csetup-args=-Dcpu-baseline=none "${NUMPY_SPEC}" + # Install Python deps first (layer caching) COPY requirements.txt setup.py pyproject.toml README.md ./ COPY src/ src/