| FROM python:3.9-slim | |
| # Set working directory | |
| WORKDIR /app | |
| # Copy requirements first (better Docker caching) | |
| COPY requirements.txt . | |
| # Install dependencies | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy project files | |
| COPY . . | |
| # Expose port required by Hugging Face Spaces | |
| EXPOSE 7860 | |
| # Start API with Gunicorn | |
| CMD ["gunicorn","-w","1","-b","0.0.0.0:7860","app:pneumonia_detector_api"] | |