| FROM python:3.10-slim | |
| WORKDIR /code | |
| # Copy requirements first for caching | |
| COPY ./requirements.txt /code/requirements.txt | |
| # Install dependencies | |
| RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt | |
| # Copy application code and model | |
| COPY ./app.py /code/app.py | |
| COPY ./diabetes_model_professional.pkl /code/diabetes_model_professional.pkl | |
| # Expose port for Hugging Face | |
| EXPOSE 7860 | |
| # Run the app | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |