Spaces:
Build error
Build error
Update Dockerfile
Browse files- Dockerfile +9 -7
Dockerfile
CHANGED
|
@@ -7,17 +7,19 @@ ENV HOME=/home/user \
|
|
| 7 |
|
| 8 |
WORKDIR $HOME/app
|
| 9 |
|
|
|
|
| 10 |
USER root
|
| 11 |
-
RUN apt-get update && apt-get install -y
|
| 12 |
-
gcc g++ make cmake git wget \
|
| 13 |
-
&& rm -rf /var/lib/apt/lists/*
|
| 14 |
USER user
|
| 15 |
|
| 16 |
-
#
|
| 17 |
-
RUN pip install --no-cache-dir
|
|
|
|
|
|
|
| 18 |
|
| 19 |
-
|
| 20 |
-
|
|
|
|
| 21 |
RUN huggingface-cli download tensorblock/llama3.2-1b-Uncensored-GGUF \
|
| 22 |
llama3.2-1b-Uncensored-Q4_K_M.gguf \
|
| 23 |
--local-dir . --local-dir-use-symlinks False
|
|
|
|
| 7 |
|
| 8 |
WORKDIR $HOME/app
|
| 9 |
|
| 10 |
+
# Install only wget and essential libs (skipping heavy build tools like cmake)
|
| 11 |
USER root
|
| 12 |
+
RUN apt-get update && apt-get install -y wget libopenblas-dev && rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
| 13 |
USER user
|
| 14 |
|
| 15 |
+
# USE PRE-COMPILED WHEELS: This skips the "Building Wheel" stage entirely
|
| 16 |
+
RUN pip install --no-cache-dir \
|
| 17 |
+
--extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu \
|
| 18 |
+
llama-cpp-python
|
| 19 |
|
| 20 |
+
RUN pip install --no-cache-dir huggingface_hub gradio
|
| 21 |
+
|
| 22 |
+
# Download the GGUF model directly
|
| 23 |
RUN huggingface-cli download tensorblock/llama3.2-1b-Uncensored-GGUF \
|
| 24 |
llama3.2-1b-Uncensored-Q4_K_M.gguf \
|
| 25 |
--local-dir . --local-dir-use-symlinks False
|