Skip to content

Commit

Permalink
Fix error with pgvector 0.6.0 and update Postgres from 14 to 16 (#491)
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane authored Mar 1, 2024
1 parent c091271 commit 708c67f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ann_benchmarks/algorithms/pgvector/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ FROM ann-benchmarks
RUN git clone https://github.com/pgvector/pgvector /tmp/pgvector

RUN DEBIAN_FRONTEND=noninteractive apt-get -y install tzdata
RUN apt-get update && apt-get install -y --no-install-recommends build-essential postgresql postgresql-server-dev-all
RUN sh -c 'echo "local all all trust" > /etc/postgresql/14/main/pg_hba.conf'
RUN apt-get update && apt-get install -y --no-install-recommends build-essential postgresql-common
RUN /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -y
RUN apt-get install -y --no-install-recommends postgresql-16 postgresql-server-dev-16
RUN sh -c 'echo "local all all trust" > /etc/postgresql/16/main/pg_hba.conf'
RUN cd /tmp/pgvector && \
make clean && \
make OPTFLAGS="-march=native -mprefer-vector-width=512" && \
Expand All @@ -17,8 +19,10 @@ RUN service postgresql start && \
psql -c "CREATE USER ann WITH ENCRYPTED PASSWORD 'ann'" && \
psql -c "CREATE DATABASE ann" && \
psql -c "GRANT ALL PRIVILEGES ON DATABASE ann TO ann" && \
psql -d ann -c "GRANT ALL ON SCHEMA public TO ann" && \
psql -d ann -c "CREATE EXTENSION vector" && \
psql -c "ALTER USER ann SET maintenance_work_mem = '4GB'" && \
psql -c "ALTER USER ann SET max_parallel_maintenance_workers = 0" && \
psql -c "ALTER SYSTEM SET shared_buffers = '4GB'"
USER root

Expand Down

0 comments on commit 708c67f

Please sign in to comment.