FROM python:3.9-slim WORKDIR /app COPY . /app # 1) Install OS-level build tools (gcc, make, etc.) RUN apt-get update && \ apt-get install -y --no-install-recommends \ build-essential gcc && \ rm -rf /var/lib/apt/lists/* # 2) Install Python deps and spaCy model RUN pip install --upgrade pip && \ pip install -r requirements.txt && \ python -m spacy download en_core_web_sm EXPOSE 7860 CMD ["python","app.py"]