From 20d5eb80b90334818343121213b73b6aedafaa6a Mon Sep 17 00:00:00 2001 From: Tim Dudgeon Date: Tue, 21 Jul 2026 11:17:08 +0100 Subject: [PATCH] fix: pin numpy<2 in rdkit-base and dmpk images rdkit==2023.3.2 and matplotlib==3.7.1 both predate NumPy 2.0 and ship compiled extensions built against NumPy's 1.x C-API. With numpy left unpinned, a rebuild resolves the latest NumPy (currently 2.2.6) and those extensions fail at import with "AttributeError: _ARRAY_API not found" - hit by pk-tmax-cmax-sim (via matplotlib) and both descriptor-generator tests (via rdkit/mordred, inherited from vs-rdkit-base). Co-Authored-By: Claude Sonnet 5 --- Dockerfile-dmpk | 4 +++- Dockerfile-rdkit-base | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Dockerfile-dmpk b/Dockerfile-dmpk index 0a7ae4f..c7b8135 100644 --- a/Dockerfile-dmpk +++ b/Dockerfile-dmpk @@ -16,7 +16,9 @@ ENV PYTHONPATH=/code ENV HOME=/code WORKDIR ${HOME} -RUN pip install matplotlib==3.7.1 im-data-manager-job-utilities==1.0.1 +# numpy is pinned below 2 because this matplotlib release predates +# NumPy 2.0 and its compiled extensions are not ABI-compatible with it +RUN pip install "numpy<2" matplotlib==3.7.1 im-data-manager-job-utilities==1.0.1 COPY utils.py ./ COPY dmpk/*.py ./dmpk/ \ No newline at end of file diff --git a/Dockerfile-rdkit-base b/Dockerfile-rdkit-base index 67204ee..6e9e144 100644 --- a/Dockerfile-rdkit-base +++ b/Dockerfile-rdkit-base @@ -13,6 +13,8 @@ RUN apt-get -y update &&\ ENV PYTHONUNBUFFERED=1 # pip install RDKit -RUN pip install rdkit==2023.3.2 +# numpy is pinned below 2 because this rdkit release predates NumPy 2.0 +# and its compiled extensions are not ABI-compatible with it +RUN pip install "numpy<2" rdkit==2023.3.2