#!/bin/bash set -e echo "=== Downloading model ===" MODEL_PATH=$(python3 -c " from huggingface_hub import hf_hub_download path = hf_hub_download( repo_id='Jackrong/Qwen3.5-9B-Claude-4.6-Opus-Reasoning-Distilled-v2-GGUF', filename='Qwen3.5-9B.Q4_K_M.gguf', ) print(path) ") echo "Model path: $MODEL_PATH" # Find llama-server and cd into its directory so it finds .so backends LLAMA_SERVER=$(find /opt/llama -name "llama-server" -type f | head -1) LLAMA_DIR=$(dirname "$LLAMA_SERVER") echo "llama-server dir: $LLAMA_DIR" echo "Files in dir:" ls -la "$LLAMA_DIR"/*.so* 2>/dev/null || echo "no .so files here" ls -la "$LLAMA_DIR"/../ 2>/dev/null echo "=== Starting llama-server on port 7860 ===" cd "$LLAMA_DIR" exec ./llama-server \ --model "$MODEL_PATH" \ --host 0.0.0.0 \ --port 7860 \ --ctx-size 2048 \ --threads 2 \ --batch-size 256