← 返回 Skills 市场
wbavon

Install Stack Flagos

作者 Flagos · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
78
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install install-stack-flagos
功能描述
Install the 5-package multi-chip software stack (vLLM, FlagTree, FlagGems, FlagCX, vllm-plugin-FL) inside a GPU container. Handles network mirror detection,...
使用说明 (SKILL.md)

Install Multi-Chip Software Stack

Install 5 packages inside a running GPU container, in dependency order, with per-package validation and structured error reporting.

Skill Components

install-stack/
├── SKILL.md                           # This file — execution flow
├── scripts/
│   ├── detect_network.py              # Probe GitHub/PyPI, return mirror config (JSON)
│   ├── collect_env_info.py            # Python/glibc/arch/vendor/disk info (JSON)
│   ├── select_flagtree_wheel.py       # Match vendor+python+glibc → wheel specifier (JSON)
│   └── validate_packages.py           # Import-test all 5 packages, report status (JSON)
└── references/
    ├── vendor-mappings.md             # FlagCX make flags, adaptor names, dependency chain
    └── network-mirrors.md             # GitHub/PyPI mirror config rules

Prerequisites

  • A running Docker container with PyTorch + GPU access (from /gpu-container-setup)
  • Know the container name and GPU vendor

If invoked standalone, ask the user for container name and GPU vendor. If invoked from /flagrelease orchestrator, these are passed as context.

Execution Flow

Step 0: Resolve Container & Vendor

Verify the container is running:

docker inspect --format='{{.State.Status}}' \x3CCONTAINER> | grep -q running

Copy and run scripts/collect_env_info.py inside the container to get vendor, Python version, glibc version, architecture, and free disk space:

docker cp \x3CSKILL_DIR>/scripts/collect_env_info.py \x3CCONTAINER>:/tmp/
docker exec \x3CCONTAINER> python3 /tmp/collect_env_info.py

If vendor is unknown and user didn't provide --vendor, ask the user.

Step 1: Detect Network Environment

Copy and run scripts/detect_network.py inside the container:

docker cp \x3CSKILL_DIR>/scripts/detect_network.py \x3CCONTAINER>:/tmp/
docker exec \x3CCONTAINER> python3 /tmp/detect_network.py

Parse the JSON output to get GITHUB_PREFIX and PIP_INDEX for all subsequent commands. See references/network-mirrors.md for fallback rules.

Step 2: Check Disk Space

From collect_env_info.py output, verify at least 10GB free. If not, warn user and ask whether to proceed.

Step 3: Install Packages (in dependency order)

See references/vendor-mappings.md for dependency chain and install order: vLLM → FlagTree → FlagGems → FlagCX → vllm-plugin-FL


3.1: vLLM 0.13.0

docker exec \x3CCONTAINER> pip install ${PIP_INDEX} vllm==0.13.0

Quick validate:

docker exec \x3CCONTAINER> python3 -c "import vllm; assert vllm.__version__ == '0.13.0'"

GATE: If vLLM install fails → record error and EXIT the skill.


3.2: FlagTree (pre-compiled wheel)

Run scripts/select_flagtree_wheel.py to find the correct wheel:

python3 \x3CSKILL_DIR>/scripts/select_flagtree_wheel.py \
    --vendor \x3CVENDOR> --python \x3CPY_VER> --glibc \x3CGLIBC_VER>

If status is FOUND, uninstall stock triton and install the wheel:

docker exec \x3CCONTAINER> bash -c '
python3 -m pip uninstall -y triton
python3 -m pip uninstall -y triton
python3 -m pip install \x3CSPECIFIER> \x3CPIP_ARGS>
'

If status is NOT_FOUND, record the mismatch and continue (do not exit).


3.3: FlagGems

docker exec \x3CCONTAINER> bash -c "
cd /tmp && git clone ${GITHUB_PREFIX}/FlagOpen/FlagGems
cd FlagGems && pip install ${PIP_INDEX} -e .
"

Failure → record and continue.


3.4: FlagCX (two-phase build)

Read references/vendor-mappings.md to look up the correct Make flag and FLAGCX_ADAPTOR for the detected vendor.

Phase 1: Build C++ library:

docker exec \x3CCONTAINER> bash -c "
cd /tmp && git clone ${GITHUB_PREFIX}/flagos-ai/FlagCX
cd FlagCX && git submodule update --init --recursive
make \x3CMAKE_FLAG> -j\$(nproc)
"

Phase 2: Install PyTorch plugin:

docker exec \x3CCONTAINER> bash -c "
cd /tmp/FlagCX/plugin/torch
FLAGCX_ADAPTOR=\x3CADAPTOR> pip install -e . --no-build-isolation
"

