| # Use the official Hugging Face Spaces GPU image | |
| FROM huggingface/zero-gpu-gradio:latest | |
| # --- Install Python dependencies --- | |
| COPY requirements.txt /tmp/requirements.txt | |
| RUN pip install --no-cache-dir -r /tmp/requirements.txt | |
| # --- Install llama-cpp-python with CUDA 12.4 prebuilt wheel --- | |
| # (prebuilt.sh never runs when a custom Dockerfile exists, | |
| # so we install it here in the Docker build step instead) | |
| RUN pip install --no-cache-dir llama-cpp-python \ | |
| --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cu124 | |
| # --- File parsers --- | |
| RUN pip install --no-cache-dir python-docx pdfplumber chardet | |
| # --- Copy app --- | |
| COPY app.py /home/user/app/app.py | |
| CMD ["python", "app.py"] |