Chuyển đến nội dung
Skillpedia
Triển khai và đám mây (DevOps)18k · #10577

qzcli

Skill này làm gì

Skill này quản lý các công việc huấn luyện GPU trên nền tảng Qizhi, một dịch vụ tính toán đám mây, bằng một công cụ dòng lệnh. Dành cho nhà nghiên cứu chạy công việc trên nền tảng đó.

Khi nào nên dùng

  • ✓Khi bạn muốn gửi, dừng hoặc liệt kê công việc GPU trên nền tảng Qizhi.
  • ✓Khi bạn cần gửi nhiều công việc huấn luyện cùng lúc như một lô.
  • ✓Khi bạn muốn kiểm tra nhóm tính toán nào đang có trên Qizhi.

Liên kết skill

https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep/blob/main/skills/qzcli/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep/blob/main/skills/qzcli/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Tôi cần gửi một công việc huấn luyện trên Qizhi và kiểm tra nhóm tính toán nào đang rảnh.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent dùng công cụ qzcli với cài đặt đăng nhập đã lưu của bạn để gửi, liệt kê hoặc dừng công việc. Thông tin xác thực được đọc từ biến môi trường hoặc tệp cài đặt, không gõ vào cuộc trò chuyện.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

qzcli — 启智平台任务管理

A kubectl/docker-style CLI for managing GPU compute jobs on the Qizhi (启智) platform.

GitHub: tianyilt/qzcli_tool

Environment contract

Qizhi is the scheduler-cluster shape of ../shared-references/compute-env-contract.md: images are built OFF-platform and referenced at submit time, so the declarative env spec + env:<name>@<specHash> ledger (.aris/compute/qizhi.md) is what keeps "which image has which stack" answerable. Run the kernel witness inside a submitted job (not on the login side) before trusting an image for a long run.

Installation

pip install rich requests prompt_toolkit mcp
git clone https://github.com/tianyilt/qzcli_tool
cd qzcli_tool && pip install -e .

MCP Integration (optional)

To use qzcli as an MCP tool directly from Claude Code or Codex:

# Claude Code
claude mcp add qzcli -- qzcli-mcp

# Codex
codex mcp add qzcli -- qzcli-mcp

Configuration

Credentials are read in this priority order: CLI args > --password-stdin > env vars > QZCLI_ENV_FILE (.env) > ~/.qzcli/config.json > interactive input

# Option A: env file (recommended)
mkdir -p ~/.qzcli
cat > ~/.qzcli/.env <<'EOF'
QZCLI_USERNAME="your_username"
QZCLI_PASSWORD="your_password"
EOF

# Option B: environment variables
export QZCLI_USERNAME="your_username"
export QZCLI_PASSWORD="your_password"
export QZCLI_API_URL="https://qz.yourorg.edu.cn"

Config files are stored in ~/.qzcli/: config.json, .cookie, resources.json, jobs.json.


Quick Start

# 1. Login
qzcli login

# 2. Discover and cache workspaces/compute groups (run once, re-run after joining new workspaces)
qzcli res -u

# 3. Check available nodes
qzcli avail

# 4. List running jobs
qzcli ls -c -r

Authentication

# Interactive login
qzcli login

# With credentials
qzcli login -u YOUR_USERNAME -p 'YOUR_PASSWORD'

# Read password from stdin (for scripts)
echo 'YOUR_PASSWORD' | qzcli login -u YOUR_USERNAME --password-stdin

# Check current cookie
qzcli cookie --show

# Clear cookie
qzcli cookie --clear

Note: qzcli avail auto-refreshes the cookie if it expires and credentials are configured.


Resource Discovery

# List cached workspaces
qzcli res --list

# Refresh all workspace resource cache (run this first!)
qzcli res -u

# Refresh a specific workspace
qzcli res -w MY_WORKSPACE -u

# Set a human-readable alias for a workspace
qzcli res -w ws-xxxxxxxx --name "My Workspace"

Check Available Nodes

# All workspaces
qzcli avail

# Including low-priority task nodes (slower but more accurate)
qzcli avail --lp

# Specific workspace
qzcli avail -w MY_WORKSPACE

# Find compute groups with N free nodes
qzcli avail -n 4

# Export IDs for scripting
qzcli avail -n 4 -e

# Show idle node names
qzcli avail -w MY_WORKSPACE -v

Job Submission

Interactive (recommended for first-time use)

# Full interactive selection: workspace → project → compute group → spec
qzcli create -i

# Interactive for a specific workspace only
qzcli create -i -w "My Workspace"

The TUI shows GPU type, availability, and spec status at each level. Press Enter/→ to go deeper, ← to go back.

Non-interactive

# Using names (resolved from qzcli res cache)
qzcli create \
  --name "my-training-job" \
  --command "bash /path/to/train.sh" \
  --workspace "My Workspace" \
  --compute-group "My Compute Group" \
  --image YOUR_REGISTRY/team/image:tag \
  --instances 4 \
  --priority 10

# Using IDs directly
qzcli create \
  --name "my-job" \
  --command "bash /path/to/train.sh" \
  --workspace ws-YOUR_WORKSPACE_ID \
  --compute-group lcg-YOUR_LCG_ID \
  --spec YOUR_SPEC_ID \
  --image YOUR_REGISTRY/team/image:tag \
  --instances 4

Key parameters:

Parameter Default Description
--name / -n required Job name
--command / -c required Command to run
--workspace / -w Workspace name or ID (ws-...)
--compute-group / -g auto Compute group name or ID (lcg-...)
--spec / -s auto Resource spec ID
--image / -m Docker image
--instances 1 Number of instances
--shm 1200 Shared memory (GiB)
--priority 10 Priority (1–10)
--dry-run Preview only, don't submit
--json JSON output for scripting
# Preview before submittin
Câu hỏi thường gặp

Tôi có cần tài khoản Qizhi không?

Có. Công cụ đăng nhập bằng tên người dùng và mật khẩu Qizhi của bạn, lưu trong tệp cài đặt hoặc biến môi trường.

Tôi cài đặt nó thế nào?

Skill đưa hướng dẫn cài bằng pip và bản sao GitHub của công cụ qzcli.

Agent có thể dùng nó như một công cụ không?

Có. Skill có thiết lập MCP tùy chọn cho Claude Code và Codex.

Chi tiết

Mô tả gốc của tác giả

Manage GPU compute jobs on the Qizhi (启智) platform using qzcli — a kubectl-style CLI tool. Use when user says "qzcli", "启智平台", "submit job", "stop job", "查计算组", "avail", "list jobs", "batch submit", or needs to manage distributed training jobs on a Qizhi instance.

repo: wanshuiyin/Auto-claude-code-research-in-sleep

Độ phổ biến

Sao GitHub
18k
Vị trí xếp hạng
#10577
Giấy phép
MIT
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự