11FROM 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
75RUN 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
1412RUN 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'"
3734USER root
3835
39- RUN pip install psycopg[binary] pgvector
36+ RUN pip install psycopg[binary]
0 commit comments