35 lines
1.2 KiB
Docker
35 lines
1.2 KiB
Docker
FROM python:3.12-slim
|
|
|
|
WORKDIR /app
|
|
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends gcc \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY apps/ai-service/ ./
|
|
# config.py's `entities_path` default assumes a full monorepo checkout
|
|
# (parents[2] from apps/ai-service/config.py = repo root); this image only
|
|
# has apps/ai-service flattened into /app, so the file is baked in here and
|
|
# ENTITIES_PATH in .env.prod points at it instead.
|
|
COPY ingestion/data/verified/drug_entities.json ./ingestion_data/drug_entities.json
|
|
|
|
# Flat module layout (rag/, adapters/, routers/...), not an installable
|
|
# package — setuptools' auto-discovery rejects "multiple top-level packages"
|
|
# for `pip install .`, so the runtime deps are listed directly instead,
|
|
# mirroring pyproject.toml's [project.dependencies] + the metrics/generation
|
|
# extras + boto3 (used for Bedrock, not declared in pyproject.toml).
|
|
RUN pip install --no-cache-dir \
|
|
"fastapi>=0.115,<1" \
|
|
"httpx>=0.27,<1" \
|
|
"psycopg[binary]>=3.2,<4" \
|
|
"pydantic-settings>=2.6,<3" \
|
|
"qdrant-client>=1.7,<2" \
|
|
"uvicorn[standard]>=0.30,<1" \
|
|
"prometheus-client>=0.20,<1" \
|
|
"anthropic>=0.112,<1" \
|
|
"boto3"
|
|
|
|
EXPOSE 8000
|
|
|
|
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|