drdudddd commited on
Commit
9890d81
·
verified ·
1 Parent(s): d8f87ee

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +19 -10
Dockerfile CHANGED
@@ -1,17 +1,26 @@
1
- FROM python:3.10
 
 
 
 
 
2
 
3
- # Arbeitsverzeichnis erstellen
4
  WORKDIR /code
5
 
6
- # Abhängigkeiten für Llama-cpp (CPU-optimiert) installieren
7
- RUN pip install --no-cache-dir llama-cpp-python \
8
- --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
 
 
9
 
10
- # Restliche Tools installieren
11
  RUN pip install --no-cache-dir gradio huggingface_hub
12
 
13
- # Dateien kopieren
14
- COPY . .
 
 
 
15
 
16
- # Port für Hugging Face Spaces (7860)
17
- CMD ["python", "app.py"]
 
1
+ FROM python:3.10-slim
2
+
3
+ # System-Abhängigkeiten für Netzwerk und Python-Builds
4
+ RUN apt-get update && apt-get install -y \
5
+ curl \
6
+ && rm -rf /var/lib/apt/lists/*
7
 
 
8
  WORKDIR /code
9
 
10
+ # ERZWINGE PRE-BUILT WHEELS: Kein Kompilieren erlaubt!
11
+ RUN pip install --no-cache-dir \
12
+ --only-binary=:all: \
13
+ --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu \
14
+ llama-cpp-python
15
 
16
+ # Installiere den Rest (Gradio & Hub)
17
  RUN pip install --no-cache-dir gradio huggingface_hub
18
 
19
+ # Kopiere die app.py
20
+ COPY app.py .
21
+
22
+ # Exponiere den Port
23
+ EXPOSE 7860
24
 
25
+ # Start-Befehl
26
+ CMD ["python", "app.py"]