Spaces:
Sleeping
Sleeping
| FROM python:3.14 | |
| ENV DEBIAN_FRONTEND=noninteractive \ | |
| PYTHONUNBUFFERED=1 | |
| WORKDIR /app | |
| # Minimal tools to download the wheel | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| ca-certificates \ | |
| curl \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy requirements (do NOT include llama-cpp-python here; it's installed separately) | |
| COPY requirements.txt /app/requirements.txt | |
| RUN apt-get update && apt-get install -y libgomp1 | |
| # Download the prebuilt wheel and install it, then install other Python deps | |
| RUN mkdir -p /wheels && \ | |
| curl -L -o /wheels/llama_cpp_python-0.3.16-cp314-cp314-linux_x86_64.whl \ | |
| "https://github.com/Ishka12345/llama-cpp-python-3.11/releases/download/v1.1.0/llama_cpp_python-0.3.16-cp314-cp314-linux_x86_64.whl" && \ | |
| pip install --upgrade pip setuptools wheel && \ | |
| pip install --no-cache-dir /wheels/llama_cpp_python-0.3.16-cp314-cp314-linux_x86_64.whl && \ | |
| pip install --no-cache-dir -r /app/requirements.txt | |
| # Copy app sources last to keep previous layers cacheable | |
| COPY app.py /app/app.py | |
| EXPOSE 7860 7861 | |
| CMD ["python", "app.py"] | |