runwhere CLI
快速开始
用 runwhere 在 5 分钟内完成登录、同步、提交和查看日志。
这一页只保留最短路径。你先跑通一条任务链路,再回到其他页面看 YAML 细节、价格和完整命令。
1. 安装
pip install runwhere开发环境可以在源码目录安装:
cd runwhere-runw
pip install -e ".[dev]"确认 CLI 可用:
runwhere --help2. 登录
runwhere login --endpoint https://api.runwhere.ai命令会提示粘贴 API Token。非交互环境可以这样登录:
echo "$RUNWHERE_TOKEN" | runwhere login --endpoint https://api.runwhere.ai验证身份:
runwhere whoami3. 写一个最小 YAML
kind: Training
version: v1
job:
name: hello
environment:
image: pytorch/pytorch:2.4.1-cuda12.1-cudnn9-runtime
command: python train.py
resources:
gpuNum: 1
gpuType: t4
storage:
workdirs:
- path: "."第一个任务建议用 t4 这类低成本卡试水,跑通链路后再换 a100-80g 等大卡跑正式训练。
4. 同步
runwhere sync -f train.yamlsync 会上传变更文件,并根据 YAML 准备环境和模型。
5. 提交
runwhere submit -f train.yaml如果只写了 gpuType,CLI 会自动选择合适 Offer。生产任务建议先运行:
runwhere price recommend -f train.yaml --top 3再把选中的 gpuSkuKey 写回 YAML。
6. 看日志
runwhere logs hello -f任务结束或不用时:
runwhere stop job hello
runwhere delete job hello