FROM python:3.12-slim WORKDIR /app RUN apt-get update && apt-get install -y \ g++ \ build-essential \ && rm -rf /var/lib/apt/lists/* COPY requirements.txt /app RUN pip install --upgrade pip RUN pip install --no-cache-dir -r requirements.txt RUN pip install flask-cors RUN python -m spacy download en_core_web_sm COPY .. /app ENV PYTHONUNBUFFERED=1 CMD ["python3.12", "app.py"]