File size: 624 Bytes
1425afc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
FROM python:3.10-slim

# Install system binaries and fonts
RUN apt-get update && apt-get install -y \
    ffmpeg \
    wget \
    libmagic1 \
    fonts-dejavu-core \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /app

# Create temp dir and set permissions for HF user
RUN mkdir -p /app/temp && chmod 777 /app/temp

COPY requirements.txt .
RUN pip install --no-cache-dir -U yt-dlp && \
    pip install --no-cache-dir -r requirements.txt

COPY . .

# Set permissions for the entire app dir to avoid runtime write issues
RUN chmod -R 777 /app

ENV PYTHONUNBUFFERED=1
ENV TEMP_DIR=/app/temp

EXPOSE 7860

CMD ["python", "app.py"]