From 162eb8f8c31cb35371d45e5ffcb68132f4808160 Mon Sep 17 00:00:00 2001 From: James Guthrie Date: Thu, 12 Dec 2024 17:36:49 +0100 Subject: [PATCH] fix: get pgai working on i386 (#284) --- Dockerfile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Dockerfile b/Dockerfile index af415f3..20a423f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -78,7 +78,16 @@ RUN set -ex; \ cd /build/pgai; \ # note: this is a hack. pyarrow will be built from source, so must be pinned to this arrow version \ echo pyarrow==$(pkg-config --modversion arrow) >> ./projects/extension/requirements.txt; \ + if [ "$TARGETARCH" == "386" ]; then \ + # note: pinned because pandas 2.2.0-2.2.3 on i386 is affected by https://github.com/pandas-dev/pandas/issues/59905 \ + echo pandas==2.1.4 >> ./projects/extension/requirements.txt; \ + # note: no prebuilt binaries for pillow on i386 \ + apk add --no-cache --virtual .pgai-deps-386 \ + jpeg-dev \ + zlib-dev; \ + fi; \ PG_BIN="/usr/local/bin" PG_MAJOR=${PG_MAJOR_VERSION} ./projects/extension/build.py install; \ + if [ "$TARGETARCH" == "386" ]; then apk del .pgai-deps-386; fi; \ apk del .pgai-deps; \ fi