Vmax / Dockerfile
bahi-bh's picture
Create Dockerfile
7bb5641 verified
raw
history blame contribute delete
807 Bytes
FROM python:3.10-slim
ENV DEBIAN_FRONTEND=noninteractive
ENV PYTHONUNBUFFERED=1
ENV PORT=7860
# تثبيت أدوات النظام الضرورية وترميز الفيديو
RUN apt-get update && apt-get install -y \
git ffmpeg curl build-essential libsm6 libxext6 \
&& rm -rf /var/lib/apt/lists/*
# تثبيت uv
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv
WORKDIR /app
# استغلال الـ Cache لـ dependencies
COPY pyproject.toml uv.lock ./
RUN uv sync --frozen
# نسخ باقي ملفات المشروع
COPY . .
# إنشاء مجلد المخرجات في المساحة المؤقتة
RUN mkdir -p /tmp/outputs && chmod 777 /tmp/outputs
EXPOSE 7860
# التشغيل باستخدام uv run لضمان البيئة الصحيحة
CMD ["uv", "run", "python", "app.py"]