Spaces:
No application file
No application file
| # Basis-Image mit Python 3.9 (slim für reduzierte Größe) | |
| FROM python:3.9-slim | |
| # Arbeitsverzeichnis erstellen | |
| WORKDIR /app | |
| # Zuerst nur requirements.txt kopieren (für Caching-Optimierung) | |
| COPY requirements.txt . | |
| # Abhängigkeiten installieren | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Restliche Dateien kopieren | |
| COPY . . | |
| # Port freigeben (für Hugging Face Spaces obligatorisch) | |
| EXPOSE 7860 | |
| # FastAPI starten (mit 0.0.0.0 für externe Zugriffe) | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |