Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] pgvector.rs Kernel 3.10 #5893

Closed
1 of 3 tasks
N1ck01as opened this issue Dec 20, 2023 · 3 comments · Fixed by #6785
Closed
1 of 3 tasks

[BUG] pgvector.rs Kernel 3.10 #5893

N1ck01as opened this issue Dec 20, 2023 · 3 comments · Fixed by #6785
Labels
bug Something isn't working needs triage Bug that needs triage from maintainer

Comments

@N1ck01as
Copy link

The bug

New Postgres database in its 0.1.11 release is not compatible with 3.10.108 kernel (present in most Synology NAS).
Issue seems to be fixed in pgvector.rs: tensorchord/pgvecto.rs#204

The OS that Immich Server is running on

DSM 7.2

Version of Immich Server

v1.9.4

Version of Immich Mobile App

v1.91.4

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

version: "3.9"

name: immich

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    command: [ "start.sh", "immich" ]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /volume1/Photos/albums:/mnt/media/albums:ro
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - .env
    ports:
      - 2283:3001
    depends_on:
      - redis
      - database
    restart: always

  immich-microservices:
    container_name: immich_microservices
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    # extends:
    #   file: hwaccel.yml
    #   service: hwaccel
    command: [ "start.sh", "microservices" ]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /volume1/Photos/albums:/mnt/media/albums:ro
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - .env
    depends_on:
      - redis
      - database
    restart: always

  immich-machine-learning:
    container_name: immich_machine_learning
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    volumes:
      - ./model-cache:/cache
    env_file:
      - .env
    restart: always

  redis:
    container_name: immich_redis
    image: redis:6.2-alpine@sha256:60e49e22fa5706cd8df7d5e0bc50ee9bab7c608039fa653c4d961014237cca46
    restart: always

  database:
    container_name: immich_postgres
    image: tensorchord/pgvecto-rs:pg14-v0.1.11
    env_file:
      - .env
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
    volumes:
      - ./pgdata:/var/lib/postgresql/data
    restart: always

Your .env content

# You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables

# The location where your uploaded files are stored
UPLOAD_LOCATION=/volume1/Photos

# The Immich version to use. You can pin this to a specific version like "v1.71.0"
#IMMICH_VERSION="v1.90.2"

# Connection secrets for postgres and typesense. You should change these to random passwords
DB_PASSWORD=my-secret-password

# The values below this line do not need to be changed
###################################################################################
DB_HOSTNAME=immich_postgres
DB_USERNAME=postgres
DB_DATABASE_NAME=immich

REDIS_HOSTNAME=immich_redis

Reproduction steps

1. Pull the the last release of Immich
2. immich_postgres provides errors: 

immich_postgres | 2023-12-19 01:46:11.483 UTC [42] ERROR: called Result::unwrap() on an Err value: Os { code: 38, kind: Unsupported, message: "Function not implemented" }
immich_postgres | 2023-12-19 01:46:11.483 UTC [42] STATEMENT:
immich_postgres | CREATE INDEX IF NOT EXISTS clip_index ON smart_search
immich_postgres | USING vectors (embedding cosine_ops) WITH (options = $$
immich_postgres | [indexing.hnsw]
immich_postgres | m = 16
immich_postgres | ef_construction = 300
immich_postgres | $$);

Additional information

No response

@N1ck01as N1ck01as added bug Something isn't working needs triage Bug that needs triage from maintainer labels Dec 20, 2023
@mertalev
Copy link
Contributor

We plan to upgrade the version of pgvecto.rs in a few weeks with a more stable 0.2 release. The issue will be fixed with this upgrade.

@davidrudlstorfer
Copy link

Are there any updates on the update of pvecto.rs @mertalev? I am also limited by the Linux Kernel version and therefore, I cannot run the latest Immich version.

Thanks in advance 🙏

@mertalev
Copy link
Contributor

pgvecto.rs 0.2 is not out yet, but it seems like it's close to release.

On our end, most of the code changes are in place for 0.2, but the upgrade logic itself hasn't been implemented yet. Implementing and testing the upgrade will take some more time to make sure it's airtight.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage Bug that needs triage from maintainer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants