| FROM python:3.10-slim | |
| # System-Tools für den Betrieb | |
| RUN apt-get update && apt-get install -y \ | |
| libopenblas-dev \ | |
| ninja-build \ | |
| build-essential \ | |
| pkg-config \ | |
| curl \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /code | |
| # Installiere llama-cpp-python OHNE Kompilieren (Pre-built für CPU) | |
| RUN pip install --no-cache-dir \ | |
| --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu \ | |
| llama-cpp-python | |
| # Restliche Pakete | |
| RUN pip install --no-cache-dir gradio huggingface_hub | |
| COPY app.py . | |
| # Port für HF Spaces | |
| EXPOSE 7860 | |
| CMD ["python", "app.py"] |