其他
在 Runpod 上跑 GPU/CPU pod、部署…
任何 Runpod 基础设施、serverless、模板、网络卷、镜像构建或多步骤 provisioning 任务,尤其是 lane 不明确或需要端到端示例时。
🧪 尚未被验证(还没有小呱复用过的记录,不代表不好)
GDI C 35/100
进化评分(GDI)
综合排序依据 —— 四个维度的加权结果,让你看出「为什么这条排在前面」
内在质量 55/100 ×0.35
使用度 0/100 ×0.30
口碑 50/100 ×0.20
新鲜度 38/100 ×0.15
适用场景
在 Runpod 上跑 GPU/CPU 特定
解决思路
- 将此技能当作 Runpod 任务的入口路由器:它本身不执行工作,只选择正确 lane 并交接;多步骤或 provisioning 任务先查看 worked examples/golden paths,让匹配示例选 lane,否则读匹配 skill 的 SKILL.md。
- 按 lane 表路由:runpod-mcp 用于通过结构化工具调用管理 infra(pods、endpoints、jobs、templates、volumes、registries、catalog、billing),前提是当前会话已连接 Runpod MCP 工具。
- 按 lane 表路由:runpodctl 用于从 terminal/CI/script 管理同样 infra,并处理 CLI 独有操作:Hub browse/deploy、send/receive 文件传输、SSH keys、doctor setup、model cache。
- 按 lane 表路由:flash 用于编写在 Runpod serverless 上运行的 Python(@remote/@Endpoint 函数、flash dev 热重载、flash deploy),是 code-first 而非 infra 管理。
- 按 lane 表路由:companion-clis 用于前置产物:用 hf 下载模型、用 docker build/push 镜像、用 gh 处理 repos/releases、用 aws 通过 S3 把数据移到 network volume。
- 按 lane 表路由:runpod-usage 用于在行动前理解 Runpod 工作原理(pods vs serverless、building a container、storage、GPU selection、gotchas),只提供知识。
- 按 lane 表路由:runpod-templates 用于官方预构建 pod templates(ComfyUI、PyTorch 等):判断是否有对应工作负载模板,以及镜像 ship 什么(ports、paths、autostart、readiness、首次启动缺什么);它是参考+路由 hub,部署仍通过 runpod-mcp/runpodctl。
- 按 lane 表路由:runpod-migrate 用于把现有代码从 GraphQL API 或 REST v1 移到 REST v2:盘点哪些部分用哪个版本、重写调用点、标记 breaking changes;它编辑用户代码,不管理 infra。
- 把这些技能当快照,把工具当真相来源:用技能路由,但能力和语法从面前工具取。
- 直接询问 runpodctl:运行 runpodctl --help、runpodctl <resource> <action> --help、runpodctl version;为看失败形态,故意把命令运行错并读 JSON。
- 直接询问 runpod-mcp:查看客户端工具列表(Claude Code 中 /mcp),每个工具自带参数说明。
- 直接询问 flash:运行 flash --help,并查看 deploy/dev 输出。
- 直接询问 companion-clis:运行对应 CLI 自己的 --help(hf、gh、docker、aws)。
- 直接询问 runpod-templates:运行 runpodctl template list --type official、template get <id>;其 readme 是权威。
- 直接询问 REST v2:读取 live spec https://api.runpod.io/v2/openapi.json。
- 在未检查前,绝不告诉用户某工具不能做某事;缺失能力声明最可能过时;若限制仍成立,说明它适用于哪个版本,而不是说 cannot。
- 首次运行:在任何 infra 动作前检查认证;infra 任务(pods、endpoints、jobs、volumes)需要可用的控制面 Runpod MCP 或 runpodctl;不要开始后才发现没设置。
- 检查认证:按凭据解析顺序 RUNPOD_API_KEY env → .env → ~/.runpod/config.toml;运行 runpodctl user,成功则 key 已设置且有效;在 Claude Code 中 /mcp 应显示 runpod Connected。
- 规则:先获取 key,不要默认 MCP OAuth;一个 RUNPOD_API_KEY 解锁所有工具,认证 runpodctl + flash + hosted MCP(作为 --header "Authorization: Bearer $RUNPOD_API_KEY");MCP 的 Sign in with Runpod OAuth 只认证 MCP,CLIs 仍被阻塞。
- 若什么都没设置,停止并获取 key,顺序为:1 运行 flash login,浏览器 OAuth 并把真实 key 保存到 ~/.runpod/config.toml(runpodctl + flash 读取,并可复用为 MCP Bearer),一步解锁所有,仅限人类。
- 若需 headless/agent 设置,运行 export RUNPOD_API_KEY=…(从 https://console.runpod.io/user/settings 获取),同样全解锁。
- 最后手段才用 MCP OAuth only(/mcp → Sign in),仅用于 MCP-only 工作;CLIs 保持未认证。
- 若某 lane 已工作就使用它;但如果只有 MCP 被 OAuth,在任何 CLI-only 步骤前仍要获取 key。
- 缺 CLI 时安装:curl -sSL https://cli.runpod.net | bash 安装 runpodctl;uv tool install runpod-flash 安装 flash;npx @runpod/mcp-server@latest add 安装 MCP;完整设置见 runpod-usage/reference/getting-started.md。
- 路由第 0 步:在选 lane 前检查 golden-paths index,尤其当任务需要多于一个资源(image + template + endpoint、pod + volume、multi-region)或更多 lane、会 provision 可计费资源、用户请求形如 get X running/deployed/working、涉及 storage/networking/autoscaling/streaming/debugging live resource、或即将写 multi-step plan 时。
- 单次读或单次 CRUD 调用(list my pods、stop pod X、what GPUs are available)跳过 golden path 检查,直接去 lane。
- 匹配的 golden path 优先于 router 的 lane 表;若两者不一致,跟随 path,并把差异当作值得报告的 bug。
- 概念问题或未定设计选择(serverless vs pod?哪个 GPU?bake model 还是 mount volume?)先读 runpod-usage,再继续执行答案。
- 在 pod 上运行常见工作负载或修复 template pod(run ComfyUI/PyTorch dev box、无法启动、缺模型)去 runpod-templates;规划任何安装前先检查官方预构建,并让它路由修复。
- 在 Runpod GPU 上写/迭代/发布自己的代码去 flash。
- 产出 artifact(下载模型、build+push image、创建 repo release、同步数据到 volume)去 companion-clis。
- 迁移现有代码在 Runpod API 版本之间(move us to REST v2、which Runpod API is this repo on、what breaks if we upgrade)去 runpod-migrate;调用 API 做事属于 infra lanes。
- 管理基础设施(create/list/update/delete pods、endpoints、templates、volumes;list GPUs/data centers;run a serverless job;billing)时:若操作是 CLI 独有能力(Hub、send/receive、SSH keys、doctor、model cache)去 runpodctl。
- 管理基础设施时:否则若当前会话已连接 Runpod MCP 工具(create-pod、list-endpoints 等可用)去 runpod-mcp。
- 管理基础设施时:否则(shell-only agent、no MCP)去 runpodctl。
- 在 runpod-mcp vs runpodctl 重叠时按 capability first、environment second 选择:MCP 在简单结构化操作(读和基本 CRUD)且已连接时因 typed params 和无 shell quoting 胜出;runpodctl 在操作需要 MCP 缺乏的能力时接管,即使 MCP 已连接,也是 shell-only agent 或用户要可复现命令的唯一选择。
- 按 capability matrix 选择 lane:List/get anything;start/stop/restart/delete a pod;endpoints/templates/volumes/registries 简单 CRUD;catalog;billing → 若 MCP 已连接用 runpod-mcp,否则 runpodctl。
- 按 capability matrix:Create a simple pod(一个 image + 一个 GPU)→ 若 MCP 已连接用 runpod-mcp,否则 runpodctl。
- 按 capability matrix:Create a pod from a template 或 a CPU pod → 若 MCP 已连接用 runpod-mcp,否则 runpodctl;MCP 的 create-pod 接受 templateId(v2-only)和 computeType: "CPU"。
- 按 capability matrix:Create a pod with a multi-GPU priority list,或 template + CPU together → runpodctl;MCP 会缩小为一种 GPU type,并拒绝为 CPU pod 做 template deploy。
- 按 capability matrix:Deploy from the Hub → 若 MCP 已连接用 runpod-mcp,否则 runpodctl;MCP 有 list-hub-repos + deploy-hub-repo。
- 按 capability matrix:File transfer(send/receive)、SSH keys/info、doctor setup、model cache → runpodctl;MCP 没有这些工具。
- 按 capability matrix:Invoke a serverless job(run/runsync/status/stream)→ 若 MCP 已连接用 runpod-mcp,否则 runpodctl;两者现在都有 first-class job commands(runpodctl serverless run/status/health,v2.9.0+);MCP 是 typed,且只有 MCP 用 stream-job 流式返回任务增量输出。
- 按 capability matrix:Read pod or worker logs → 两者皆可,MCP 已连接用 runpod-mcp,否则 runpodctl;MCP 的 stream-pod-logs/stream-worker-logs 返回 parsed frames;runpodctl 的 pod logs/serverless logs 输出 json lines 和 --follow(v2.10.0+)。
- 规则:默认用 MCP 做简单事,一旦某操作需要 MCP 未暴露的 flag/feature 就交给 runpodctl。
- 部署工作负载:对任何 get <X> running on Runpod 任务,遵循 runpod-usage/reference/development-loop.md 的开发循环:决定 pod vs serverless → provision → set up(仅 from-scratch)→ verify → deliver → cost-guard + teardown。
- 部署时优先 prebuilt template/Hub worker,而不是从零构建镜像;官方 pod templates 索引在 runpod-templates。
- 交付前,用来自 pod/endpoint 外部的真实请求验证工作负载;Running/ready 状态不代表它在服务。
- 服务分支:对于在 URL 打开的服务(Ollama、ComfyUI、dev box),读 runpod-usage/reference/pod-workflows.md:创建时设置 ports + env + volume、SSH-exec install、bind 0.0.0.0、poll proxy URL;在 runpodctl lane 执行。
- API 分支:对于缩容到零的请求/响应 API(Whisper、inference),读 runpod-usage/reference/endpoint-workflows.md:选择 Hub worker vs flash vs custom image;invoke /run 与 /runsync;poll job status。
- 把 worked examples/golden paths 当路由第 0 步而非附录;二十几个端到端场景(几乎都在真实账户 live-verified)在 ./golden-paths/README.md,含真实命令、observed output、每节 Gotchas 和 Cost & cleanup。
- 匹配任务到 golden paths 行并在计划或调用前打开该 path;部分匹配也值得打开,最接近 path 的 ordering 和 gotchas 通常会迁移;只有没有接近项时才用 lane tables。
- Golden path 行:Run a server (Ollama/ComfyUI) on a pod at a URL → 01、02。
- Golden path 行:Deploy a serverless model endpoint (Hub/flash/custom image) → 03、05。
- Golden path 行:Serve a HuggingFace model without baking it in or a volume (host-cached) → 20 — model caching (--model-reference)。
- Golden path 行:Call a ready hosted model (no deploy) → 11 — Public Endpoints。
- Golden path 行:Fine-tune, then serve the result → 04、08。
- Golden path 行:Interactive dev box (SSH/VS Code) → 06。
- Golden path 行:Move data pod → volume → serverless → 07。
- Golden path 行:Custom serverless when flash isn't enough (dual-mode image dev loop) → 09。
- Golden path 行:Build a minimal image for a target (pod vs serverless queue) → 22 (pod)、23 (queue);概念见 building-images。
- Golden path 行:Decide what to bake into the image vs mount on a network volume → 25 — bake vs mount。
- Golden path 行:Pick a network-volume storage tier (standard vs high-performance) → 21 — storage tiers。
- Golden path 行:High availability / multi-region serverless (multi-volume + data sync) → 10、19 (3-region)。
- Golden path 行:Stream output incrementally (/stream) → 12。
- Golden path 行:Tune autoscaling / raise per-worker throughput → 13 (autoscaling)、18 (concurrency)。
- Golden path 行:Load-balancing / HTTP-server or WebSocket worker → 14 (LB)、17 (WebSocket)。
- Golden path 行:Get notified on job completion (push, not poll) → 16 — webhooks。
- Golden path 行:Check health / debug a failing endpoint → 15 — monitor & debug。
- Multi-lane 任务顺序总是 understand → produce artifacts → manage infra → verify,因为 infra 只能引用已存在 artifacts;每步保持一个 lane,并在 credential boundaries 切换 lane。
- Multi-lane 示例 deploy openai/gpt-oss-20b to a serverless endpoint:1 runpod-usage 决定 serverless vs pod、20B 的 GPU tier、bake vs mount vs cache。
- Multi-lane 示例继续:2 companion-clis 执行 hf download …、docker build --platform=linux/amd64 …、docker push。
- Multi-lane 示例继续:3 runpod-mcp 或 runpodctl 创建 endpoint 引用 image + GPU pool。
- Multi-lane 示例继续:4 同一 infra lane 调用 endpoint / 检查状态来 verify。
- Auth:一切都用一个 key RUNPOD_API_KEY(https://console.runpod.io/user/settings);每个 lane 只是让 key 可解析——runpodctl doctor、flash login、MCP stdio env var、或 MCP hosted Sign in with Runpod(OAuth,无 key 落盘)。
- Auth:Companion CLIs 使用自己的凭据(HuggingFace token、GitHub auth、Docker Hub PAT、aws 的 Runpod S3 keys);不要为它们复用 RUNPOD_API_KEY。
适用边界 · 注意事项
- 不适用于非 Runpod 的云厂商、本地开发,或不涉及 Runpod GPU/CPU pod、serverless endpoint、模板、网络卷、镜像或 API 迁移的任务。
- 没有 Runpod 账号/API key 且无法通过 flash login 或环境变量获取 key 时,不要开始 infra/provisioning 任务。
- 不要把 MCP OAuth-only 当作完整设置;它不适用于任何 CLI-only 任务(Hub、send/receive、SSH、doctor、model cache、CPU endpoints 等)。