FROM python:3.10-slim WORKDIR /app # تثبيت الأدوات الأساسية RUN apt-get update && apt-get install -y \ build-essential \ python3-dev \ wget \ libopenblas-dev \ && rm -rf /var/lib/apt/lists/* # --- السر هنا: تثبيت المحرك الجاهز بدلاً من بنائه من الصفر --- # هذا سيوفر علينا ساعات من الانتظار والفشل RUN 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 requirements.txt . RUN pip install --no-cache-dir -r requirements.txt COPY . . CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]