sayshara's picture
Serve base Nemotron 3 Nano without LoRA
7f28039 verified
Raw
History Blame Contribute Delete
737 Bytes
#!/bin/sh
set -eu
MODEL_PATH="${MODEL_PATH:-/models/NVIDIA-Nemotron-3-Nano-4B-BF16.Q4_K_M.gguf}"
PORT="${PORT:-7860}"
CTX_SIZE="${CTX_SIZE:-2048}"
N_GPU_LAYERS="${N_GPU_LAYERS:-0}"
SERVER_BIN="/app/llama-server"
if [ ! -x "$SERVER_BIN" ]; then
SERVER_BIN="$(command -v llama-server || true)"
fi
if [ -z "$SERVER_BIN" ]; then
echo "Could not find llama-server" >&2
find / -name llama-server -type f 2>/dev/null | head >&2 || true
exit 1
fi
if [ ! -f "$MODEL_PATH" ]; then
echo "Model not found at $MODEL_PATH" >&2
ls -lah /models || true
exit 1
fi
echo "Starting llama.cpp server with $MODEL_PATH"
exec "$SERVER_BIN" \
-m "$MODEL_PATH" \
--host 0.0.0.0 \
--port "$PORT" \
-c "$CTX_SIZE" \
-ngl "$N_GPU_LAYERS"