TAO Chutes Miner 最新部署完整指南(2025-K3S版)
TAO Chutes Miner 是一个基于 Kubernetes 的 AI 算力网络,旨在通过自动化部署和智能调度优化 GPU 资源的使用。
🚀 Chutes Miner 最新部署完整指南(2025-K3s版)
适用于 Ubuntu 22.04,基于 K3s + Ansible 的全自动化部署流程
更新日期:2025年11月15号
🧭 一、项目简介
Chutes Miner 是在 chutes.ai 上运行的去中心化 AI 计算节点系统。
它通过 Ansible + Kubernetes 自动化部署,结合 GPU 验证(GraVal)与智能调度(Gepetto),帮助矿工在算力网络中高效提供 AI 推理服务。
⚙️ 二、系统组件概览
| 组件 |
功能简介 |
| Ansible |
自动化部署服务器与 Kubernetes 环境 |
| K3s (Kubernetes) |
轻量级 K8s 集群管理 GPU 节点 |
| Postgres |
存储服务器与 GPU 状态数据 |
| Redis |
实时事件发布与订阅 |
| GraVal |
GPU 真伪验证与 VRAM 校验 |
| Registry Proxy |
镜像代理与密钥签名验证 |
| Miner API |
节点注册与任务调度接口 |
| Gepetto |
智能调度引擎,优化推理任务与成本比 |
🖥️ 三、硬件与系统要求
| 类型 |
最低配置 |
建议配置 |
| 控制节点(CPU) |
4核 / 32GB RAM |
8核 / 64GB RAM |
| GPU 节点 |
公网 IPv4、独立显卡 |
H100 / A100 / 5090 等 |
| 操作系统 |
Ubuntu 22.04 (裸机或专用VM) |
Ubuntu 22.04 LTS 无驱动安装版 |
| 网络 |
公网独立IP(非NAT) |
所有节点间全端口互通 |
⚠️ 重要内存规则:
总 RAM ≥ 所有 GPU VRAM 之和。例如:4×A40(48G) → 至少需 192GB RAM。
🌐 四、部署环境准备
1️⃣ 安装 Ansible(在你的管理机上执行)
Ubuntu / WSL
1
| sudo apt update && sudo apt install -y ansible python3-pip
|
Mac
2️⃣ 安装 Ansible 扩展组件
1 2 3
| ansible-galaxy collection install community.general ansible-galaxy collection install kubernetes.core ansible-galaxy collection install ansible.posix
|
3️⃣ 可选:开启 Ansible 加速模式
1 2
| wget https://files.pythonhosted.org/packages/source/m/mitogen/mitogen-0.3.22.tar.gz tar -xzf mitogen-0.3.22.tar.gz
|
修改 ansible.cfg:路径 /ansible/k3s/ansible.cfg 或 ~/.ansible.cfg
1 2 3 4 5 6
| [defaults] strategy_plugins = /path/to/mitogen-0.3.22/ansible_mitogen/plugins/strategy strategy = mitogen_linear
[ssh_connection] ssh_args = -o ControlMaster=auto -o ControlPersist=2m
|
克隆仓库并准备目录
1 2
| git clone https://github.com/chutesai/chutes-miner.git cd chutes-miner/ansible
|
🧩 五、配置部署文件
1️⃣ 创建目录与配置文件或复制默认配置ansible/k3s/inventory.yml | charts/chutes-miner/values.yaml 并将其放入chutes此文件中
1 2 3
| mkdir ~/chutes touch ~/chutes/inventory.yml touch ~/chutes/values.yaml
|
2️⃣ 编辑 inventory.yml
示例配置:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
| all: children: control: hosts: chutes-miner-cpu-0: ansible_host: 10.0.0.1 workers: hosts: chutes-miner-gpu-0: ansible_host: 10.0.0.2 chutes-miner-gpu-1: ansible_host: 10.0.0.3 vars: ansible_user: ubuntu ansible_ssh_private_key_file: ~/.ssh/id_rsa ssh_keys: - "ssh-rsa AAAAB3N... user@domain.com" user: billybob
setup_local_kubeconfig: false controller_kubeconfig: ~/.kube/chutes.config
hotkey_path: "~/.bittensor/wallets/[WALLET]/hotkeys/[HOTKEY]"
chart_values: "~/chutes/values.yaml"
grafana_password: <REPLACE_ME>
|
☸️ 六、启动节点(Bootstrap)
执行以下命令完成全部安装与部署:
1 2
| cd ansible/k3s ansible-playbook -i ~/chutes/inventory.yml playbooks/site.yml
|
如需新增 GPU 节点:
1
| ansible-playbook -i ~/chutes/inventory.yml playbooks/site.yml --tags add-nodes
|
🧠 七、配置 Gepetto(调度逻辑)
在控制节点修改优化策略:
1 2
| kubectl create configmap gepetto-code --from-file=gepetto.py -n chutes kubectl rollout restart deployment/gepetto -n chutes
|
🔑 八、注册矿工身份
注册到 Bittensor 子网 64:
1
| btcli subnet register --netuid 64 --wallet.name [COLDKEY] --wallet.hotkey [HOTKEY]
|
不需要发布 axon;通信通过 WebSocket 建立。
💡 九、添加 GPU 节点
每台 GPU 服务器执行一次:
1 2 3 4 5 6 7 8
| chutes-miner add-node \ --name chutes-miner-gpu-0 \ --validator 5Dt7HZ7Zpw4DppPxFM7Ke3Cm7sDAWhsZXmM5ZAmE7dSVJbcQ \ --hourly-cost 1.2 \ --gpu-short-ref h100 \ --hotkey ~/.bittensor/wallets/[COLD]/hotkeys/[HOTKEY] \ --agent-api http://[NODE_IP]:32000 \ --miner-api http://[CONTROL_IP]:32000
|
验证通过后可通过remote-inventory 查看节点状态:
1
| chutes-miner remote-inventory --hotkey ~/.bittensor/wallets/ClodKey_nane/hotkeys/Hotkey_name
|

📊 十、监控与管理
| 工具 |
用途 |
| ktx |
快速切换 Kubernetes 上下文 |
| kns |
切换命名空间(需 fzf 支持) |
| Grafana |
性能与状态监控 (http://[CONTROL_NODE_IP]:30080) |

示例端口转发访问:
1
| kubectl port-forward svc/monitoring-grafana -n monitoring 8080:80
|
浏览器访问:http://localhost:8080
🧩 十一、更新与维护
更新 Charts
1
| ansible-playbook -i ~/chutes/inventory.yml playbooks/deploy-charts.yml
|
重启所有 K8s 服务
1
| ansible-playbook -i ~/chutes/inventory.yml playbooks/restart-k8s.yml
|
🧰 十二、常见问题
| 问题 |
现象 |
解决方案 |
| Postgres 认证失败 |
Pod 日志中提示密码错误 |
删除旧数据卷 /var/snap/postgres-data 并重新部署 |
| GPU 验证失败 |
GraVal bootstrap 报错 |
检查 GPU 驱动与 CUDA 版本是否自动安装成功 |
| 节点不可访问 |
连接 32000 端口失败 |
检查公网 IP、防火墙与 NodePort 范围 30000-32767 |
🎯 总结
通过 Ansible + K3s,Chutes Miner 部署可以完全自动化。
只需正确填写 inventory.yml、拥有一台控制节点与若干 GPU 节点,即可快速上线。
- ✅ 支持多 GPU、多节点
- ✅ 自动化验证与注册
- ✅ 可自定义调度策略
- ✅ 内置监控与 Grafana 面板