> For the complete documentation index, see [llms.txt](https://docs.clore.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.clore.ai/clore.ai/clore.ai-eng-zh/mian-xiang-zhu-ji/installing-clore-hosting/installing-clore-hosting-software.md).

# 在 HiveOS 上安装

本页介绍在 **HiveOS**上安装。对于标准 Ubuntu 服务器，请参阅 [在 Ubuntu 上安装](/clore.ai/clore.ai-eng-zh/mian-xiang-zhu-ji/installing-clore-hosting/installing-clore-hosting-ubuntu.md) ——安装命令相同；不同的只有操作系统准备步骤。

## 服务器要求

服务器（或矿机——在此语境下这两个术语几乎可以互换）必须配备 NVIDIA GPU，因为目前不支持 AMD。所需最小磁盘空间为 32 GB（建议系统分区至少预留 30 GB 可用空间）；为提高可靠性，建议使用 SSD 而不是闪存盘。至少需要 8 GB RAM，但 16 GB 会带来更高的稳定性。至于 CPU，系统可以在 1151 接口的 Celeron 上运行，但为了获得更高效的性能，建议使用类似 i7-6700 这样的 CPU。

在继续之前，强烈建议禁用所有超频，包括功率限制（PL），并将 GPU 恢复出厂设置。之后，请通过压力测试系统稳定性，例如使用 kawpow 算法测试 GPU 并给 CPU 加载。监控温度并确保一切运行稳定。

如果系统运行稳定且温度处于安全范围内，请继续执行下一步说明。如果温度过高或出现错误，请先解决这些问题——例如改善散热或排查故障——并在继续之前确保系统稳定运行。

## 推荐驱动与 CUDA（HiveOS）

HiveOS 通过 `nvidia-driver-update` 命令进行自己的驱动管理。为了与 Clore.ai 工作负载（尤其是机器学习/AI）获得最佳兼容性，请使用以下推荐版本：

### NVIDIA 驱动

| 分支             | 版本         | CUDA 支持        | 推荐用途                         |
| -------------- | ---------- | -------------- | ---------------------------- |
| **R580（LTSB）** | 580.126.18 | 最高支持 CUDA 12.8 | 大多数 GPU——稳定，长期支持至 2028 年 8 月 |
| **R590**       | 590.48.01  | 最高支持 CUDA 13.1 | RTX 50 系列（5090/5080），最新功能    |

在 HiveOS 中安装特定版本：

```bash
nvidia-driver-update 580.126.18 --force
```

对于 RTX 50 系列 GPU：

```bash
nvidia-driver-update 590.48.01 --force
```

> **重要：** 不要使用 `nvidia-driver-update --force` 而不指定版本——它可能会安装一个较旧的默认驱动，而该驱动不支持现代 CUDA 工作负载。

安装程序本身 **不会** 安装或升级 GPU 驱动——在运行它之前必须先安装可用的 NVIDIA 驱动（`nvidia-smi` 必须可用）。

### CUDA 工具包兼容性

大多数租用方使用自带 CUDA 运行时的 Docker 镜像，因此主机通常不需要手动安装 CUDA Toolkit。不过， **主机的 NVIDIA 驱动必须支持租用方工作负载所需的 CUDA 版本。**

| CUDA 版本   | 最低驱动  | 状态                 |
| --------- | ----- | ------------------ |
| CUDA 12.4 | R550+ | 在机器学习生态中广泛使用       |
| CUDA 12.8 | R570+ | 最新稳定的 12.x 分支      |
| CUDA 13.1 | R590+ | 最新版本，为 RTX 50 系列优化 |

**建议：** 安装 R580 LTSB（580.126.18），以便与 CUDA 12.x 工作负载获得广泛兼容性。如果你托管的是 RTX 50 系列 GPU，请使用 R590（590.48.01）以获得完整的 CUDA 13.x 支持。

## 准备矿机（HiveOS）

### 1. 在 HiveOS 中打开矿机的 Shell

在 HiveOS 仪表板中选择该矿机并打开 **远程访问 → Hive Shell Start** （或者通过 SSH 连接）。

### 2. 更新 HiveOS

```bash
hive-replace -y --stable
```

#### 如果出现 HiveOS 磁盘空间问题

如果安装或更新后磁盘上的可用空间少于预期（例如，512 GB 磁盘上只有 20 GB 可用），请执行以下操作：

* **对于 M.2：**

  ```bash
  growpart /dev/nvme0n1 4
  resize2fs /dev/nvme0n1p4
  ```
* **对于 SATA：**

  ```bash
  growpart /dev/sda 4
  resize2fs /dev/sda4
  ```

### 3. 按顺序运行更新

```bash
selfupgrade --force
apt update
apt upgrade
apt autoremove
```

### 4. 更新驱动

```bash
nvidia-driver-update 580.126.18 --force
```

对于 RTX 50 系列 GPU，请使用版本 `590.48.01` 或更高版本。

### 5. 重启矿机

```bash
reboot
```

## 安装 Hosting Agent

安装只需一条命令，由仪表板为你生成。安装程序会自动检测 HiveOS——同一条命令在 Ubuntu 和 HiveOS 矿机上都适用。

### 1. 在网站上创建服务器

前往 [clore.ai](https://clore.ai/)，注册或登录，打开 [我的服务器](https://clore.ai/my-servers) 并点击 **添加服务器**:

* **快速** ——一条命令即可安装 hosting agent **并且** 一步将机器注册到你的账户，使用默认设置（最长租用时长 300 小时，按需和现货均为每台服务器每天 5 美元的 USD 自动定价），之后你可以在仪表板中调整这些设置。
* **高级** ——先为服务器命名，然后从服务器页面复制其安装和注册命令（包括带服务器 token 的合并一行命令）。

要一次启动多台矿机，请改用弹窗中的 **批量** 部分——HiveOS 集群会通过那里的 flight sheet 进行接入；请参阅 [Clore Fleet（批量接入）](/clore.ai/clore.ai-eng-zh/mian-xiang-zhu-ji/advanced/clore-fleet-mass-onboarding.md)。要通过你已关联的 HiveOS 账户接入单台矿机，请参阅 [HiveOS 集成](/clore.ai/clore.ai-eng-zh/mian-xiang-zhu-ji/advanced/hiveos-integration.md).

### 2. 选择安装通道

| 通道      | 它是什么                             |
| ------- | -------------------------------- |
| **稳定版** | 推荐——经过全面测试的版本，更新频率较低             |
| **测试版** | 在进入稳定版之前提供最新更新和功能——可靠性可能较低       |
| **旧版**  | 上一代安装程序——如果稳定版无法在你的机器上运行，可作为备用方案 |

**稳定版（推荐）：**

```bash
bash <(curl -s https://gitlab.com/cloreai-public/hosting-agent-installer/-/raw/main/install.sh)
```

**测试版：**

```bash
bash <(curl -s https://gitlab.com/cloreai-public/hosting-agent-installer/-/raw/dev/install.sh) --channel beta
```

**旧版：**

```bash
bash <(curl -s https://gitlab.com/cloreai-public/hosting-agent-installer/-/raw/legacy/install.sh)
```

你之后可以在服务器页面在稳定版和测试版更新之间切换（需要已更新到最新的 hosting agent；在服务器被租用时无法切换）。

### 3. 以 root 身份运行安装命令

```bash
sudo -i
```

（在 Hive Shell 中通常你已经是 root。）

然后粘贴从仪表板复制的命令。如果你使用的是高级路径，请在服务器页面显示的 token 后附加，以一步完成安装和注册：

```bash
bash <(curl -s https://gitlab.com/cloreai-public/hosting-agent-installer/-/raw/main/install.sh) --init-token <token>
```

如果你运行的是不带 token 的普通安装命令，请之后使用以下命令注册机器：

```bash
/opt/clore-hosting/clore.sh --init-token <token>
```

安装程序会预先检查其依赖条件，并告诉你缺少什么。它需要能够访问 Docker 和 NVIDIA 软件包仓库、GitHub、GitLab、Docker Hub 以及 `api.clore.ai` ——请参阅 [网络要求](/clore.ai/clore.ai-eng-zh/mian-xiang-zhu-ji/installing-clore-hosting/network-requirements.md).

### 4. 完成

重启矿机，稍等片刻，然后刷新“我的服务器”页面。如果一切设置正确，服务器将显示为在线。

```bash
reboot
```

## 如何禁用所有已安装的服务

如果你需要禁用之前安装的所有内容：

1. 禁用服务：

   ```bash
   systemctl disable clore-hosting.service
   systemctl disable docker.service
   systemctl disable docker.socket
   ```
2. 重启系统：

   ```bash
   reboot
   ```

## 如何重新启用服务

要重新启用这些服务：

1. 启用服务：

   ```bash
   systemctl enable clore-hosting.service
   systemctl enable docker.service
   systemctl enable docker.socket
   ```
2. 重启系统：

   ```bash
   reboot
   ```

## 移除之前安装的 token

要删除 token，请使用以下命令：

```bash
/opt/clore-hosting/clore.sh --reset
```

包含 token 的文件位于：

```
/opt/clore-hosting/client/auth
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.clore.ai/clore.ai/clore.ai-eng-zh/mian-xiang-zhu-ji/installing-clore-hosting/installing-clore-hosting-software.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
