solarkyle commited on
Commit
4a635b8
·
verified ·
1 Parent(s): e3f8341

Deploy PixelLock GPU Space (llama.cpp + GGUF + GBNF + custom UI)

Browse files
Files changed (1) hide show
  1. start.sh +10 -8
start.sh CHANGED
@@ -7,14 +7,16 @@ set -uo pipefail
7
 
8
  MODEL_PATH="${MODEL_PATH:-/home/user/app/model.gguf}"
9
 
10
- # Locate the llama-server binary (path differs across base images).
11
- LLAMA_BIN="$(command -v llama-server || true)"
12
- if [ -z "$LLAMA_BIN" ]; then
13
- for p in /app/llama-server /llama-server /usr/local/bin/llama-server /usr/bin/llama-server; do
14
- [ -x "$p" ] && LLAMA_BIN="$p" && break
15
- done
16
- fi
17
- echo "[start] using llama-server at: ${LLAMA_BIN:-NOT FOUND}"
 
 
18
 
19
  serve() { # $1 = context window
20
  echo "[start] llama-server -c $1 loading ${MODEL_PATH}"
 
7
 
8
  MODEL_PATH="${MODEL_PATH:-/home/user/app/model.gguf}"
9
 
10
+ # The base image ships llama-server in /app alongside its shared libs
11
+ # (libllama-server-impl.so, libggml*.so). Its RPATH is relative to the binary, so
12
+ # we MUST run the real /app path (not a symlink) and point the loader at /app.
13
+ export LD_LIBRARY_PATH="/app:${LD_LIBRARY_PATH:-}"
14
+ LLAMA_BIN=""
15
+ for p in /app/llama-server /llama-server /usr/local/bin/llama-server /usr/bin/llama-server; do
16
+ [ -x "$p" ] && LLAMA_BIN="$p" && break
17
+ done
18
+ [ -z "$LLAMA_BIN" ] && LLAMA_BIN="$(command -v llama-server || true)"
19
+ echo "[start] using llama-server at: ${LLAMA_BIN:-NOT FOUND} (LD_LIBRARY_PATH=$LD_LIBRARY_PATH)"
20
 
21
  serve() { # $1 = context window
22
  echo "[start] llama-server -c $1 loading ${MODEL_PATH}"