Tim Luka Horstmann
commited on
Commit
·
c6ab136
1
Parent(s):
c2b5e84
Fix
Browse files- Dockerfile +14 -10
Dockerfile
CHANGED
@@ -21,10 +21,11 @@ WORKDIR /app
|
|
21 |
RUN apt-get update && \
|
22 |
apt-get install -y --no-install-recommends \
|
23 |
build-essential cmake git curl wget ninja-build libgomp1 ca-certificates \
|
24 |
-
gcc g++ libffi-dev libopenblas-dev libstdc++6 libgcc-s1
|
25 |
-
|
26 |
-
|
27 |
-
rustup
|
|
|
28 |
|
29 |
# 5) Prepare directories
|
30 |
RUN mkdir -p /app/cache /app/pretrained_models/llm && \
|
@@ -45,7 +46,7 @@ RUN git clone --recursive https://github.com/abetlen/llama-cpp-python.git /tmp/l
|
|
45 |
# 8) Install huggingface_hub CLI
|
46 |
RUN pip install --no-cache-dir huggingface_hub
|
47 |
|
48 |
-
# 9) Clone llama.cpp
|
49 |
RUN git clone https://github.com/ggerganov/llama.cpp.git /tmp/llama.cpp && \
|
50 |
cd /tmp/llama.cpp && \
|
51 |
cmake -B build -DLLAMA_BUILD_QUANTIZE=ON . && \
|
@@ -55,11 +56,14 @@ RUN git clone https://github.com/ggerganov/llama.cpp.git /tmp/llama.cpp && \
|
|
55 |
RUN python3 - <<EOF
|
56 |
import os
|
57 |
from huggingface_hub import login, hf_hub_download
|
58 |
-
if os.getenv('HF_TOKEN'):
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
|
|
|
|
|
|
63 |
EOF
|
64 |
|
65 |
RUN /tmp/llama.cpp/build/quantize \
|
|
|
21 |
RUN apt-get update && \
|
22 |
apt-get install -y --no-install-recommends \
|
23 |
build-essential cmake git curl wget ninja-build libgomp1 ca-certificates \
|
24 |
+
gcc g++ libffi-dev libopenblas-dev libstdc++6 libgcc-s1 \
|
25 |
+
libcurl4-openssl-dev \ # ← add this
|
26 |
+
&& rm -rf /var/lib/apt/lists/* \
|
27 |
+
&& curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y \
|
28 |
+
&& rustup default stable
|
29 |
|
30 |
# 5) Prepare directories
|
31 |
RUN mkdir -p /app/cache /app/pretrained_models/llm && \
|
|
|
46 |
# 8) Install huggingface_hub CLI
|
47 |
RUN pip install --no-cache-dir huggingface_hub
|
48 |
|
49 |
+
# 9) Clone llama.cpp and build just the quantize tool
|
50 |
RUN git clone https://github.com/ggerganov/llama.cpp.git /tmp/llama.cpp && \
|
51 |
cd /tmp/llama.cpp && \
|
52 |
cmake -B build -DLLAMA_BUILD_QUANTIZE=ON . && \
|
|
|
56 |
RUN python3 - <<EOF
|
57 |
import os
|
58 |
from huggingface_hub import login, hf_hub_download
|
59 |
+
if os.getenv('HF_TOKEN'):
|
60 |
+
login(token=os.getenv('HF_TOKEN'))
|
61 |
+
hf_hub_download(
|
62 |
+
repo_id=os.getenv('MODEL_REPO'),
|
63 |
+
filename=os.getenv('MODEL_FILE'),
|
64 |
+
local_dir='/app/pretrained_models/llm',
|
65 |
+
token=os.getenv('HF_TOKEN')
|
66 |
+
)
|
67 |
EOF
|
68 |
|
69 |
RUN /tmp/llama.cpp/build/quantize \
|