mirror of
https://github.com/YuzuZensai/cloudnative-vectorchord-pgvecto.rs.git
synced 2026-01-31 14:57:18 +00:00
✨ feat: adds VectorChord extension support
This commit is contained in:
@@ -3,6 +3,7 @@ ARG CNPG_TAG
|
|||||||
FROM ghcr.io/cloudnative-pg/postgresql:$CNPG_TAG
|
FROM ghcr.io/cloudnative-pg/postgresql:$CNPG_TAG
|
||||||
|
|
||||||
ARG CNPG_TAG
|
ARG CNPG_TAG
|
||||||
|
ARG VECTORCHORD_TAG
|
||||||
ARG PGVECTORS_TAG
|
ARG PGVECTORS_TAG
|
||||||
ARG TARGETARCH
|
ARG TARGETARCH
|
||||||
|
|
||||||
@@ -11,5 +12,7 @@ USER root
|
|||||||
ADD https://github.com/tensorchord/pgvecto.rs/releases/download/$PGVECTORS_TAG/vectors-pg${CNPG_TAG%.*}_${PGVECTORS_TAG#"v"}_$TARGETARCH.deb ./pgvectors.deb
|
ADD https://github.com/tensorchord/pgvecto.rs/releases/download/$PGVECTORS_TAG/vectors-pg${CNPG_TAG%.*}_${PGVECTORS_TAG#"v"}_$TARGETARCH.deb ./pgvectors.deb
|
||||||
RUN apt install ./pgvectors.deb
|
RUN apt install ./pgvectors.deb
|
||||||
|
|
||||||
USER postgres
|
ADD https://github.com/tensorchord/VectorChord/releases/download/$VECTORCHORD_TAG/postgresql-${CNPG_TAG%.*}-vchord_${VECTORCHORD_TAG#"v"}-1_$TARGETARCH.deb ./vchord.deb
|
||||||
|
RUN apt-get install -y ./vchord.deb && rm -f ./vchord.deb
|
||||||
|
|
||||||
|
USER postgres
|
||||||
|
|||||||
10
README.md
10
README.md
@@ -1,5 +1,5 @@
|
|||||||
# cnpgvecto.rs
|
# cnpgvecto.rs
|
||||||
Container images for [cloudnative-pg](https://cloudnative-pg.io/) with the [pgvecto.rs](https://github.com/tensorchord/pgvecto.rs) extension installed.
|
Container images for [cloudnative-pg](https://cloudnative-pg.io/) with [VectorChord](https://github.com/tensorchord/VectorChord) and [pgvecto.rs](https://github.com/tensorchord/pgvecto.rs) extension installed.
|
||||||
|
|
||||||
|
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
@@ -13,10 +13,11 @@ Container images for [cloudnative-pg](https://cloudnative-pg.io/) with the [pgve
|
|||||||
> postgresql:
|
> postgresql:
|
||||||
> shared_preload_libraries:
|
> shared_preload_libraries:
|
||||||
> - "vectors.so"
|
> - "vectors.so"
|
||||||
|
> - "vchord.so"
|
||||||
> ```
|
> ```
|
||||||
|
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
> The `pgvecto.rs` extension is not enabled by default. You need to enable it and set the search path when initializing the database. You can configure it in your Cluster spec:
|
> The `pgvecto.rs` and `VectorChord` extension is not enabled by default. You need to enable it and set the search path when initializing the database. You can configure it in your Cluster spec:
|
||||||
> ```yaml
|
> ```yaml
|
||||||
> apiVersion: postgresql.cnpg.io/v1
|
> apiVersion: postgresql.cnpg.io/v1
|
||||||
> kind: Cluster
|
> kind: Cluster
|
||||||
@@ -27,8 +28,9 @@ Container images for [cloudnative-pg](https://cloudnative-pg.io/) with the [pgve
|
|||||||
> postInitSQL:
|
> postInitSQL:
|
||||||
> - ALTER SYSTEM SET search_path TO "$user", public, vectors;
|
> - ALTER SYSTEM SET search_path TO "$user", public, vectors;
|
||||||
> - CREATE EXTENSION IF NOT EXISTS "vectors";
|
> - CREATE EXTENSION IF NOT EXISTS "vectors";
|
||||||
|
> - CREATE EXTENSION IF NOT EXISTS vchord CASCADE;
|
||||||
|
|
||||||
## Building
|
## Building
|
||||||
|
|
||||||
To build the Dockerfile locally, you need to pass the `CNPG_TAG` and `PGVECTORS_TAG` args. For example:
|
To build the Dockerfile locally, you need to pass the `CNPG_TAG`, `PGVECTORS_TAG` and `VECTORCHORD_TAG` args. For example:
|
||||||
`docker build . --build-arg="CNPG_TAG=16.3" --build-arg="PGVECTORS_TAG=v0.2.1"`
|
`docker build . --build-arg="CNPG_TAG=17.5-bookworm" --build-arg="PGVECTORS_TAG=v0.4.0" --build-arg="VECTORCHORD_TAG=0.4.3"`
|
||||||
@@ -10,3 +10,6 @@ cnpg:
|
|||||||
pgvectors:
|
pgvectors:
|
||||||
# renovate: datasource=github-releases depName=tensorchord/pgvecto.rs
|
# renovate: datasource=github-releases depName=tensorchord/pgvecto.rs
|
||||||
- "v0.4.0"
|
- "v0.4.0"
|
||||||
|
vectorchord:
|
||||||
|
# renovate: datasource=github-releases depName=tensorchord/VectorChord
|
||||||
|
- "0.4.3"
|
||||||
Reference in New Issue
Block a user