Skip to content

Commit

Permalink
feat: support pgai on pg16+
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesGuthrie committed Dec 10, 2024
1 parent 6896324 commit 8561b98
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,21 +60,24 @@ RUN set -ex; \
apk del .vector-deps; \
fi

# install pgai only on pg16 and not on 32 bit arm
# install pgai only on pg16+ and not on 32 bit arm
ARG PGAI_VERSION
ARG PG_MAJOR_VERSION
ARG TARGETARCH
RUN set -ex; \
if [ "$PG_MAJOR_VERSION" -eq 16 ] && [ "$TARGETARCH" != "arm" ]; then \
if [ "$PG_MAJOR_VERSION" -ge 16 ] && [ "$TARGETARCH" != "arm" ]; then \
apk update; \
apk add --no-cache --virtual .pgai-deps \
git \
build-base \
cargo \
cmake \
python3-dev \
apache-arrow-dev \
py3-pip; \
git clone --branch ${PGAI_VERSION} https://github.com/timescale/pgai.git /build/pgai; \
cd /build/pgai; \
python3 -m pip install --break-system-packages pyarrow==16.1.0; \
PG_BIN="/usr/local/bin" PG_MAJOR=${PG_MAJOR_VERSION} ./projects/extension/build.py install; \
apk del .pgai-deps; \
fi
Expand Down

0 comments on commit 8561b98

Please sign in to comment.