File size: 712 Bytes
a7ac660
6111966
df707b1
6111966
 
a7ac660
 
6111966
 
 
df707b1
6111966
df707b1
 
 
 
 
6111966
 
 
df707b1
6111966
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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"]