File size: 594 Bytes
acaad06
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Verwende ein offizielles Python-Image als Basis
FROM python:3.10-slim-bullseye

# Setze das Arbeitsverzeichnis im Container
WORKDIR /app

# Kopiere die requirements.txt in das Arbeitsverzeichnis
COPY requirements.txt .

# Installiere die Python-Abhängigkeiten
RUN pip install --no-cache-dir --upgrade -r requirements.txt

# Kopiere den Rest deiner Anwendungsdateien (app.py, etc.) in das Arbeitsverzeichnis
COPY . .

# Exponiere den Port, auf dem Uvicorn lauschen wird
EXPOSE 7860

# Starte die FastAPI-Anwendung mit Uvicorn
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]