zapashwin commited on
Commit
5a2c866
·
verified ·
1 Parent(s): 051e462

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -6
Dockerfile CHANGED
@@ -2,14 +2,12 @@ FROM ghcr.io/ggml-org/llama.cpp:server
2
 
3
  USER root
4
 
5
- # Only install curl for the startup script, no heavy downloads during build
6
  RUN apt-get update && apt-get install -y --no-install-recommends \
7
- curl \
8
  && rm -rf /models \
9
  && mkdir -p /models \
10
  && chown -R 1000:1000 /models \
11
- && apt-get purge -y curl \
12
- && apt-get autoremove -y \
13
  && rm -rf /var/lib/apt/lists/*
14
 
15
  USER 1000
@@ -25,5 +23,5 @@ ENV LLAMA_ARG_BATCH_SIZE=256
25
  ENV LLAMA_ARG_UBATCH_SIZE=256
26
  ENV LLAMA_ARG_MLOCK=false
27
 
28
- # Download model on startup if it doesn't exist, then launch server
29
- ENTRYPOINT ["sh", "-c", "if [ ! -f /models/model.gguf ]; then echo 'Downloading model fresh...'; curl -L https://huggingface.co/unsloth/Llama-3.2-1B-Instruct-GGUF/resolve/main/Llama-3.2-1B-Instruct-Q4_K_M.gguf -o /models/model.gguf; fi && exec /app/llama-server"]
 
2
 
3
  USER root
4
 
5
+ # Install wget permanently for runtime downloading
6
  RUN apt-get update && apt-get install -y --no-install-recommends \
7
+ wget \
8
  && rm -rf /models \
9
  && mkdir -p /models \
10
  && chown -R 1000:1000 /models \
 
 
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
  USER 1000
 
23
  ENV LLAMA_ARG_UBATCH_SIZE=256
24
  ENV LLAMA_ARG_MLOCK=false
25
 
26
+ # Download model using wget on startup if missing, then launch server
27
+ ENTRYPOINT ["sh", "-c", "if [ ! -f /models/model.gguf ]; then echo 'Downloading model fresh with wget...'; wget -O /models/model.gguf https://huggingface.co/unsloth/Llama-3.2-1B-Instruct-GGUF/resolve/main/Llama-3.2-1B-Instruct-Q4_K_M.gguf; fi && exec /app/llama-server"]