we2app commited on
Commit
e1e0de4
·
verified ·
1 Parent(s): af6b038

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -7
Dockerfile CHANGED
@@ -4,7 +4,7 @@
4
  # To change models, edit models.txt — nothing else.
5
  FROM ghcr.io/ggml-org/llama.cpp:server
6
 
7
- RUN apt-get update && apt-get install -y --no-install-recommends wget ca-certificates \
8
  && rm -rf /var/lib/apt/lists/*
9
 
10
  RUN mkdir -p /models /usr/local/bin
@@ -13,16 +13,19 @@ RUN mkdir -p /models /usr/local/bin
13
  COPY models.txt /models.txt
14
  COPY scripts/fetch-models.sh scripts/generate-preset.sh scripts/entrypoint.sh /usr/local/bin/
15
  RUN chmod +x /usr/local/bin/fetch-models.sh /usr/local/bin/generate-preset.sh /usr/local/bin/entrypoint.sh \
16
- && sed -i 's/\r$//' /usr/local/bin/*.sh \
17
- && fetch-models.sh \
18
- && generate-preset.sh \
19
- && echo "--- /models.ini ---" && cat /models.ini \
20
- && echo "--- /models ---" && ls -lh /models
21
-
22
  ENV MODELS_DIR=/models \
23
  MODELS_TXT=/models.txt \
24
  PRESET_OUTPUT=/models.ini
25
 
 
 
 
 
 
 
 
 
26
  ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
27
 
28
  # --- START SERVER IN ROUTER MODE WITH CORS, TOOLS & MCP ENABLED ---
 
4
  # To change models, edit models.txt — nothing else.
5
  FROM ghcr.io/ggml-org/llama.cpp:server
6
 
7
+ RUN apt-get update && apt-get install -y --no-install-recommends bash wget ca-certificates \
8
  && rm -rf /var/lib/apt/lists/*
9
 
10
  RUN mkdir -p /models /usr/local/bin
 
13
  COPY models.txt /models.txt
14
  COPY scripts/fetch-models.sh scripts/generate-preset.sh scripts/entrypoint.sh /usr/local/bin/
15
  RUN chmod +x /usr/local/bin/fetch-models.sh /usr/local/bin/generate-preset.sh /usr/local/bin/entrypoint.sh \
16
+ && sed -i 's/\r$//' /usr/local/bin/*.sh
 
 
 
 
 
17
  ENV MODELS_DIR=/models \
18
  MODELS_TXT=/models.txt \
19
  PRESET_OUTPUT=/models.ini
20
 
21
+ # Download everything in models.txt and auto-generate the router preset.
22
+ # NOTE: absolute paths are required here — the base image WORKDIR is not
23
+ # the repo root, so the scripts' relative-path defaults would not resolve.
24
+ RUN /usr/local/bin/fetch-models.sh /models.txt \
25
+ && /usr/local/bin/generate-preset.sh /models.txt /models.ini
26
+ RUN echo "--- /models.ini ---" && cat /models.ini \
27
+ && echo "--- /models ---" && ls -lh /models
28
+
29
  ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
30
 
31
  # --- START SERVER IN ROUTER MODE WITH CORS, TOOLS & MCP ENABLED ---