Update Dockerfile
Browse files- Dockerfile +19 -10
Dockerfile
CHANGED
|
@@ -1,17 +1,26 @@
|
|
| 1 |
-
FROM python:3.10
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
-
# Arbeitsverzeichnis erstellen
|
| 4 |
WORKDIR /code
|
| 5 |
|
| 6 |
-
#
|
| 7 |
-
RUN pip install --no-cache-dir
|
| 8 |
-
--
|
|
|
|
|
|
|
| 9 |
|
| 10 |
-
#
|
| 11 |
RUN pip install --no-cache-dir gradio huggingface_hub
|
| 12 |
|
| 13 |
-
#
|
| 14 |
-
COPY . .
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
-
#
|
| 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"]
|