Spaces:
Sleeping
Sleeping
File size: 876 Bytes
f9d5960 | 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 30 31 32 33 34 35 36 37 | # Use an official Python runtime as a parent image
FROM python:3.10
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# Set work directory
WORKDIR /app
# Install system dependencies
# Removed libgl1-mesa-glx as it causes build errors in newer Debian versions
# We use opencv-python-headless which doesn't need it
RUN apt-get update && apt-get install -y \
gcc \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
# Install python dependencies
COPY requirements.txt /app/
RUN pip install --upgrade pip
RUN pip install numpy
RUN pip install --no-cache-dir -r requirements.txt
# Copy project
COPY . /app/
# Expose port 7860 (Hugging Face Default)
EXPOSE 7860
# Copy and make the start script executable
COPY start.sh /app/
RUN chmod +x /app/start.sh
# Start using the script
CMD ["/app/start.sh"]
|