Spaces:
Running
Running
File size: 630 Bytes
75b13ff 5a385c0 75b13ff 5a385c0 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# Use official Python image
FROM python:3.10-slim
# Set environment variables
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PIP_NO_CACHE_DIR=1
# Set work directory
WORKDIR /app
# Copy all files into the container
COPY . /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
git \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
# Expose port expected by Hugging Face
EXPOSE 7860
# Run app with 4 Gunicorn workers in production mode
CMD ["gunicorn", "--workers=4", "--bind=0.0.0.0:7860", "app:app"] |