Spaces:
Running
Running
File size: 708 Bytes
ea4c33a 33d3370 |
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 29 |
# Use an official Python runtime as a parent image FROM python:3.8-slim # Set the working directory in the container WORKDIR /app # Copy the current directory contents into the container at /app COPY . /app # Install system dependencies RUN apt-get update && \ apt-get install -y \ python3-opencv \ libglib2.0-0 \ libsm6 \ libxext6 \ libxrender-dev \ && rm -rf /var/lib/apt/lists/* # Install dependencies from requirements.txt RUN pip install --upgrade pip RUN pip install -r requirements.txt # Expose port 7860 for Hugging Face Spaces (default port for web apps) EXPOSE 7860 # Command to run the application using Gunicorn CMD ["gunicorn", "-b", "0.0.0.0:7860", "app:app"] |