Spaces:
Runtime error
Runtime error
| FROM python:3.11-slim | |
| WORKDIR /app | |
| # ββ System dependencies (C++ compiler only β no vision / audio tools needed) ββ | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| cmake \ | |
| git \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # ββ Compile llama-cpp-python CPU-only (AVX2/512 disabled β runs on any HF CPU) β | |
| RUN pip install --no-cache-dir -U pip && \ | |
| CMAKE_ARGS="-DGGML_BLAS=OFF -DGGML_CUDA=OFF -DGGML_METAL=OFF \ | |
| -DGGML_AVX2=OFF -DGGML_AVX512=OFF" \ | |
| FORCE_CMAKE=1 \ | |
| pip install --no-cache-dir --timeout=1800 llama-cpp-python==0.2.90 | |
| # ββ App dependencies βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| COPY requirements-hf.txt . | |
| RUN pip install --no-cache-dir -r requirements-hf.txt | |
| # ββ Copy application source ββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| COPY . . | |
| # ββ HF Spaces expects port 7860 βββββββββββββββββββββββββββββββββββββββββββββββ | |
| EXPOSE 7860 | |
| ENV PORT=7860 | |
| CMD ["python", "app.py"] | |