# 安装软件

## 服务器要求

服务器（或矿机——在此上下文中这些术语几乎可以互换）必须配备 NVIDIA GPU，目前不支持 AMD。最小磁盘空间要求为 32 GB；为确保可靠性，建议使用 SSD 而非闪存驱动器。最少需要 8 GB 内存，但 16 GB 会提供更高的稳定性。至于 CPU，系统可以使用 1151 插槽的 Celeron，但若需更高效的性能，建议使用如 i7-6700 之类的 CPU。

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

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

## 推荐驱动与 CUDA（HiveOS）

HiveOS 包含其自身的驱动管理，通过 `nvidia-driver-update` 命令。为与 Clore.ai 工作负载（尤其是 ML/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 工作负载的较旧默认驱动。

### CUDA 工具包兼容性

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

| CUDA 版本   | 最低驱动  | 状态                |
| --------- | ----- | ----------------- |
| CUDA 12.4 | R550+ | 在 ML 生态系统中广泛使用    |
| 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 支持。

## 注册并添加服务器

### 1. 转到 [网站](http://clore.ai/)，注册、登录并导航到市场：

<figure><img src="https://img1.teletype.in/files/0e/86/0e86de72-544d-48d8-8d82-cf120e516a81.png" alt=""><figcaption></figcaption></figure>

### 2. **添加服务器：** 有两种添加服务器的方式：

**方法 1：** 转到“我的服务器”部分并点击“+添加服务器”按钮。输入服务器名称并点击“下一步”。

<figure><img src="https://img4.teletype.in/files/f7/8e/f78e0a46-06fa-4a5d-b429-f21b78eafb6c.png" alt=""><figcaption></figcaption></figure>

添加后，服务器将以红圈标记，表示处于非活动状态。我们稍后会激活它，但现在先点击已创建的服务器以获取一个密钥——稍后需要使用该密钥。

<figure><img src="https://img4.teletype.in/files/36/ae/36aeeab8-98e0-4fea-81e9-d731d5211df2.png" alt=""><figcaption></figcaption></figure>

### 3. HiveOS 设置：

选择矿机并打开 Shell。对于很少使用 HiveOS 的用户，下方已添加图片以便说明。

<figure><img src="https://img1.teletype.in/files/45/06/4506318a-02cf-4de5-b5c8-bcf44df412ea.png" alt=""><figcaption></figcaption></figure>

<figure><img src="https://img3.teletype.in/files/e7/8e/e78e68e8-04da-4f84-89ab-546426d5f761.png" alt=""><figcaption></figcaption></figure>

<figure><img src="https://telegra.ph/file/49b76dd27191faca74a44.png" alt=""><figcaption></figcaption></figure>

### 4. **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
  ```

### 5. **按顺序运行更新：**

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

### 6. **更新必要的驱动：**

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

> **提示：** 要安装特定推荐的驱动版本，请使用：
>
> ```bash
> nvidia-driver-update 580.126.18 --force
> ```
>
> 对于 RTX 50 系列 GPU，请使用版本 `590.48.01` 或更高版本。

### 7. **重启矿机：**

```bash
reboot
```

### 8. **切换到超级用户模式：**

```bash
sudo -i
```

### 9. **安装软件：**

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

如果系统报告缺少 `git` ，请使用以下命令安装：

```bash
apt install -y git
```

然后重试安装。

如果遇到 `gpg` 错误，请使用：

<figure><img src="https://telegra.ph/file/e2ef8c5760193ad523e20.png" alt=""><figcaption></figcaption></figure>

```bash
apt install gpg -y --allow-downgrades
```

<figure><img src="https://img3.teletype.in/files/66/1c/661c9073-cc8e-4734-aa85-cff08902d4d6.png" alt=""><figcaption></figcaption></figure>

之后，重新运行安装。

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

### 10. **激活服务器：**

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

将 `<token>` 替换为之前获取的密钥。

如果错误提示缺少文件夹或文件，说明安装可能未正确完成，且 `clore-hosting` 文件夹未被创建。在这种情况下，请重复安装。

### 11. **最终重启：**

重启矿机，稍等片刻，然后刷新市场页面。如果一切设置正确，服务器将以绿圈标记。

```
reboot
```

<figure><img src="https://img2.teletype.in/files/98/9c/989c1cbd-2670-4568-b784-020af71451be.png" alt=""><figcaption></figcaption></figure>

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

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

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
   ```

## 移除之前安装的令牌

要删除令牌，请使用命令：

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

包含令牌的文件位于：

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


---

# Agent Instructions: 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:

```
GET https://docs.clore.ai/clore.ai/clore.ai-eng-zh/zhen-dui-zhu-ji/installing-clore-hosting/installing-clore-hosting-software.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
