knoxel's picture
Upload start.sh
3092fb9 verified
raw
history blame
659 Bytes
#!/bin/bash
set -e
MODEL_PATH="/home/user/app/models/bitnet-b1.58-2B-4T-gguf/ggml-model-i2_s.gguf"
SERVER_BIN="/home/user/app/bin/llama-server"
# Start llama-server in background
echo "Starting bitnet.cpp llama-server..."
$SERVER_BIN \
-m "$MODEL_PATH" \
--host 127.0.0.1 \
--port 8080 \
-t 2 \
-c 4096 \
--log-disable &
SERVER_PID=$!
# Wait for server to be ready
echo "Waiting for server to start..."
for i in $(seq 1 60); do
if curl -s http://127.0.0.1:8080/health > /dev/null 2>&1; then
echo "Server ready!"
break
fi
sleep 1
done
# Start Gradio app
echo "Starting Gradio app..."
exec python app.py