forked from lanterndata/lantern
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.dev
49 lines (43 loc) · 1.43 KB
/
Dockerfile.dev
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
ARG VERSION=16
ARG PGVECTOR_VERSION=0.5.0
ARG IMAGE_TAG=$VERSION-bookworm
FROM postgres:$IMAGE_TAG
ARG VERSION
ARG PGVECTOR_VERSION
WORKDIR /lantern
RUN apt update \
# Fix the locales package version to prevent unexpected updates
&& apt-mark hold locales \
&& apt install -y --no-install-recommends \
build-essential \
cmake \
postgresql-server-dev-$VERSION \
gdb \
wget \
python3-pip \
python3-dev \
sudo \
curl \
git-all \
tmux \
clang-format \
&& pip install GitPython libtmux --break-system-packages && \
wget -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 && make install
COPY . .
# Build lantern
RUN rm -rf build \
&& mkdir build \
&& cd build \
&& cmake -DUSEARCH_NO_MARCH_NATIVE=ON -DCMAKE_BUILD_TYPE=Debug .. \
&& make install
# Install benchmarking tools in build folder
RUN mkdir build/lantern \
&& git clone https://github.com/lanterndata/benchmark build/benchmark \
&& cd build/benchmark \
&& pip install -r core/requirements.txt --break-system-packages \
&& pip install -r external/requirements.txt --break-system-packages
ENV DATABASE_URL=postgres://postgres:postgres@localhost:5432/postgres
ENV LANTERN_DATABASE_URL=postgres://postgres:postgres@localhost:5432/postgres