drdudddd commited on
Commit
66a650d
·
verified ·
1 Parent(s): af1e264

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +20 -4
Dockerfile CHANGED
@@ -1,11 +1,27 @@
1
  FROM python:3.10-slim
2
 
 
 
 
 
 
 
 
 
 
3
  WORKDIR /code
4
 
5
- # Installiere nur die nötigsten Pakete
6
- # ctransformers ist die stabilere Alternative für GGUF auf CPUs
7
- RUN pip install --no-cache-dir gradio huggingface_hub ctransformers
 
 
 
 
 
 
8
 
9
- COPY . .
 
10
 
11
  CMD ["python", "app.py"]
 
1
  FROM python:3.10-slim
2
 
3
+ # System-Tools für den Betrieb
4
+ RUN apt-get update && apt-get install -y \
5
+ libopenblas-dev \
6
+ ninja-build \
7
+ build-essential \
8
+ pkg-config \
9
+ curl \
10
+ && rm -rf /var/lib/apt/lists/*
11
+
12
  WORKDIR /code
13
 
14
+ # Installiere llama-cpp-python OHNE Kompilieren (Pre-built für CPU)
15
+ RUN pip install --no-cache-dir \
16
+ --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu \
17
+ llama-cpp-python
18
+
19
+ # Restliche Pakete
20
+ RUN pip install --no-cache-dir gradio huggingface_hub
21
+
22
+ COPY app.py .
23
 
24
+ # Port für HF Spaces
25
+ EXPOSE 7860
26
 
27
  CMD ["python", "app.py"]