Add minimal installer for low-resource servers.

Made-with: Cursor
This commit is contained in:
Andrey Lutsenko
2026-04-20 23:00:07 +10:00
parent 4c652c7431
commit 84f1d82033
3 changed files with 104 additions and 0 deletions
+16
View File
@@ -36,6 +36,22 @@ chmod +x install.sh
./install.sh --docs-dir /path/to/my/docs
```
## Минимальный bootstrap (без RAG-стека)
Если нужен только OpenClaude + локальная модель (без Docker/Qdrant):
```bash
chmod +x install-minimal.sh
./install-minimal.sh
```
Опции:
```bash
./install-minimal.sh --model qwen2.5:3b
./install-minimal.sh --skip-model-pull
```
## Переменные окружения
- `QDRANT_URL` (default `http://127.0.0.1:6333`)
+80
View File
@@ -0,0 +1,80 @@
#!/usr/bin/env bash
set -euo pipefail
# Minimal bootstrap for Ubuntu:
# - installs OpenClaude + Ollama
# - pulls one local model
# - does not install Docker/Qdrant/RAG stack
#
# Usage:
# ./install-minimal.sh
# ./install-minimal.sh --model qwen2.5:3b
# ./install-minimal.sh --skip-model-pull
MODEL="${MODEL:-qwen2.5-coder:7b}"
SKIP_MODEL_PULL=0
while [[ $# -gt 0 ]]; do
case "$1" in
--model)
MODEL="$2"
shift 2
;;
--skip-model-pull)
SKIP_MODEL_PULL=1
shift
;;
*)
echo "Unknown argument: $1"
exit 2
;;
esac
done
need_cmd() {
command -v "$1" >/dev/null 2>&1 || {
echo "Missing command: $1"
exit 1
}
}
echo "==> Installing base packages"
sudo apt update
sudo apt install -y curl git
echo "==> Installing Ollama if needed"
if ! command -v ollama >/dev/null 2>&1; then
curl -fsSL https://ollama.com/install.sh | sh
fi
sudo systemctl enable ollama
sudo systemctl start ollama
echo "==> Checking Ollama API"
curl -fsS "http://127.0.0.1:11434/api/tags" >/dev/null || true
echo "==> Installing OpenClaude CLI"
if ! command -v openclaude >/dev/null 2>&1; then
need_cmd npm
npm install -g @gitlawb/openclaude
fi
if [[ "$SKIP_MODEL_PULL" -eq 0 ]]; then
echo "==> Pulling model: $MODEL"
ollama pull "$MODEL"
else
echo "==> Skipping model pull (--skip-model-pull)"
fi
cat <<EOF
Minimal bootstrap complete.
Run OpenClaude against local Ollama:
export CLAUDE_CODE_USE_OPENAI=1
export OPENAI_BASE_URL=http://127.0.0.1:11434/v1
export OPENAI_MODEL=$MODEL
openclaude
If the server is weak, try a smaller model:
./install-minimal.sh --model qwen2.5:3b
EOF