Dav66 commited on
Commit
098e673
·
verified ·
1 Parent(s): ce9238c

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +26 -0
Dockerfile ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim-bookworm
2
+
3
+ # تثبيت التبعيات النظامية
4
+ RUN apt-get update && apt-get install -y \
5
+ gcc g++ make cmake git libopenblas-dev \
6
+ && rm -rf /var/lib/apt/lists/*
7
+
8
+ WORKDIR /app
9
+
10
+ # تثبيت llama-cpp-python من wheel جاهز (أحدث إصدار مُحسّن لـ HF Spaces - 0.3.22)
11
+ RUN pip install --no-cache-dir \
12
+ huggingface_hub \
13
+ gradio==6.11.0 \
14
+ && pip install --no-cache-dir \
15
+ 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
16
+
17
+ # نسخ التطبيق
18
+ COPY app.py .
19
+
20
+ # Persistent Storage
21
+ ENV HF_HOME=/data/hf_cache
22
+ ENV HF_HUB_CACHE=/data/hf_cache
23
+
24
+ EXPOSE 7860
25
+
26
+ CMD ["python", "app.py"]