Skip to content

Commit 0e87caf

Browse files
Merge pull request #38 from moduon/pgvector-arch
fix(pgvector): target x86-64-v2 for CPU portability
2 parents e79329a + 89cd20c commit 0e87caf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ RUN apk add --no-cache python3 py3-netifaces \
2727
wget -qO- "https://github.com/pgvector/pgvector/archive/refs/tags/v${PGVECTOR_VERSION}.tar.gz" \
2828
| tar -xz -C /tmp; \
2929
cd "/tmp/pgvector-${PGVECTOR_VERSION}" \
30-
&& make PG_CONFIG=/usr/local/bin/pg_config \
30+
&& make $(if [ "$(uname -m)" = "x86_64" ]; then echo 'CFLAGS=-march=x86-64-v2'; fi) PG_CONFIG=/usr/local/bin/pg_config \
3131
&& make install PG_CONFIG=/usr/local/bin/pg_config; \
3232
cd / && rm -rf "/tmp/pgvector-${PGVECTOR_VERSION}"; \
3333
apk del .pgvector-build; \

0 commit comments

Comments
 (0)