跳到主内容
智客 ZICQ

技能库 智客分类:运维与云 runpod

Runpod

Cloud GPU 通过 RunPod 服务器处理. 用于设置 RunPod 端点, 部署 Docker 图像, 管理 GPU 资源, 排除端点问题, 或理解成本 。 覆盖了全部5个工具包图像(qwen-edit, realesrgan, propainter, sadtalker, qwen3-tts).

746 安装量

官方网址:skills.sh

技能介绍

先看中文介绍;官方 description 原文单独保留,不改写 SKILL.md。

做什么

通过 RunPod 无服务器进行 Cloud GPU 处理

何时用

设置 RunPod 端点, 部署 Docker 图像, 管理 GPU 资源, 解决端点问题, 或理解成本 。 覆盖所有5个工具包图像(qwen-edit, realesrgan, propainter, sadtalker, qwen3-tts)

代理如何加载

按 Agent Skills 渐进披露:启动时只加载 name 与 description(约 100 token);任务匹配后才读入整份 SKILL.md 正文;scripts/、references/、assets/ 仅在需要时再读。 本文件正文结构:RunPod Cloud GPU、Setup、1. Create account at https://runpod.io、2. Add API key to .env、3. Deploy any tool with --setup、Available Images。

文件分析

文件分析:这是一份仅含 SKILL.md 的指令型技能,代理激活后整份正文进入上下文。

官方 description(原文)

Cloud GPU processing via RunPod serverless. Use when setting up RunPod endpoints, deploying Docker images, managing GPU resources, troubleshooting endpoint issues, or understanding costs. Covers all 5 toolkit images (qwen-edit, realesrgan, propainter, sadtalker, qwen3-tts).

RunPod Cloud GPUSetup1. Create account at https://runpod.io2. Add API key to .env3. Deploy any tool with --setupAvailable ImagesHow It WorksEndpoint ManagementWorkersChecking Endpoint StatusDisabling an EndpointRunPod API Reference

来源分类:skills.sh agent-skill

SKILL.md 与 Agent 调用

官方规范 ↗
name
runpod
description
Cloud GPU processing via RunPod serverless. Use when setting up RunPod endpoints, deploying Docker images, managing GPU resources, troubleshooting endpoint issues, or understanding costs. Covers all 5 toolkit images (qwen-edit, realesrgan, propainter, sadtalker, qwen3-tts).
  1. 发现技能客户端向 Agent 提供名称与描述目录。
  2. 匹配与调用用户指定或任务匹配后,载入 SKILL.md 指令。
  3. 按需加载按步骤读取参考文档、使用脚本与素材。

具体调用语法与可用工具以目标 Agent 客户端为准。 查看调用机制说明 ↗

安装这个技能

Skills CLI ↗

先选择目标 Agent 和安装范围,保留技能包的附属文件,安装后检查客户端能否发现该技能。

交给 Agent 安装

复制安装指令给支持 Agent Skills 的代理,确认其中的目标目录与客户端匹配。

把 Agent Skill「runpod」安装到我的项目:SKILL.md 原文与官方 description 见 https://zicq.com/zh/skills/skl-abd1bdae25d90d38-%E8%BF%90%E8%A1%8C.html
请存为 .cursor/skills/runpod/SKILL.md 或 .claude/skills/runpod/SKILL.md,frontmatter 的 name 与 description 保持原样,不要改写。

GitHub 完整包 ↗

终端安装 · Skills CLI

需要 Node.js 与 npx。先查看仓库技能列表,确认实际名称。

npx skills add 'https://github.com/digitalsamba/claude-code-video-toolkit' --list

npx skills add 'https://github.com/digitalsamba/claude-code-video-toolkit' --skill 'runpod'

CLI 会交互选择目标 Agent,默认安装到项目;用户级安装使用 -g。先通过查看命令核对仓库内容,再用 npx skills list 检查已安装技能。

