-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.age-vector
More file actions
33 lines (28 loc) · 1001 Bytes
/
Dockerfile.age-vector
File metadata and controls
33 lines (28 loc) · 1001 Bytes
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
29
30
31
32
33
# PostgreSQL with Apache AGE + pgvector
# Combines graph queries (AGE) with vector similarity search (pgvector).
#
# Build:
# docker build -t postgres-age-vector db/postgres/
#
# Or via docker-compose at the repo root:
# docker compose up
FROM apache/age:latest
# Install build dependencies for pgvector
USER root
RUN apt-get update && apt-get install -y \
build-essential \
git \
postgresql-server-dev-17 \
&& rm -rf /var/lib/apt/lists/*
# Build and install pgvector
# OPTFLAGS="" avoids SIMD instructions that cause "Illegal instruction" on
# some CPUs (notably older x86_64 and ARM under emulation).
RUN cd /tmp && \
git clone --branch v0.8.0 https://github.com/pgvector/pgvector.git && \
cd pgvector && \
make OPTFLAGS="" && \
make install && \
cd / && rm -rf /tmp/pgvector
USER postgres
# Create extensions when an empty data volume is initialized.
COPY --chown=postgres:postgres init-extensions.sql /docker-entrypoint-initdb.d/00-init-extensions.sql