File size: 417 Bytes
b70a0fa 75febfd b70a0fa 75febfd b70a0fa 75febfd b70a0fa 75febfd b70a0fa 76fad84 75febfd b70a0fa |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# Use an official Python runtime as a parent image
FROM python:3.9-slim
# Set the working directory
WORKDIR /app
# Copy everything into /app
COPY . /app
# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Expose default Spaces port
EXPOSE 7860
# Run the application using Gunicorn
# Hugging Face sets $PORT automatically
CMD ["sh", "-c", "gunicorn -w 4 -b 0.0.0.0:${PORT:-7860} app:app"]
|