Skip to content

Commit 95a6fb2

Browse files
committed
chore(repo): add pgvector to our local postgresql instance
1 parent 83ddf72 commit 95a6fb2

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

docker/Dockerfile.postgres

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
FROM postgres:14
22

3+
# Install build dependencies for pgvector
34
RUN apt-get update \
4-
&& apt-get install -y postgresql-14-partman \
5+
&& apt-get install -y --no-install-recommends \
6+
postgresql-14-partman \
7+
postgresql-server-dev-14 \
8+
build-essential \
9+
git \
10+
ca-certificates \
511
&& rm -rf /var/lib/apt/lists/*
12+
13+
# Install pgvector
14+
RUN cd /tmp \
15+
&& git clone --branch v0.5.1 https://github.com/pgvector/pgvector.git \
16+
&& cd pgvector \
17+
&& make \
18+
&& make install \
19+
&& cd .. \
20+
&& rm -rf pgvector
21+
22+
# Optional: Cleanup build dependencies to keep image small (if you want)
23+
# RUN apt-get remove -y build-essential git postgresql-server-dev-14 && apt-get autoremove -y

0 commit comments

Comments
 (0)