Skip to content

Commit

Permalink
eat: upgrade pgai extension to 0.7.0
Browse files Browse the repository at this point in the history
Signed-off-by: Sergio Moya <[email protected]>
  • Loading branch information
smoya committed Jan 22, 2025
1 parent 64f8720 commit 1b86dad
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
16 changes: 11 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -66,21 +66,27 @@ ARG TARGETARCH
RUN set -ex; \
if [ "$PG_MAJOR_VERSION" -ge 16 ] && [ "$TARGETARCH" != "arm" ]; then \
apk update; \
# install shared libraries required by pyarrow needed at runtime
apk add libarrow libparquet; \
# install required dependencies for building pyarrow from source
apk add --no-cache --virtual .pgai-deps \
git \
build-base \
cargo \
cmake \
python3-dev \
apache-arrow-dev \
py3-pip; \
py3-pip \
apache-arrow-dev; \
# pgai requires pip 23.0.1 or greater due to the use of --break-system-packages flag
if [ "$(pip --version | awk '{print $2; exit}')" \< "23.0.1" ]; then \
python3 -m pip install --upgrade pip==23.0.1; \
fi; \
git clone --branch ${PGAI_VERSION} https://github.com/timescale/pgai.git /build/pgai; \
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; \
echo "pandas==2.1.4" > constraints.txt; \
export PIP_CONSTRAINT=$(pwd)/constraints.txt; \
# note: no prebuilt binaries for pillow on i386 \
apk add --no-cache --virtual .pgai-deps-386 \
jpeg-dev \
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ORG=timescaledev
PG_VER=pg16
PG_VER_NUMBER=$(shell echo $(PG_VER) | cut -c3-)
PG_MAJOR_VERSION=$(shell echo $(PG_VER_NUMBER) | cut -d. -f1)
ifeq ($(shell test $(PG_MAJOR_VERSION) -ge 17; echo $$?),0)
ifeq ($(shell test $(PG_MAJOR_VERSION) -ge 16; echo $$?),0)
ALPINE_VERSION=3.21
CLANG_VERSION=19
else
Expand All @@ -28,7 +28,7 @@ TAG=-t $(TAG_VERSION) $(if $(BETA),,-t $(TAG_LATEST))
TAG_OSS=-t $(TAG_VERSION)-oss $(if $(BETA),,-t $(TAG_LATEST)-oss)

PGVECTOR_VERSION=v0.7.2
PGAI_VERSION=extension-0.6.0
PGAI_VERSION=extension-0.7.0

COMMON_BUILD_ARGS= --build-arg TS_VERSION=$(TS_VERSION) \
--build-arg PREV_IMAGE=$(PREV_IMAGE) \
Expand Down

0 comments on commit 1b86dad

Please sign in to comment.