Git Product home page Git Product logo

cloudnative-pgvecto.rs's Introduction

cnpgvecto.rs

Container images for cloudnative-pg with the pgvecto.rs extension installed.

Important

If you are using this image on an existing database, the postgres configuration needs to be altered to enable the extension. You can do this by setting shared_preload_libraries in your Cluster spec:

apiVersion: postgresql.cnpg.io/v1
kind: Cluster
spec:
  (...)
  postgresql:
    shared_preload_libraries:
      - "vectors.so"

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:

apiVersion: postgresql.cnpg.io/v1
kind: Cluster
spec:
  (...)
  bootstrap:
    initdb:
      postInitSQL:
        - ALTER SYSTEM SET search_path TO "$user", public, vectors;
        - CREATE EXTENSION IF NOT EXISTS "vectors";

Building

To build the Dockerfile locally, you need to pass the CNPG_TAG and PGVECTORS_TAG args. For example:
docker build . --build-arg="CNPG_TAG=16.3" --build-arg="PGVECTORS_TAG=v0.2.1"

cloudnative-pgvecto.rs's People

Contributors

bo0tzz avatar renovate[bot] avatar xieydd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

cloudnative-pgvecto.rs's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

dockerfile
Dockerfile
github-actions
.github/workflows/docker.yml
  • actions/checkout v4
  • mikefarah/yq v4.44.3
  • actions/checkout v4
  • docker/setup-qemu-action v3.2.0
  • docker/setup-buildx-action v3.6.1
  • docker/login-action v3.3.0
  • docker/login-action v3
  • tj-actions/changed-files v45
  • actions/github-script v7
  • docker/metadata-action v5
  • docker/build-push-action v6.7.0
regex
versions.yaml
  • ghcr.io/cloudnative-pg/postgresql 14.13
  • ghcr.io/cloudnative-pg/postgresql 15.8
  • ghcr.io/cloudnative-pg/postgresql 16.4
  • tensorchord/pgvecto.rs v0.3.0

  • Check this box to trigger a request for Renovate to run again on this repository

Support for v0.1.11 tag

I'm trying to get Immich and Cloudnative-pg to play nicely with pgvecto.rs. My understanding is that Immich requires v0.1.11.

If I try to use tensorchord/pgvecto-rs:pg14-v0.1.11 it is rejected by cloudnative-pg, I get message:

one or more objects failed to apply, reason: 
admission webhook "vcluster.cnpg.io" denied the request:
  Cluster.cluster.cnpg.io "postgres" is invalid:
  [spec.imageName: Invalid value: "tensorchord/pgvecto-rs:pg14-v0.1.11": invalid version tag, spec.imageName: Invalid value: "tensorchord/pgvecto-rs:pg14-v0.1.11": wrong version: version not starting with a semantic version regex (^(\d\.?)+): pg14-v0.1.11]

If I try tensorchord/cloudnative-pgvecto-rs:14.10-v0.1.11, obviously fails, doesn't exist.

If I try tensorchord/cloudnative-pgvecto-rs:14.10-v0.1.13 then every seems to work, until I look at Immich logs:

[Nest] 7  - 02/05/2024, 6:22:33 PM   ERROR [JobService] Unable to run job handler (facialRecognition/facial-recognition): QueryFailedError: could not find function "vector_out_wrapper" in file "/usr/lib/postgresql/14/lib/vectors.so"
[Nest] 7  - 02/05/2024, 6:22:33 PM   ERROR [JobService] QueryFailedError: could not find function "vector_out_wrapper" in file "/usr/lib/postgresql/14/lib/vectors.so"
    at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async SelectQueryBuilder.loadRawResults (/usr/src/app/node_modules/typeorm/query-builder/SelectQueryBuilder.js:2192:25)
    at async SelectQueryBuilder.executeEntitiesAndRawResults (/usr/src/app/node_modules/typeorm/query-builder/SelectQueryBuilder.js:2031:30)
    at async SelectQueryBuilder.getRawAndEntities (/usr/src/app/node_modules/typeorm/query-builder/SelectQueryBuilder.js:684:29)
    at async SelectQueryBuilder.getOne (/usr/src/app/node_modules/typeorm/query-builder/SelectQueryBuilder.js:711:25)
    at async PersonService.handleRecognizeFaces (/usr/src/app/dist/domain/person/person.service.js:287:22)
    at async /usr/src/app/dist/domain/job/job.service.js:116:37
    at async Worker.processJob (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:394:28)
    at async Worker.retryIfFailed (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:581:24)
[Nest] 7  - 02/05/2024, 6:22:33 PM   ERROR [JobService] Object:
{
  "id": "174de32a-920e-4954-a910-b876845b38ba",
  "deferred": false
}

Which as best I can tell is because v0.1.11 is needed.

Branch protection rules

Setting the main branch to be protected (disallowing direct pushes) and marking the "Build status" job as a required PR check should prevent accidentally breaking the main branch build.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.