File size: 1,210 Bytes
9d645ea
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
38
39
40
41
42
43
44
45
46
2 — Replace/update your Dockerfile (copy this exact version)

This is a robust, minimal Dockerfile that:

uses a modern slim base,

updates packages,

installs small system libs (ffmpeg, libgl1) for computer-vision tasks,

installs pip deps from Requirements.txt,

copies code and runs app.py.

Create/replace Dockerfile with:

# Use newer Debian-based Python slim
FROM python:3.11-slim-bookworm

ENV DEBIAN_FRONTEND=noninteractive
WORKDIR /app

# Install system deps (ffmpeg for video, git if needed, libs for OpenCV)
RUN apt-get update && apt-get upgrade -y \
 && apt-get install -y --no-install-recommends \
    git \
    ffmpeg \
    build-essential \
    libgl1 \
 && rm -rf /var/lib/apt/lists/*

# Install Python deps
COPY Requirements.txt /app/Requirements.txt
RUN python -m pip install --upgrade pip \
 && pip install --no-cache-dir -r /app/Requirements.txt

# Copy project files
COPY . /app

# Expose port (Streamlit default; Hugging Face will map its port)
ENV PORT=7860
EXPOSE 7860

# Use start.sh if present, otherwise run wrapper app.py
# If you added start.sh earlier, use that; otherwise run app.py directly.
CMD ["bash", "-lc", "if [ -x ./start.sh ]; then ./start.sh; else python app.py; fi"]