FROM python:3.10-slim-bookworm # تثبيت التبعيات النظامية RUN apt-get update && apt-get install -y \ gcc g++ make cmake git libopenblas-dev \ && rm -rf /var/lib/apt/lists/* WORKDIR /app # تثبيت llama-cpp-python من wheel جاهز (أحدث إصدار مُحسّن لـ HF Spaces - 0.3.22) RUN pip install --no-cache-dir \ huggingface_hub \ gradio==6.11.0 \ && pip install --no-cache-dir \ https://huggingface.co/Luigi/llama-cpp-python-wheels-hf-spaces-free-cpu/resolve/main/llama_cpp_python-0.3.22-cp310-cp310-linux_x86_64.whl # نسخ التطبيق COPY app.py . # Persistent Storage ENV HF_HOME=/data/hf_cache ENV HF_HUB_CACHE=/data/hf_cache EXPOSE 7860 CMD ["python", "app.py"]