Xlnk commited on
Commit
6ea5e99
·
verified ·
1 Parent(s): 2e44ca0

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -8
Dockerfile CHANGED
@@ -3,7 +3,6 @@ FROM ubuntu:22.04
3
  ENV DEBIAN_FRONTEND=noninteractive
4
  WORKDIR /app
5
 
6
- # Dependencies
7
  RUN apt update && apt install -y \
8
  git \
9
  cmake \
@@ -12,24 +11,22 @@ RUN apt update && apt install -y \
12
  ca-certificates \
13
  && rm -rf /var/lib/apt/lists/*
14
 
15
- # Clone llama.cpp
16
  RUN git clone https://github.com/ggerganov/llama.cpp
17
 
18
- # Build llama-server (SINGLE THREAD – SAFE)
19
  RUN cmake -S llama.cpp -B llama.cpp/build \
20
  -DLLAMA_BUILD_SERVER=ON \
21
  -DCMAKE_BUILD_TYPE=Release \
22
  && cmake --build llama.cpp/build --target llama-server
23
- # ⚠️ no -j$(nproc)
24
 
25
- # Models
26
  RUN mkdir -p /models
27
 
28
- # TinyLlama 1.1B (recommended for HF CPU)
29
- RUN curl -L -o /models/model.gguf \
30
  https://huggingface.co/TheBloke/TinyLlama-1.1B-Chat-GGUF/resolve/main/tinyllama-1.1b-chat-q4_k_m.gguf
31
 
32
- # Start script
 
 
33
  COPY start.sh /start.sh
34
  RUN chmod +x /start.sh
35
 
 
3
  ENV DEBIAN_FRONTEND=noninteractive
4
  WORKDIR /app
5
 
 
6
  RUN apt update && apt install -y \
7
  git \
8
  cmake \
 
11
  ca-certificates \
12
  && rm -rf /var/lib/apt/lists/*
13
 
 
14
  RUN git clone https://github.com/ggerganov/llama.cpp
15
 
 
16
  RUN cmake -S llama.cpp -B llama.cpp/build \
17
  -DLLAMA_BUILD_SERVER=ON \
18
  -DCMAKE_BUILD_TYPE=Release \
19
  && cmake --build llama.cpp/build --target llama-server
 
20
 
 
21
  RUN mkdir -p /models
22
 
23
+ # CORRECT MODEL DOWNLOAD
24
+ RUN curl -L --fail -o /models/model.gguf \
25
  https://huggingface.co/TheBloke/TinyLlama-1.1B-Chat-GGUF/resolve/main/tinyllama-1.1b-chat-q4_k_m.gguf
26
 
27
+ # VERIFY GGUF
28
+ RUN head -c 4 /models/model.gguf | xxd
29
+
30
  COPY start.sh /start.sh
31
  RUN chmod +x /start.sh
32