-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.backend
More file actions
38 lines (28 loc) · 877 Bytes
/
Copy pathDockerfile.backend
File metadata and controls
38 lines (28 loc) · 877 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
35
36
37
38
FROM python:3.11-slim AS runtime
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV PIP_NO_CACHE_DIR=1
ENV PYTHONPATH=/app/src
WORKDIR /app
RUN addgroup --system --gid 10001 astraflow \
&& adduser --system --uid 10001 --ingroup astraflow astraflow
COPY pyproject.toml ./
RUN pip install --upgrade pip \
&& pip install \
"fastapi>=0.115.0" \
"uvicorn[standard]>=0.30.0" \
"pydantic>=2.7.0" \
"pydantic-settings>=2.3.0" \
"httpx>=0.27.0" \
"redis>=5.0.0" \
"pymilvus>=2.4.0" \
"langgraph>=0.2.0" \
"langchain-core>=0.2.0" \
"python-dotenv>=1.0.0"
COPY src ./src
COPY config ./config
RUN mkdir -p /app/.astra_workspace/sessions \
&& chown -R astraflow:astraflow /app
USER astraflow
EXPOSE 8080
CMD ["uvicorn", "astra_flow.main:app", "--host", "0.0.0.0", "--port", "8080"]