File size: 735 Bytes
57aaceb 21101a7 38a1c78 57aaceb 38a1c78 57aaceb 21101a7 38a1c78 57aaceb 38a1c78 57aaceb 38a1c78 57aaceb 38a1c78 57aaceb 21101a7 38a1c78 57aaceb 38a1c78 57aaceb 38a1c78 | 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 | # 1. Slim image use karenge fast build ke liye
FROM python:3.9-slim
# 2. System dependencies (Fixed for Trixie/Debian latest)
RUN apt-get update && apt-get install -y \
libgl1 \
libglx-mesa0 \
libglib2.0-0 \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
# 3. Working directory
WORKDIR /app
# 4. Requirements copy aur install karein
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# 5. Sara code copy karein
COPY . .
# 6. Folder permissions (Force create)
RUN mkdir -p /app/static/uploads && chmod -R 777 /app/static/uploads
# 7. Environment variable set karein taaki logs foran dikhein
ENV PYTHONUNBUFFERED=1
# 8. Hugging Face port
EXPOSE 7860
# 9. Run the app
CMD ["python", "app.py"]
|