← 返回 Skills 市场
mlesnews

Homelab Cluster Management

作者 mlesnews · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
976
总下载
2
收藏
4
当前安装
1
版本数
在 OpenClaw 中安装
/install homelab-cluster
功能描述
Manage multi-tier AI inference clusters for homelabs. Health monitoring, expert MoE routing, automatic node recovery, and model deployment across Ollama and llama.cpp nodes. Covers GPU memory planning, Docker volume strategies for large models, sequential startup patterns to avoid CUDA deadlocks, and unified API gateways via LiteLLM.
使用说明 (SKILL.md)

\r \r

Homelab Cluster Management\r

\r Manage a compound AI compute cluster spanning multiple tiers of GPU and CPU inference nodes.\r Built and battle-tested by Lumina Homelab.\r \r

When to Use\r

\r Use this skill when your agent needs to:\r

  • Monitor health of distributed model endpoints\r
  • Route inference requests to the best available model\r
  • Recover downed nodes automatically\r
  • Plan GPU memory allocation across models\r
  • Deploy models across heterogeneous hardware\r \r

Architecture Pattern\r

\r A homelab cluster typically spans 2-3 tiers:\r \r | Tier | Typical Hardware | Runtime | Role |\r |------|-----------------|---------|------|\r | Local | Primary GPU (RTX 4090/5090) | Ollama | Fast inference, embeddings |\r | Remote | Secondary GPU (RTX 3090/4090) | llama.cpp or Ollama | Distributed inference |\r | NAS/CPU | Synology, RPi, any CPU node | Ollama | Lightweight models, fallback |\r \r A LiteLLM proxy sits in front, providing a unified OpenAI-compatible API across all tiers.\r \r

Health Monitoring\r

\r Check all endpoints with configurable per-endpoint timeouts:\r \r

# Define endpoints with tier labels\r
ENDPOINTS = {\r
    "local/ollama": {"url": "http://localhost:11434/api/tags", "tier": "LOCAL"},\r
    "remote/mark-i": {"url": "http://REMOTE_IP:3009/v1/models", "tier": "REMOTE", "timeout": 8},\r
    "gateway/litellm": {"url": "http://localhost:8080/health/liveliness", "tier": "GATEWAY"},\r
}\r
\r
# For each endpoint: GET with timeout, check HTTP 200\r
# Classify: HEALTHY / DEGRADED / DOWN per tier\r
# Overall prognosis based on tier health\r
```\r
\r
**Key lesson:** Use `/health/liveliness` for LiteLLM, not `/health` — the latter probes all model routes and hangs if any are unreachable.\r
\r
## Expert MoE Routing\r
\r
Route requests to the optimal model based on task classification:\r
\r
```\r
Task Categories:\r
  code     → Coder model (Qwen2.5-Coder-7B or similar)\r
  reason   → Reasoning model (DeepSeek-R1-Distill or similar)\r
  chat     → General model (Qwen2.5-14B or similar)\r
  vision   → Vision model (Qwen2.5-VL or similar)\r
  fast     → Smallest available model for quick responses\r
  embed    → Embedding model (nomic-embed-text or similar)\r
\r
Router logic:\r
  1. Classify task from prompt\r
  2. Check health of preferred model\r
  3. Fallback to next-best if unavailable\r
  4. Return model endpoint + metadata\r
```\r
\r
## Docker Deployment (llama.cpp on Remote Nodes)\r
\r
### Critical: Use Docker Volumes, Not Bind Mounts\r
\r
For models larger than ~1.5GB on Windows Docker hosts:\r
\r
```bash\r
# Create a Docker volume for model storage\r
docker volume create models-vol\r
\r
# Copy models INTO the volume\r
docker run --rm -v models-vol:/models -v /host/path:/src alpine cp /src/model.gguf /models/\r
\r
# Run container FROM volume (not bind mount)\r
docker run -d --gpus all -v models-vol:/models -p 3009:8000 \\r
  -e MODEL_PATH=/models/model.gguf your-llamacpp-image\r
