video-generator-api / Dockerfile
Yousefsg's picture
Update Dockerfile
df707b1 verified
Raw
History Blame Contribute Delete
712 Bytes
FROM python:3.10-slim
# تثبيت ffmpeg والأدوات المطلوبة
RUN apt-get update && apt-get install -y \
ffmpeg \
git \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /code
# نسخ المتطلبات
COPY ./requirements.txt /code/requirements.txt
# تثبيت الحزم مع توجيه البيب لجلب نسخة الـ CPU من تورش أولاً بشكل صحيح
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir torch==2.2.2+cpu --extra-index-url https://download.pytorch.org/whl/cpu && \
pip install --no-cache-dir -r /code/requirements.txt
COPY . .
# تشغيل السيرفر
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]