AhmadA82 commited on
Commit
559f5f5
·
verified ·
1 Parent(s): 43d5ed0
Files changed (1) hide show
  1. Dockerfile +7 -4
Dockerfile CHANGED
@@ -1,8 +1,8 @@
1
  FROM python:3.10-slim
2
 
3
- # تثبيت الأدوات الأساسية مع pkg-config
4
  RUN apt-get update && apt-get install -y \
5
- gcc g++ python3-dev libopenblas-dev cmake build-essential \
6
  libatlas-base-dev liblapack-dev libblas-dev pkg-config \
7
  && rm -rf /var/lib/apt/lists/*
8
 
@@ -21,10 +21,13 @@ ENV FORCE_CMAKE=1
21
  ENV CMAKE_ARGS="-DGGML_CUDA=off -DGGML_BLAS=ON -DGGML_BLAS_VENDOR=OpenBLAS"
22
 
23
  # تثبيت المتطلبات
 
24
  RUN pip install --upgrade pip
25
  RUN pip install --no-cache-dir -r requirements.txt
26
- RUN pip install --no-cache-dir llama-cpp-python==0.3.9
 
 
27
 
28
  USER user
29
 
30
- CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
  FROM python:3.10-slim
2
 
3
+ # إضافة git وحزم التطوير الضرورية
4
  RUN apt-get update && apt-get install -y \
5
+ git gcc g++ python3-dev libopenblas-dev cmake build-essential \
6
  libatlas-base-dev liblapack-dev libblas-dev pkg-config \
7
  && rm -rf /var/lib/apt/lists/*
8
 
 
21
  ENV CMAKE_ARGS="-DGGML_CUDA=off -DGGML_BLAS=ON -DGGML_BLAS_VENDOR=OpenBLAS"
22
 
23
  # تثبيت المتطلبات
24
+ RUN pip install --upgrade setuptools wheel
25
  RUN pip install --upgrade pip
26
  RUN pip install --no-cache-dir -r requirements.txt
27
+
28
+ # استخدام إصدار ثابت من llama-cpp-python
29
+ RUN pip install --no-cache-dir llama-cpp-python==0.2.77 # نفس الإصدار في requirements.txt
30
 
31
  USER user
32
 
33
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]