File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed
ann_benchmarks/algorithms/pgvector Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -9,10 +9,20 @@ RUN apt-get update && apt-get install -y --no-install-recommends build-essential
9
9
RUN /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -y
10
10
RUN apt-get install -y --no-install-recommends postgresql-16 postgresql-server-dev-16
11
11
RUN sh -c 'echo "local all all trust" > /etc/postgresql/16/main/pg_hba.conf'
12
- RUN cd /tmp/pgvector && \
13
- make clean && \
14
- make OPTFLAGS="-march=native -mprefer-vector-width=512" && \
15
- make install
12
+
13
+ # Dynamically set OPTFLAGS based on the architecture
14
+ RUN ARCH=$(uname -m) && \
15
+ if [ "$ARCH" = "aarch64" ]; then \
16
+ OPTFLAGS="-march=native -msve-vector-bits=512" ; \
17
+ elif [ "$ARCH" = "x86_64" ]; then \
18
+ OPTFLAGS="-march=native -mprefer-vector-width=512" ; \
19
+ else \
20
+ OPTFLAGS="-march=native" ; \
21
+ fi && \
22
+ cd /tmp/pgvector && \
23
+ make clean && \
24
+ make OPTFLAGS="$OPTFLAGS" && \
25
+ make install
16
26
17
27
USER postgres
18
28
RUN service postgresql start && \
You can’t perform that action at this time.
0 commit comments