File size: 529 Bytes
fb462b5
 
 
 
 
 
 
 
 
 
849e756
fb462b5
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/env bash
set -euo pipefail

MODEL="$(find /opt/models -name '*.gguf' | head -n1)"
if [ -z "$MODEL" ]; then
  echo "FATAL: no .gguf found in /opt/models" >&2
  exit 1
fi
echo ">> starting llama-server with $MODEL"

/app/llama-server \
  -m "$MODEL" \
  --host 127.0.0.1 \
  --port 8081 \
  -c 4096 \
  -t "$(nproc)" \
  --jinja &

echo ">> waiting for llama-server health ..."
until curl -sf http://127.0.0.1:8081/health > /dev/null; do
  sleep 2
done
echo ">> llama-server is up, starting Gradio"

exec python3 app.py