YemenEdu commited on
Commit
2c772f1
·
verified ·
1 Parent(s): cf8f928

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -3
Dockerfile CHANGED
@@ -2,18 +2,23 @@ FROM python:3.10-slim
2
 
3
  WORKDIR /app
4
 
 
5
  RUN apt-get update && apt-get install -y \
6
  build-essential \
7
  python3-dev \
8
  wget \
 
9
  && rm -rf /var/lib/apt/lists/*
10
 
 
 
 
 
 
 
11
  COPY requirements.txt .
12
  RUN pip install --no-cache-dir -r requirements.txt
13
 
14
- ENV CMAKE_ARGS="-DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS"
15
- ENV FORCE_CMAKE=1
16
-
17
  COPY . .
18
 
19
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
2
 
3
  WORKDIR /app
4
 
5
+ # تثبيت الأدوات الأساسية
6
  RUN apt-get update && apt-get install -y \
7
  build-essential \
8
  python3-dev \
9
  wget \
10
+ libopenblas-dev \
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
+ # --- السر هنا: تثبيت المحرك الجاهز بدلاً من بنائه من الصفر ---
14
+ # هذا سيوفر علينا ساعات من الانتظار والفشل
15
+ RUN pip install --no-cache-dir \
16
+ 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
17
+
18
+ # تثبيت باقي المكتبات
19
  COPY requirements.txt .
20
  RUN pip install --no-cache-dir -r requirements.txt
21
 
 
 
 
22
  COPY . .
23
 
24
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]