forked from getzep/zep
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.postgres
28 lines (24 loc) · 979 Bytes
/
Dockerfile.postgres
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
FROM postgres:15.4-bullseye
# Set the pgvector version
ARG PGVECTOR_VERSION=0.5.0
# Install build dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
build-essential \
curl \
postgresql-server-dev-15
# Download and extract the pgvector release, build the extension, and install it.
RUN curl -f -L -o pgvector.tar.gz "https://github.com/pgvector/pgvector/archive/refs/tags/v${PGVECTOR_VERSION}.tar.gz" && \
tar -xzf pgvector.tar.gz && \
cd "pgvector-${PGVECTOR_VERSION}" && \
make OPTFLAGS="" && \
make install && \
mkdir /usr/share/doc/pgvector && \
cp LICENSE README.md /usr/share/doc/pgvector
# Clean up build dependencies and temporary files
RUN apt-get remove -y build-essential curl postgresql-server-dev-15 && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /pgvector.tar.gz /pgvector-${PGVECTOR_VERSION}