> 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-ubuntu.md).

# 在 Ubuntu 上安装

## 服务器要求

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

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

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

## 推荐的操作系统和驱动

### 操作系统

* **Ubuntu 22.04 LTS** — 推荐，GPU 驱动兼容性最佳
* **Ubuntu 24.04 LTS** — 支持，但内核 6.16+ 可能与较旧的驱动分支（R550 及以下）存在问题

{% hint style="warning" %}
安装程序需要一台 **x86\_64** 机器，运行 **Ubuntu 22.04 或更新版本** （或 HiveOS——见 [安装软件](/clore.ai/clore.ai-eng-zh/mian-xiang-zhu-ji/installing-clore-hosting/installing-clore-hosting-software.md)）。Ubuntu 18.04 和 20.04 已不再受支持。
{% endhint %}

### NVIDIA 驱动

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

| 分支         | 版本         | CUDA 支持        | 推荐用于           |
| ---------- | ---------- | -------------- | -------------- |
| R580（LTSB） | 580.126.18 | 最高支持 CUDA 12.8 | 大多数 GPU，长期稳定性  |
| R590       | 590.48.01  | 最高支持 CUDA 13.1 | RTX 50 系列，最新功能 |

安装推荐的驱动：

```bash
sudo apt install nvidia-driver-580
```

或者对于 RTX 50 系列：

```bash
sudo apt install nvidia-driver-590
```

### CUDA 工具包（用于 ML/AI 工作负载）

运行 ML 工作负载的租用者期望使用 CUDA。推荐版本：

| CUDA 版本   | 最低驱动  | 状态                |
| --------- | ----- | ----------------- |
| CUDA 12.8 | R570+ | 稳定，广泛的生态系统支持      |
| CUDA 13.1 | R590+ | 最新，针对 RTX 50 系列优化 |

大多数 Docker 镜像都包含它们自己的 CUDA 运行时，因此主机并不总是需要在系统范围内安装 CUDA 工具包。不过，拥有兼容的驱动是必不可少的。

## 添加服务器

所有操作都由控制面板为你生成的一条安装命令来完成。

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

前往 [clore.ai](https://clore.ai/)，注册或登录，打开 [我的服务器](https://clore.ai/my-servers) 并点击 **添加服务器**。有两种路径可选：

* **快速** — 控制面板会显示一条可直接复制的命令，用于安装托管代理 **并** 一步将机器注册到你的账户。服务器会自动出现在“我的服务器”中，并使用默认设置（最长租用时长 300 小时，按需和 spot 的 USD 自动定价为每台服务器每天 5 美元），你之后可以在控制面板中进行调整。
* **高级** — 你先命名服务器，它会作为等待安装状态出现在“我的服务器”中，服务器页面会显示用于安装和注册的命令（包括带有服务器令牌的组合单行命令）。

同一弹窗中的 **批量** 部分涵盖了整批上线——请参见 [Clore Fleet（批量接入）](/clore.ai/clore.ai-eng-zh/mian-xiang-zhu-ji/advanced/clore-fleet-mass-onboarding.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)
```

之后，你可以从服务器页面在稳定版和测试版更新之间切换正在运行的服务器（需要最新的托管代理；服务器被租用时无法进行切换）。

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

```bash
sudo -i
```

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

```bash
bash <(curl -s https://gitlab.com/cloreai-public/hosting-agent-installer/-/raw/main/install.sh) --init-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. 完成

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

```bash
重启
```

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

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

1. 禁用服务：

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

   ```bash
   重启
   ```

## 如何重新启用服务

要重新启用这些服务：

1. 启用服务：

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

   ```bash
   重启
   ```

## 移除之前安装的令牌

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

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

包含令牌的文件位于：

```
/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-ubuntu.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.
