FROM python:3.11-slim # System deps: sentence-transformers/faiss build against these on # some slim images; keep this minimal since there's no audio/ffmpeg # requirement here (unlike Reem). RUN apt-get update && apt-get install -y --no-install-recommends \ build-essential \ && rm -rf /var/lib/apt/lists/* WORKDIR /app # Install deps first so this layer is cached across code-only changes COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt COPY app.py . # HF Spaces Docker SDK expects the app on port 7860; if you deploy # elsewhere (Railway, etc.) this still works, just map the port # accordingly at `docker run -p :7860`. EXPOSE 7860 # GROQ_API_KEY must be injected at runtime (docker run -e GROQ_API_KEY=... # or the platform's secrets manager) -- it is never baked into the image. CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]