Spaces:
Sleeping
Sleeping
File size: 492 Bytes
efe4a93 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# Use a lightweight Python base image
FROM python:3.11-slim
# Set work directory
WORKDIR /app
# Copy requirements and install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy all project files
COPY . .
# Expose the port Hugging Face expects
EXPOSE 7860
# Set environment variable for Flask
ENV PORT=7860
ENV FLASK_APP=app.py
ENV FLASK_ENV=production
# Command to run Flask via Gunicorn
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]
|