Download Dockerfile from LearnCreateRepeat/LCR_Moejra_Chatbot: direct link, hf CLI and curl.
- Browser
- Download file 880 Bytes
-
https://huggingface.co/spaces/LearnCreateRepeat/LCR_Moejra_Chatbot/resolve/refs%2Fpr%2F1/Dockerfile
- Command line
-
hf download hf://spaces/LearnCreateRepeat/LCR_Moejra_Chatbot@refs/pr/1/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/LearnCreateRepeat/LCR_Moejra_Chatbot/resolve/refs%2Fpr%2F1/Dockerfile
880 Bytes
| # Verwende offizielles Python-Basisimage mit Debian Buster | |
| FROM python:3.10-slim-buster | |
| # Systemabhängigkeiten installieren | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| libssl-dev \ | |
| libffi-dev \ | |
| python3-dev \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Arbeitsverzeichnis erstellen | |
| WORKDIR /app | |
| # Python-Abhängigkeiten zuerst kopieren und installieren (besseres Caching) | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Restliche Anwendung kopieren | |
| COPY . . | |
| # Umgebungsvariablen setzen | |
| ENV FLASK_APP=app.py | |
| ENV FLASK_ENV=production | |
| ENV GUNICORN_WORKERS=4 | |
| ENV GUNICORN_THREADS=2 | |
| ENV GUNICORN_TIMEOUT=120 | |
| # Port für Hugging Face Spaces freigeben | |
| EXPOSE 7860 | |
| # Startbefehl mit Gunicorn für Produktionsbetrieb | |
| CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--workers", "4", "--threads", "2", "--timeout", "120", "app:app"] | |