```\r
\r
**Why:** Windows bind mounts use gRPC-FUSE/9P bridge which hangs during GPU tensor loading for large files. Docker volumes use native Linux ext4 and bypass this entirely.\r
\r
### Sequential Container Startup\r
\r
Never start multiple GPU containers simultaneously:\r
\r
```bash\r
# WRONG — causes CUDA initialization deadlock\r
docker start mark-i mark-iii mark-iv mark-vi &\r
\r
# RIGHT — sequential with health check between each\r
for container in mark-v mark-iii mark-iv mark-vi mark-i; do\r
  docker restart $container\r
  sleep 5\r
  # Verify health before starting next\r
  curl -s http://localhost:PORT/v1/models || echo "Warning: $container slow to start"\r
done\r
```\r
\r
### GPU Memory Planning\r
\r
Plan your model lineup to fit within VRAM:\r
\r
```\r
Example for 24GB GPU:\r
  14B model (Q4_K_M)  →  9.0 GB, 28 GPU layers\r
  7B coder            →  4.4 GB, full GPU\r
  8B reasoning        →  4.6 GB, full GPU\r
  1.5B fast coder     →  1.1 GB, full GPU\r
  1.7B fast chat      →  1.0 GB, full GPU\r
  ─────────────────────────────\r
  Total:               20.1 GB (~84% utilized)\r
\r
  Remaining: CPU-only containers for 32B+ models\r
```\r
\r
## Automatic Node Recovery\r
\r
When a remote node goes down (Docker Desktop crash, reboot, etc.):\r
\r
```\r
Recovery sequence:\r
  1. Health check fails for remote tier\r
  2. Check if SSH is responsive (node is up but Docker is down)\r
  3. If SSH works: restart Docker Desktop via SSH\r
  4. If SSH fails: create RDP session to wake the machine\r
  5. Wait for Docker + sequential container restart\r
  6. Re-check health\r
```\r
\r
**Important:** Never store recovery credentials in plaintext. Use a vault (Azure Key Vault, HashiCorp Vault, etc.) and pipe secrets through stdin, never as CLI arguments.\r
\r
## LiteLLM Gateway Configuration\r
\r
Unified API across all tiers:\r
\r
```yaml\r
model_list:\r
  # Local Ollama models\r
  - model_name: local/chat\r
    litellm_params:\r
      model: ollama/qwen2.5:32b\r
      api_base: http://localhost:11434\r
\r
  # Remote llama.cpp models (need openai/ prefix)\r
  - model_name: remote/mark-i\r
    litellm_params:\r
      model: openai/qwen2.5-14b-instruct\r
      api_base: http://REMOTE_IP:3009/v1\r
      api_key: "not-needed"\r
\r
  # NAS Ollama models\r
  - model_name: nas/coder\r
    litellm_params:\r
      model: ollama/qwen2.5-coder:7b\r
      api_base: http://NAS_IP:11434\r
