| FROM python:3.11-slim | |
| RUN apt-get update && apt-get install -y git wget curl build-essential | |
| WORKDIR /app | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY . . | |
| EXPOSE 7860 | |
| # Build index if missing, then run FastAPI | |
| CMD ["bash", "-c", "python build_index.py && uvicorn main:app --host 0.0.0.0 --port 7860"] | |