forked from CodeDontBlow/Tecsys-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (23 loc) · 717 Bytes
/
Dockerfile
File metadata and controls
34 lines (23 loc) · 717 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
34
FROM python:3.11-slim
ENV PYTHONUNBUFFERED=1 \
POETRY_VERSION=1.8.2 \
POETRY_HOME="/opt/poetry" \
POETRY_VIRTUALENVS_CREATE=false \
PATH="/opt/poetry/bin:$PATH"
WORKDIR /app
RUN apt-get update && apt-get install -y \
curl \
build-essential \
libpq-dev \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean
RUN curl -sSL https://install.python-poetry.org | python3 -
RUN curl -fsSL https://ollama.com/install.sh | sh
RUN which ollama && ollama --version
COPY pyproject.toml ./
RUN poetry install --no-interaction --no-ansi
COPY . .
COPY docker-entrypoint.py /docker-entrypoint.py
RUN chmod +x /docker-entrypoint.py
EXPOSE 8000
ENTRYPOINT ["python", "/docker-entrypoint.py"]