```\r
\r
**Key:** llama.cpp endpoints need the `openai/` prefix in model name and `/v1` in api_base for LiteLLM compatibility.\r
\r
## Links\r
\r
- **Lumina Homelab:** [luminahomelab.ai](https://luminahomelab.ai)\r
- **X/Twitter:** [@HK47LUMINA](https://x.com/HK47LUMINA)\r
- **GitHub:** [mlesnews](https://github.com/mlesnews)\r
安全使用建议
This skill appears to be coherent for homelab cluster management, but it expects the agent (or the operator) to run network and system commands (docker, curl, ssh, RDP) and to supply remote credentials or vault access at runtime even though none are declared. Before installing or enabling it: - Verify provenance (source is 'unknown' and there's no homepage). Consider running in an isolated test environment first. - Do not provide long-lived credentials directly to the skill; use a secrets vault as recommended and prefer short-lived credentials. - Require explicit human confirmation before the agent performs SSH/RDP, restarts Docker, or copies model files — those actions can be disruptive. - Audit the full, untruncated SKILL.md to confirm there are no instructions that run arbitrary downloaded code or call unknown external endpoints. - If you allow autonomous runs, restrict the agent's network and credential scope (least privilege) and log all actions so you can review recovery operations and container restarts. If you want, provide the full SKILL.md (it was truncated in the package) and any provenance or author contact so I can re-check for missing or risky instructions.
功能分析
Type: OpenClaw Skill Name: homelab-cluster Version: 1.0.0 The skill instructs the OpenClaw agent to perform high-privilege remote system management actions, specifically 'restart Docker Desktop via SSH' and 'create RDP session to wake the machine' for automatic node recovery, as detailed in SKILL.md. These instructions imply the agent will handle credentials and execute commands on remote systems, which are inherently risky capabilities. While presented as part of a legitimate 'homelab-cluster' management function, granting an AI agent such remote execution and credential management powers creates a significant attack surface, making it suspicious due to the potential for abuse if the agent or its environment were compromised.
能力评估
Purpose & Capability
The SKILL.md content (health checks, routing, Docker advice, SSH/RDP recovery, LiteLLM config) matches the stated 'Homelab Cluster Management' purpose. However, the skill declares no required binaries or environment variables while its instructions explicitly use docker, curl, ssh, RDP, and external vaults — a mild inconsistency: the runtime expects system/network tools and credentials even though none are listed in metadata.
Instruction Scope
The instructions remain within cluster-management scope: endpoint health checks, model routing logic, Docker volume strategies, sequential container startups, GPU memory planning, and recovery procedures. They instruct connecting to remote hosts (SSH/RDP) and operating Docker and HTTP endpoints, which is expected for this purpose. There is no obvious instruction to collect unrelated system data or to exfiltrate secrets, though the agent will be asked to handle sensitive credentials if used.
Install Mechanism
This is an instruction-only skill with no install spec and no code files, which is low-risk from an installation perspective (nothing is written to disk by the skill package itself).
Credentials
The skill requests no declared environment variables or credentials, but the guidance assumes use of SSH/RDP credentials and external vaults (Azure/HashiCorp) and references API keys in LiteLLM config snippets. It's reasonable for a management skill to require such credentials at runtime, but the metadata does not document them — users should not supply secrets implicitly without clear prompts and should prefer a vault-backed workflow as the doc suggests.
Persistence & Privilege
always:false (default) and autonomous invocation enabled (also default). The skill does not request permanent 'always' presence or attempt to modify other skills/config. No persistence or escalation behaviors are declared.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install homelab-cluster
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /homelab-cluster 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release: health monitoring, MoE routing, Docker volume patterns, GPU memory planning, sequential startup, node recovery, LiteLLM gateway config
元数据
Slug homelab-cluster
版本 1.0.0
许可证
累计安装 4
当前安装数 4
历史版本数 1
常见问题

Homelab Cluster Management 是什么?

Manage multi-tier AI inference clusters for homelabs. Health monitoring, expert MoE routing, automatic node recovery, and model deployment across Ollama and llama.cpp nodes. Covers GPU memory planning, Docker volume strategies for large models, sequential startup patterns to avoid CUDA deadlocks, and unified API gateways via LiteLLM. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 976 次。

如何安装 Homelab Cluster Management?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install homelab-cluster」即可一键安装,无需额外配置。

Homelab Cluster Management 是免费的吗?

是的,Homelab Cluster Management 完全免费(开源免费),可自由下载、安装和使用。

Homelab Cluster Management 支持哪些平台?

Homelab Cluster Management 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Homelab Cluster Management?

由 mlesnews(@mlesnews)开发并维护,当前版本 v1.0.0。

💬 留言讨论