Skip to content

Commit

Permalink
Strip vecto.rs's .so file
Browse files Browse the repository at this point in the history
This brings the vectors.so file from 450mb to 12mb.
  • Loading branch information
graveland committed Dec 16, 2024
1 parent f5c69d5 commit ad48d92
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ RUN set -eux; \
done; \
done

# the strip command is due to the vectors.so size: 450mb before stripping, 12mb after
ARG PGVECTO_RS
RUN set -ex; \
if [ -n "${PGVECTO_RS}" ]; then \
Expand All @@ -232,7 +233,8 @@ RUN set -ex; \
--output /tmp/vectors.deb \
"https://github.com/tensorchord/pgvecto.rs/releases/download/v${PGVECTO_RS}/vectors-pg${pg}_${PGVECTO_RS}_$(dpkg --print-architecture).deb" && \
dpkg -i /tmp/vectors.deb && \
rm -rfv /tmp/vectors.deb; \
rm -rfv /tmp/vectors.deb && \
strip --strip-unneeded "/usr/lib/postgresql/${pg}/lib/vectors.so"; \
fi \
done; \
fi
Expand Down

0 comments on commit ad48d92

Please sign in to comment.