| FROM python:3.11-slim | |
| WORKDIR /app | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| gcc \ | |
| g++ \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy requirements and install | |
| COPY requirements_competition.txt . | |
| RUN pip install --no-cache-dir -r requirements_competition.txt | |
| # Copy application | |
| COPY . . | |
| # Install spacy model | |
| RUN python -m spacy download en_core_web_sm | |
| # Expose port | |
| EXPOSE 8000 | |
| # Run application | |
| CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"] | |