Spaces:
Sleeping
Sleeping
| FROM python:3.9-slim | |
| WORKDIR /app | |
| # Copy requirements first to leverage Docker cache | |
| COPY requirements.txt requirements.txt | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy application files only (not README.md which has YAML frontmatter) | |
| COPY app.py . | |
| COPY model_service.py . | |
| COPY static/ ./static/ | |
| COPY templates/ ./templates/ | |
| COPY models/ ./models/ | |
| COPY __init__.py . | |
| COPY start.sh . | |
| # Make the start script executable | |
| RUN chmod +x start.sh | |
| # Make port 7860 available (this is the port Hugging Face Spaces expects) | |
| EXPOSE 7860 | |
| # Set environment variables | |
| ENV PYTHONUNBUFFERED=1 | |
| # Run the application using the startup script | |
| CMD ["./start.sh"] |