阅读排版
--- name: runpod description: Cloud GPU processing via RunPod serverless. Use when setting up RunPod endpoints, deploying Docker images, managing GPU resources, troubleshooting endpoint issues, or understanding costs. Covers all 5 toolkit images (qwen-edit, realesrgan, propainter, sadtalker, qwen3-tts). --- # RunPod Cloud GPU Run open-source AI models on cloud GPUs via RunPod serverless. Pay-per-second, no minimums. ## Setup ```bash # 1. Create account at https://runpod.io # 2. Add API key to .env echo "RUNPOD_API_KEY=your_key_here" >> .env # 3. Deploy any tool with --setup uv run tools/image_edit.py --setup uv run tools/upscale.py --setup uv run tools/dewatermark.py --setup uv run tools/sadtalker.py --setup uv run tools/qwen3_tts.py --setup ``` Each `--setup` command: 1. Creates a RunPod **template** from the Docker image 2. Creates a serverless **endpoint** with appropriate GPU 3. Saves the endpoint ID to `.env` (e.g. `RUNPOD_QWEN_EDIT_ENDPOINT_ID`) ## Available Images All images are public on GHCR — no authentication needed. | Tool | Docker Image | GPU | VRAM | Typical Cost | |------|-------------|-----|------|-------------| | image_edit | `ghcr.io/conalmullan/video-toolkit-qwen-edit:latest` | A6000/L40S | 48GB+ | ~$0.05-0.15/job | | upscale | `ghcr.io/conalmullan/video-toolkit-realesrgan:latest` | RTX 3090/4090 | 24GB | ~$0.01-0.05/job | | dewatermark | `ghcr.io/conalmullan/video-toolkit-propainter:latest` | RTX 3090/4090 | 24GB | ~$0.05-0.30/job | | sadtalker | `ghcr.io/conalmullan/video-toolkit-sadtalker:latest` | RTX 4090 | 24GB | ~$0.05-0.15/job | | qwen3_tts | `ghcr.io/conalmullan/video-toolkit-qwen3-tts:latest` | ADA 24GB | 24GB | ~$0.01-0.05/job | **Total monthly cost:** Rarely exceeds $10 even with heavy use. ## How It Works All tools follow the same pattern: ``` Local CLI → Upload input to cloud storage → RunPod API → Poll for result → Download output ``` 1. **File transfer:** Tools use Cloudflare R2 when configured (`R2_ACCOUNT_ID`, `R2_ACCESS_KEY_ID`, `R2_SECRET_ACCESS_KEY`, `R2_BUCKET_NAME`), falling back to free upload services 2. **RunPod API:** Tools call the `/run` endpoint, then poll `/status/{job_id}` until complete 3. **Cold vs warm start:** First request after idle spins up a worker (~30-90s). Subsequent requests are fast (~5-15s) ## Endpoint Management ### Workers ``` workersMin: 0 — Scale to zero when idle (no cost) workersMax: 1 — Max concurrent jobs (increase for throughput) idleTimeout: 5 — Seconds before worker scales down ``` Across all endpoints, you share a total worker pool based on your RunPod plan. If you hit limits, reduce `workersMax` on endpoints you're not actively using. ### Checking Endpoint Status Each tool stores its endpoint ID in `.env`: | Tool | Env Var | |------|---------| | image_edit | `RUNPOD_QWEN_EDIT_ENDPOINT_ID` | | upscale | `RUNPOD_UPSCALE_ENDPOINT_ID` | | dewatermark | `RUNPOD_DEWATERMARK_ENDPOINT_ID` | | sadtalker | `RUNPOD_SADTALKER_ENDPOINT_ID` | | qwen3_tts | `RUNPOD_QWEN3_TTS_ENDPOINT_ID` | ### Disabling an Endpoint To free worker slots without deleting the endpoint, set `workersMax=0` via the RunPod dashboard or GraphQL API. ## RunPod API Reference Use these to query and manage endpoints programmatically. RunPod disables GraphQL introspection, so these field names are verified and must be exact. ### Authentication All API calls require `Authorization: Bearer $RUNPOD_API_KEY`. - **GraphQL:** `POST https://api.runpod.io/graphql` - **REST (Serverless):** `https://api.runpod.ai/v2/{endpoint_id}/...` ### GraphQL Queries **List all endpoints:** ```graphql query { myself { endpoints { id name gpuIds templateId workersMax workersMin } } } ``` **Current spend rate:** ```graphql query { myself { currentSpendPerHr spendDetails { localStoragePerHour networkStoragePerHour gpuComputePerHour } } } ``` **List pods:** ```graphql query { myself { pods { id name runtime { uptimeInSeconds } machine { gpuDisplayName } desiredStatus } } } ``` > **Common mistakes:** Field names are camelCase with full words — `localStoragePerHour` not `localStoragePerHr`. Endpoints are `endpoints` not `serverlessWorkers`. `spending` is not a field — use `currentSpendPerHr` and `spendDetails`. ### GraphQL Mutations **Update endpoint GPU or config:** ```graphql mutation { saveEndpoint(input: { id: "endpoint_id", name: "endpoint-name", templateId: "template_id", gpuIds: "AMPERE_24", workersMin: 0, workersMax: 1 }) { id gpuIds } } ``` `saveEndpoint` requires `name` and `templateId` even for updates — query first to get current values. ### REST API (Serverless) | Action | Method | URL | |--------|--------|-----| | Submit job | POST | `/v2/{id}/run` | | Check status | GET | `/v2/{id}/status/{job_id}` | | Cancel job | POST | `/v2/{id}/cancel/{job_id}` | | List pending | GET | `/v2/{id}/requests` | | Health/stats | GET | `/v2/{id}/health` | **Health response** includes job counts and worker state: ```json { "jobs": { "completed": 16, "failed": 1, "inProgress": 0, "inQueue": 2, "retried": 0 }, "workers": { "idle": 0, "initializing": 1, "ready": 0, "running": 0, "throttled": 0 } } ``` > **Note:** `/requests` only returns pending/queued jobs. Completed job history is not available via the API — check the RunPod web console for logs. ### GPU Type IDs | ID | GPU | VRAM | Typical Cost | |----|-----|------|-------------| | `AMPERE_24` | RTX 3090 | 24GB | ~$0.34/hr | | `ADA_24` | RTX 4090 | 24GB | ~$0.69/hr | | `AMPERE_48` | A6000 | 48GB | ~$0.76/hr | | `AMPERE_80` | A100 | 80GB | ~$1.99/hr | **Availability note:** `ADA_24` (4090) is frequently throttled/unavailable on RunPod. Always configure endpoints with **multiple fallback GPU types** (comma-separated) to avoid jobs getting stuck in queue indefinitely: ```graphql gpuIds: "AMPERE_24,ADA_24" # Try 3090 first, fall back to 4090 ``` All toolkit tools also enforce a 5-minute queue timeout — if no GPU is available within 300 seconds, the job is automatically cancelled to prevent runaway billing from failed initialization cycles. ### Cloudflare R2 via AWS CLI R2 uses the S3-compatible API but requires `--region auto`: ```bash AWS_ACCESS_KEY_ID="$R2_ACCESS_KEY_ID" \ AWS_SECRET_ACCESS_KEY="$R2_SECRET_ACCESS_KEY" \ aws s3api list-objects-v2 \ --bucket "$R2_BUCKET_NAME" \ --endpoint-url "https://${R2_ACCOUNT_ID}.r2.cloudflarestorage.com" \ --region auto ``` > **Common mistake:** Omitting `--region auto` causes `InvalidRegionName` error. R2 valid regions: `wnam`, `enam`, `weur`, `eeur`, `apac`, `oc`, `auto`. ## Troubleshooting ### Force Image Pull When you push a new Docker image version, RunPod may still use the cached old one. To force a pull: 1. Update the template's `imageName` to use `@sha256:DIGEST` notation 2. Wait for the worker to restart 3. Revert to `:latest` tag after confirming ### Cold Start Too Slow - **qwen3-tts:** ~70s cold start, ~7s warm - **sadtalker:** ~60s cold start, ~10s warm - **image_edit:** ~90s cold start, ~15s warm If cold starts are a problem, set `workersMin: 1` (costs money when idle). ### Job Fails with OOM The model needs more VRAM than the GPU provides. Options: - Use a larger GPU tier - For dewatermark: reduce `--resize-ratio` (default 0.5 for safety) - For image_edit: reduce `--steps` ### "No workers available" You've hit your plan's concurrent worker limit. Either: - Wait for a running job to finish - Set `workersMax=0` on endpoints you're not using - Upgrade your RunPod plan ## Docker Images All Dockerfiles live in `docker/runpod-*/`. Images use `runpod/pytorch` as the base to share layers across tools. Building for RunPod (from Apple Silicon Mac): ```bash docker buildx build --platform linux/amd64 -t ghcr.io/conalmullan/video-toolkit-:latest docker/runpod-/ docker push ghcr.io/conalmullan/video-toolkit-:latest ``` GHCR packages default to **private** — you must manually make them public for RunPod to pull them. Go to GitHub > Packages > Package Settings > Change Visibility. ## Cost Optimization - Keep `workersMin: 0` on all endpoints (scale to zero) - Only deploy endpoints you actively need - Use `workersMax=0` to disable idle endpoints without deleting them - Qwen3-TTS is significantly cheaper than ElevenLabs for voiceovers - Check the RunPod dashboard for usage and billing

相关技能

运维与云

Docker Essentials

用于容器管理,图像操作,调试的基本道克命令和工作流程.

运维与云

Find Skills

从开放的代理技能生态系统中发现并安装技能. 使用时:(1)用户问"我如何做X",X可能拥有现有技能,(2)用户说"为X找到技能"或"是否为X有技能",(3)用户问"你能否做X",X是专门能力,(4)用户想扩展代理能力,(5)用户想搜索工具,模板,或工作流程,(6)用户提到他们希望…

运维与云

Microsoft Foundry

构建,部署,评价,优化,微调,管理微软创始代理,模型,资源最终结束. 用法:铸造、azd ai代理、azd 提供/部署、托管代理脚手架/开发/运行/部署/拖放、即时代理创建、创建代理、更新代理、添加代理工具、援引代理、代理.yaml、评估代理、批量活化、连续活化、持续监测、代理C…

运维与云

Azure Deploy

执行已有.azure/部署计划.md和基础设施文件的ALREADY-PREPARED应用程序的Azure部署。 当用户向 CREATE 请求新应用程序时, 请不要使用此技能 。 这种技能运行了 azd上行, azd 部署, trarraform 应用, 和 az 部署命令带有内置…