File size: 807 Bytes
26b6fc7
1b0e8b4
 
 
26b6fc7
d33651f
 
26b6fc7
 
5c86995
d33651f
1b0e8b4
d33651f
 
1b0e8b4
 
 
26b6fc7
1b0e8b4
 
 
d33651f
 
 
 
 
 
 
 
 
 
 
 
26b6fc7
 
d33651f
26b6fc7
d33651f
1b0e8b4
26b6fc7
 
d33651f
 
26b6fc7
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
FROM postgres:14.3

WORKDIR /app

RUN apt update && \
    apt install -y --no-install-recommends \
    build-essential \
    python3 \
    python3-pip \
    python3-dev \
    postgresql-server-dev-14 \
    libpq-dev \
    htop \
    git

COPY ./ /app/

RUN pip3 install -r ./requirements.txt

EXPOSE 7860

ENV POSTGRES_USER=postgres
ENV POSTGRES_PASSWORD=pwd
ENV POSTGRES_PASSWORD=sorbobot

# Install PGVector
WORKDIR /tmp
RUN git clone --branch v0.5.1 https://github.com/pgvector/pgvector.git
WORKDIR /tmp/pgvector
RUN make
RUN make install # may need sudo
WORKDIR /app

COPY "execution.sh" "/usr/local/bin/"

COPY ./docker-entrypoint-initdb.d/ /docker-entrypoint-initdb.d/

ENTRYPOINT ["execution.sh"]

STOPSIGNAL SIGINT

HEALTHCHECK CMD curl --fail http://localhost:7860/_stcore/health

CMD ["postgres"]