Spaces:
Build error
Build error
File size: 674 Bytes
4dbe5d1 |
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 |
# syntax=docker/dockerfile:1.4
# Base image
FROM python:3.12-slim AS base
# Install system dependencies for OpenCV and ffmpeg at runtime
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
libgl1-mesa-glx \
libglib2.0-0 \
libsm6 \
libxext6 \
libx11-dev \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
# Builder stage: install Python dependencies
WORKDIR /app
# 4. Copy requirements and install
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade pip && \
pip install --default-timeout=100 --no-cache-dir -r requirements.txt
# 5. Copy app source
COPY . .
EXPOSE 7860
CMD ["python", "demo_v5.py"] |