Update Dockerfile
Browse files- Dockerfile +11 -6
Dockerfile
CHANGED
|
@@ -1,15 +1,20 @@
|
|
| 1 |
# Use the official Hugging Face Spaces GPU image
|
| 2 |
FROM huggingface/zero-gpu-gradio:latest
|
| 3 |
|
| 4 |
-
#
|
| 5 |
-
ENV CMAKE_ARGS="-DGGML_CUDA=on"
|
| 6 |
-
ENV FORCE_CMAKE=1
|
| 7 |
-
|
| 8 |
-
# Install the Python dependencies (this triggers the llama-cpp-python CUDA build)
|
| 9 |
COPY requirements.txt /tmp/requirements.txt
|
| 10 |
RUN pip install --no-cache-dir -r /tmp/requirements.txt
|
| 11 |
|
| 12 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
COPY app.py /home/user/app/app.py
|
| 14 |
|
| 15 |
CMD ["python", "app.py"]
|
|
|
|
| 1 |
# Use the official Hugging Face Spaces GPU image
|
| 2 |
FROM huggingface/zero-gpu-gradio:latest
|
| 3 |
|
| 4 |
+
# --- Install Python dependencies ---
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
COPY requirements.txt /tmp/requirements.txt
|
| 6 |
RUN pip install --no-cache-dir -r /tmp/requirements.txt
|
| 7 |
|
| 8 |
+
# --- Install llama-cpp-python with CUDA 12.4 prebuilt wheel ---
|
| 9 |
+
# (prebuilt.sh never runs when a custom Dockerfile exists,
|
| 10 |
+
# so we install it here in the Docker build step instead)
|
| 11 |
+
RUN pip install --no-cache-dir llama-cpp-python \
|
| 12 |
+
--extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cu124
|
| 13 |
+
|
| 14 |
+
# --- File parsers ---
|
| 15 |
+
RUN pip install --no-cache-dir python-docx pdfplumber chardet
|
| 16 |
+
|
| 17 |
+
# --- Copy app ---
|
| 18 |
COPY app.py /home/user/app/app.py
|
| 19 |
|
| 20 |
CMD ["python", "app.py"]
|