关于 Thunder Compute
`tnr` 是 Thunder Compute 云平台的命令行界面,用于创建和管理 GPU 实例。它还支持 SSH 会话、文件传输、端口转发,以及引导式问题或反馈报告。
主要功能
- 01创建和管理 GPU 实例
- 02配置实例规格
- 03SSH 访问与会话管理
- 04通过 SCP 上传和下载文件
- 05将远程服务端口转发到本地
- 06引导式错误与反馈报告
适用场景
- 01为 AI/ML 实验创建 GPU 实例
- 02连接实例并传输项目文件
- 03转发远程服务端口以供本地访问
- 04提交 CLI 问题或产品建议
配置
远程服务无需本地安装。选择你使用的客户端,复制配置或使用一键安装。
https://api.thundercompute.com:8443/mcpclaude mcp add --transport http thunder-compute-thunder-compute https://api.thundercompute.com:8443/mcp{"mcpServers":{"thunder-compute-thunder-compute":{"type":"http","url":"https://api.thundercompute.com:8443/mcp"}}}在 Cursor 中打开{"servers":{"thunder-compute-thunder-compute":{"type":"http","url":"https://api.thundercompute.com:8443/mcp"}}}在 VS Code 中打开{"mcpServers":{"thunder-compute-thunder-compute":{"type":"http","url":"https://api.thundercompute.com:8443/mcp"}}}{"mcpServers":{"thunder-compute-thunder-compute":{"serverUrl":"https://api.thundercompute.com:8443/mcp"}}}命令在终端中运行;JSON 粘贴到对应客户端的 MCP 配置后重启。需要授权的服务会在首次连接时提示登录。
工具
详细介绍
概述
tnr 是 Thunder Compute 的官方命令行界面。Thunder Compute 是一个高性能云 GPU 平台,专为 AI/ML 原型开发和实验而构建。
Thunder Compute 使用专有编排引擎,提供快速配置、低延迟执行和低成本 GPU 计算,旨在满足开发者工作流的需求。
tnr CLI 支持:
- 配置和管理 GPU 实例
- 配置计算资源和实例规格
- 安全 SSH 访问和会话管理
- 文件传输功能(SCP 上传和下载)
- 端口转发,以便在本地访问远程服务
- 自动检查更新和版本管理
- 跨平台支持 macOS、Linux 和 Windows
文档
- CLI 参考: https://www.thundercompute.com/docs/cli-reference
- API 参考: https://www.thundercompute.com/docs/api-reference
- 快速入门: https://www.thundercompute.com/docs/quickstart
- 故障排除: https://www.thundercompute.com/docs/troubleshooting
安装
使用以下任一受支持的方法安装 tnr。你也可以直接从最新版本页面下载安装程序和二进制文件。
macOS
从最新版本页面下载适用于你平台的 .pkg 安装程序(Apple Silicon 使用 tnr_*_darwin_arm64.pkg,Intel 使用 tnr_*_darwin_amd64.pkg)。
Homebrew:
brew tap Thunder-Compute/tnr
brew install tnr
Linux
从最新版本页面下载 .tar.gz、.deb、.rpm 或 .apk 软件包。
安装脚本(推荐):
curl -fsSL https://raw.githubusercontent.com/Thunder-Compute/thunder-cli/main/scripts/install.sh | bash
Windows
从最新版本页面下载适用于你平台的 .msi 安装程序。
Scoop:
scoop bucket add tnr https://github.com/Thunder-Compute/scoop-bucket
scoop install tnr
Winget:
winget install Thunder.tnr
从源代码构建
git clone https://github.com/Thunder-Compute/thunder-cli.git
cd thunder-cli
go build -o tnr
./tnr
快速入门
tnr login # Authenticate with Thunder Compute
tnr create # Create a GPU instance
tnr status # View instance status
tnr connect 0 # Connect to your instance
# File transfers
tnr scp myfile.py 0:/home/ubuntu/
tnr scp 0:/home/ubuntu/results.txt ./
tnr delete 0 # Delete instance
tnr login 会打开浏览器,并返回到 127.0.0.1 上的环回回调地址。在无法访问该回调地址的无头或远程计算机上,请在 Console Settings 中创建一个具名 API 令牌,然后改为运行 tnr login --token <named_api_token>。
Bug 报告和反馈
运行 tnr report,按 tnr create 的方式逐步填写报告:选择 报告问题 或 提出改进建议,填写一句话摘要和详情,然后检查报告并选择 发送报告、编辑报告 或 取消。开始前请先登录。--kind、--subject 和 --details 或 --details-file 可预先填写对应步骤,这些步骤随后会跳过,且提供的文本会按原样发送。退出不会发送任何内容,并以代码 130 退出。非交互式报告默认归类为 Bug;产品反馈请使用 --kind feedback。
tnr report --subject "Upload connection drops" --details-file ./report.txt --component cli --instance 42
tnr report --kind feedback --subject "Show remaining disk space" --details "Please show disk usage in the instance list." --yes --json
tnr report --subject "Unexpected result" --details-file - --dry-run --json < ./report.txt
非交互式提交需要 --subject、--details 或 --details-file,以及 --yes。--json 不会提示输入。--details-file - 会从标准输入读取内容。--details 和 --details-file 不能同时使用。主题和详情的长度上限分别为 200 和 10,000 个 Unicode 字符;超出长度的文本会被拒绝,不会截断。--dry-run 会在不进行身份验证或提交的情况下预览报告,并指出缺少的、由服务端解析的报告人信息。
可选的上下文标志包括 --component(cli、console、api、mcp、virtualization 或 unknown)、--instance 或 --sandbox(二选一),以及 --occurred-at(RFC 3339)。报告会包含 CLI 版本、构建提交和日期、操作系统及架构。服务端会记录提交时间,并根据你的登录信息或已验证 API 令牌的所有者解析报告人。不会自动收集日志、环境变量、shell 历史记录或工作负载文件。仅添加你愿意与支持团队分享的证据,并省略凭据。
成功提交后会显示一个不透明的报告引用。退出代码为零表示提交成功或试运行成功。任何失败都会以非零代码退出,并在错误输出中保留已填写的报告,方便你再次提交。JSON 错误包含 error、message 和 report。报告流程会跳过自动更新和订阅检查。
许可证
本项目采用 MIT 许可证。详情请参阅 LICENSE。
评论
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。