Spaces:
Runtime error
Runtime error
FROM docker.io/library/python:3.10@sha256:e2c7fb05741c735679b26eda7dd34575151079f8c615875fbefe401972b14d85 | |
WORKDIR /home/user/app | |
# تثبيت المتطلبات الأساسية | |
RUN apt-get update && apt-get install -y \ | |
git \ | |
git-lfs \ | |
ffmpeg \ | |
libsm6 \ | |
libxext6 \ | |
cmake \ | |
rsync \ | |
libgl1-mesa-glx \ | |
curl \ | |
&& rm -rf /var/lib/apt/lists/* \ | |
&& git lfs install | |
# تثبيت Node.js (إذا كان مطلوبًا) | |
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \ | |
&& apt-get install -y nodejs \ | |
&& rm -rf /var/lib/apt/lists/* | |
# إنشاء مستخدم غير root | |
RUN useradd -m -u 1000 user && chown -R user:user /home/user/app | |
USER user | |
# نسخ الملفات المطلوبة | |
COPY --chown=user:user requirements.txt ./ | |
# تثبيت حزم Python | |
RUN pip install --no-cache-dir --upgrade pip \ | |
&& pip install --no-cache-dir -r requirements.txt | |
# نسخ باقي الملفات | |
COPY --chown=user:user . . | |
# تشغيل التطبيق | |
CMD ["python", "app.py"] |