paper-decoder / start.sh
aleks-gotsa's picture
fix: build on llama.cpp ubuntu24 base, resolves glibc mismatch
849e756
Raw
History Blame Contribute Delete
529 Bytes
#!/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