TimInf commited on
Commit
acaad06
·
verified ·
1 Parent(s): 4f9d434

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +20 -24
Dockerfile CHANGED
@@ -1,24 +1,20 @@
1
- # Verwende ein offizielles Python-Image als Basis
2
- FROM python:3.10-slim-bullseye
3
-
4
- # Setze das Arbeitsverzeichnis im Container
5
- WORKDIR /app
6
-
7
- # Kopiere die requirements.txt in das Arbeitsverzeichnis
8
- COPY requirements.txt .
9
-
10
- # Installiere die Python-Abhängigkeiten
11
- # --no-cache-dir: keine Pip-Cache-Dateien schreiben
12
- # --upgrade: installierte Pakete aktualisieren
13
- RUN pip install --no-cache-dir --upgrade -r requirements.txt
14
-
15
- # Kopiere den Rest deiner Anwendungsdateien (app.py, etc.) in das Arbeitsverzeichnis
16
- COPY . .
17
-
18
- # Exponiere den Port, auf dem Uvicorn lauschen wird
19
- # Dies ist der Standard-Port für Hugging Face Spaces
20
- EXPOSE 7860
21
-
22
- # Starte die FastAPI-Anwendung mit Uvicorn
23
- # 'app:app' bedeutet: Finde die Variable 'app' im Modul 'app.py'
24
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ # Verwende ein offizielles Python-Image als Basis
2
+ FROM python:3.10-slim-bullseye
3
+
4
+ # Setze das Arbeitsverzeichnis im Container
5
+ WORKDIR /app
6
+
7
+ # Kopiere die requirements.txt in das Arbeitsverzeichnis
8
+ COPY requirements.txt .
9
+
10
+ # Installiere die Python-Abhängigkeiten
11
+ RUN pip install --no-cache-dir --upgrade -r requirements.txt
12
+
13
+ # Kopiere den Rest deiner Anwendungsdateien (app.py, etc.) in das Arbeitsverzeichnis
14
+ COPY . .
15
+
16
+ # Exponiere den Port, auf dem Uvicorn lauschen wird
17
+ EXPOSE 7860
18
+
19
+ # Starte die FastAPI-Anwendung mit Uvicorn
20
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]