Skip to content

Commit 78a4c41

Browse files
committed
adapt openGauss for annbenchmark
1 parent 1d91095 commit 78a4c41

File tree

3 files changed

+16
-21
lines changed

3 files changed

+16
-21
lines changed

.github/workflows/benchmarks.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ jobs:
7272
- voyager
7373
- vsag
7474
- weaviate
75+
- openGauss
7576
include:
7677
- library: pynndescent
7778
dataset: random-xs-16-hamming
Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
FROM ann-benchmarks
22

3-
# https://github.com/pgvector/pgvector/blob/master/Dockerfile
4-
5-
RUN git clone https://github.com/pgvector/pgvector /tmp/pgvector
3+
RUN add-apt-repository ppa:opengauss/opengauss
64

75
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install tzdata
8-
RUN apt-get update && apt-get install -y --no-install-recommends build-essential postgresql-common
9-
RUN /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -y
10-
RUN apt-get install -y --no-install-recommends postgresql-16 postgresql-server-dev-16
11-
RUN sh -c 'echo "local all all trust" > /etc/postgresql/16/main/pg_hba.conf'
6+
RUN sed -i 's/bookworm/jammy/g' /etc/apt/sources.list.d/opengauss-ubuntu-opengauss-bookworm.list
7+
RUN apt-get update && apt-get install -y --no-install-recommends build-essential
8+
RUN apt install opengauss
9+
RUN sh -c 'echo "local all all trust" > /var/lib/opengauss/data/pg_hba.conf'
1210

1311
# Dynamically set OPTFLAGS based on the architecture
1412
RUN ARCH=$(uname -m) && \
@@ -24,16 +22,15 @@ RUN ARCH=$(uname -m) && \
2422
make OPTFLAGS="$OPTFLAGS" && \
2523
make install
2624

27-
USER postgres
28-
RUN service postgresql start && \
29-
psql -c "CREATE USER ann WITH ENCRYPTED PASSWORD 'ann'" && \
30-
psql -c "CREATE DATABASE ann" && \
31-
psql -c "GRANT ALL PRIVILEGES ON DATABASE ann TO ann" && \
32-
psql -d ann -c "GRANT ALL ON SCHEMA public TO ann" && \
33-
psql -d ann -c "CREATE EXTENSION vector" && \
34-
psql -c "ALTER USER ann SET maintenance_work_mem = '4GB'" && \
35-
psql -c "ALTER USER ann SET max_parallel_maintenance_workers = 0" && \
36-
psql -c "ALTER SYSTEM SET shared_buffers = '4GB'"
25+
USER opengauss
26+
RUN service opengauss start && \
27+
gsql -c "CREATE USER ann WITH ENCRYPTED PASSWORD 'ann'" && \
28+
gsql -c "CREATE DATABASE ann" && \
29+
gsql -c "GRANT ALL PRIVILEGES ON DATABASE ann TO ann" && \
30+
gsql -d ann -c "GRANT ALL ON SCHEMA public TO ann" && \
31+
gsql -c "ALTER USER ann SET maintenance_work_mem = '4GB'" && \
32+
gsql -c "ALTER USER ann SET max_parallel_maintenance_workers = 0" && \
33+
gsql -c "ALTER SYSTEM SET shared_buffers = '4GB'"
3734
USER root
3835

39-
RUN pip install psycopg[binary] pgvector
36+
RUN pip install psycopg[binary]

requirements.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,3 @@ jinja2==3.1.2
1010
pytest==7.2.2
1111
datasets==2.12.0
1212
requests==2.31.0
13-
psycopg
14-
psycopg-binary
15-
pgvector

0 commit comments

Comments
 (0)