# Use an official Python base image | |
FROM python:3.9 | |
# Set working directory | |
WORKDIR /app | |
# Copy application files | |
COPY . /app | |
# Install dependencies | |
RUN pip install --no-cache-dir flask gunicorn | |
# Expose default Hugging Face Spaces port | |
EXPOSE 7860 | |
# Launch the app with Gunicorn | |
CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:7860", "app:app"] | |