-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathDockerfile.api
More file actions
32 lines (23 loc) · 907 Bytes
/
Dockerfile.api
File metadata and controls
32 lines (23 loc) · 907 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
# FastAPI service for ct-platform /report-analyst-api proxy (port 8001)
FROM python:3.12-slim
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
cmake \
libpoppler-cpp-dev \
libsqlite3-dev \
pkg-config \
curl \
&& rm -rf /var/lib/apt/lists/*
ENV OPENBLAS_NUM_THREADS=1
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY report_analyst_api/requirements.txt report_analyst_api/requirements.txt
RUN pip install --no-cache-dir -r report_analyst_api/requirements.txt
COPY report_analyst/ report_analyst/
COPY report_analyst_api/ report_analyst_api/
COPY prompts/ prompts/
EXPOSE 8001
HEALTHCHECK --interval=30s --timeout=10s --start-period=15s --retries=3 \
CMD curl -f http://localhost:8001/health || exit 1
CMD ["uvicorn", "report_analyst_api.main:app", "--host", "0.0.0.0", "--port", "8001"]