Failure → record and continue.


3.5: vllm-plugin-FL

docker exec \x3CCONTAINER> bash -c "
cd /tmp && git clone ${GITHUB_PREFIX}/flagos-ai/vllm-plugin-FL
cd vllm-plugin-FL
pip install ${PIP_INDEX} -r requirements.txt
pip install --no-build-isolation -e .
"

On Iluvatar, if requirements.txt fails, retry with requirements_iluvatar.txt.

GATE: If vllm-plugin-FL fails → record error and EXIT the skill.


Step 4: Validate All Packages

Copy and run scripts/validate_packages.py inside the container:

docker cp \x3CSKILL_DIR>/scripts/validate_packages.py \x3CCONTAINER>:/tmp/
docker exec \x3CCONTAINER> python3 /tmp/validate_packages.py

This produces a comprehensive JSON report of all 5 packages with import status, versions, and gate check.

Step 5: Set Runtime Environment

If FlagCX installed successfully, persist FLAGCX_PATH:

docker exec \x3CCONTAINER> bash -c "echo 'export FLAGCX_PATH=/tmp/FlagCX' >> ~/.bashrc"

Step 6: Produce Final Report

Combine all results into structured output:

{
  "status": "PASS | PARTIAL | FAIL",
  "stage": "install-stack",
  "container": "\x3Cname>",
  "vendor": "\x3Cvendor>",
  "network": {"github_mirror": true, "pypi_mirror": true},
  "python_version": "3.11",
  "glibc_version": "2.34",
  "packages": {
    "vllm": {"status": "PASS", "version": "0.13.0"},
    "flagtree": {"status": "PASS", "version": "0.4.1+ascend3.2"},
    "flaggems": {"status": "PASS", "version": "..."},
    "flagcx": {"status": "PASS", "version": "0.10.0"},
    "vllm_plugin_fl": {"status": "PASS", "version": "..."}
  },
  "flagcx_path": "/tmp/FlagCX",
  "gate_passed": true,
  "errors": []
}

Status logic:

  • PASS — all 5 packages installed and validated
  • PARTIAL — vLLM + plugin installed, some of FlagTree/FlagGems/FlagCX failed
  • FAIL — vLLM or plugin failed (gate failed)

Error Handling

Failure Behavior
Container not running Report error, exit
Network unreachable (both direct and mirror) Report, exit
pip install fails Report package, full error, continue (unless gate)
Build from source fails Report compiler error, continue
No matching FlagTree wheel Report vendor/python/glibc mismatch, continue
Import fails after install Report traceback, continue
Disk space \x3C 10GB Warn user, ask whether to proceed
Timeout (any command) All commands use timeout; report which step

Timeout Rules

Operation Timeout
pip install (per package) 300s
git clone 120s
make (FlagCX) 300s
Network probe 5s
Validation (import) 30s
安全使用建议
Treat this as an incomplete review result: the command sandbox failed with `bwrap: loopback: Failed RTM_NEWADDR: Operation not permitted`, so the skill should be re-scanned in an environment where `metadata.json` and `artifact/` can be inspected.
能力评估
Purpose & Capability
Not assessable from artifact content because file inspection failed before any workspace files could be read.
Instruction Scope
Not assessable from artifact content because file inspection failed before any workspace files could be read.
Install Mechanism
Not assessable from artifact content because file inspection failed before any workspace files could be read.
Credentials
Not assessable from artifact content because file inspection failed before any workspace files could be read.
Persistence & Privilege
Not assessable from artifact content because file inspection failed before any workspace files could be read.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install install-stack-flagos
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /install-stack-flagos 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release: install-stack-flagos 1.0.0 installs a 5-package multi-chip software stack (vLLM, FlagTree, FlagGems, FlagCX, vllm-plugin-FL) in a running GPU container. - Handles network mirror detection, disk space verification, package dependency ordering, wheel selection for FlagTree, per-package validation, and structured error reporting. - Includes detailed execution flow, timeout rules for each step, and user prompts for required inputs if context is missing. - Produces a comprehensive final JSON report with install status for each package and overall outcome. - Supports partial installation (with gating on critical failures), and logs errors for troubleshooting.
元数据
Slug install-stack-flagos
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Install Stack Flagos 是什么?

Install the 5-package multi-chip software stack (vLLM, FlagTree, FlagGems, FlagCX, vllm-plugin-FL) inside a GPU container. Handles network mirror detection,... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 78 次。

如何安装 Install Stack Flagos?

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

Install Stack Flagos 是免费的吗?

是的,Install Stack Flagos 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Install Stack Flagos 支持哪些平台?

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

谁开发了 Install Stack Flagos?

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

💬 留言讨论