-
Notifications
You must be signed in to change notification settings - Fork 48
/
Dockerfile
52 lines (41 loc) · 1.13 KB
/
Dockerfile
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
50
51
52
FROM python:3.11
# Set build argument
ARG DEBUG
ARG API_ENABLED
# Set environment variable based on the build argument
ENV DEBUG=${DEBUG}
ENV API_ENABLED=${API_ENABLED}
ENV PIP_NO_CACHE_DIR=true
ENV PATH="${PATH}:/root/.poetry/bin"
RUN pip install poetry
WORKDIR /app
COPY pyproject.toml poetry.lock /app/
# Install the dependencies
RUN poetry config virtualenvs.create false && \
poetry install --no-root --no-dev
RUN apt-get update -q && \
apt-get install -y -q \
gcc \
python3-dev \
curl \
zip \
jq \
# libgl1-mesa-glx \
netcat-traditional && \
pip install poetry && \
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \
unzip -qq awscliv2.zip && \
./aws/install && \
apt-get clean && \
rm -rf \
awscliv2.zip \
/var/lib/apt/lists/* \
/tmp/* \
/var/tmp/*
WORKDIR /app
# Set the PYTHONPATH environment variable to include the /app directory
ENV PYTHONPATH=/app
COPY cognee/ /app/cognee
COPY entrypoint.sh /app/entrypoint.sh
RUN chmod +x /app/entrypoint.sh
ENTRYPOINT ["/app/entrypoint.sh"]