# Slim image for the Render demo deployment. # Skips the RAG dependency stack (chromadb, sentence-transformers, torch, # biopython) which would put the image past 2 GB and the runtime past # Render's 512 MB free-tier RAM ceiling. The pipeline graceful-degrades # when these are missing — `try/except` in api/pipeline.py catches the # ImportError on RAG calls and continues with deterministic evidence. # # For the full stack (validation runs, RAG, in-silico predictions), # use backend/Dockerfile + docker-compose locally. FROM python:3.12-slim WORKDIR /app RUN apt-get update && apt-get install -y --no-install-recommends \ build-essential libpq-dev curl \ && rm -rf /var/lib/apt/lists/* # Core deps only — no torch / chromadb / sentence-transformers / celery / biopython RUN pip install --no-cache-dir --upgrade pip && \ pip install --no-cache-dir \ "fastapi>=0.115.0" \ "uvicorn[standard]>=0.32.0" \ "pydantic>=2.9.0" \ "pydantic-settings>=2.6.0" \ "sqlalchemy>=2.0.36" \ "psycopg[binary]>=3.2.3" \ "alembic>=1.14.0" \ "httpx>=0.27.2" \ "anthropic>=0.39.0" \ "tenacity>=9.0.0" \ "structlog>=24.4.0" \ "python-multipart>=0.0.12" \ "python-jose[cryptography]>=3.3.0" \ "passlib[bcrypt]>=1.7.4" COPY backend ./backend COPY alembic.ini ./ EXPOSE 8000 # Render injects $PORT — bind to it. Migrations apply automatically via # the FastAPI lifespan hook in main.py, so no explicit `alembic upgrade` # step is needed here. CMD ["sh", "-c", "uvicorn backend.app.main:app --host 0.0.0.0 --port ${PORT:-8000}"]