> ## Documentation Index
> Fetch the complete documentation index at: https://ppio.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# 自定义 CPU 和 RAM 规格

> 了解 PPIO 沙箱模板自定义 CPU 和 RAM 规格的归档方法，查阅该版本资源配置说明，为维护既有任务环境提供参考。

您可以通过 PPIO 沙箱命令行工具来自定义沙箱模板的 CPU 和 RAM 规格。

您需要先创建一个 [沙箱模板](/docs/sandbox/archive/sandbox-template)。

在构建步骤中，您可以指定沙箱模板的 vCPU 和 RAM 规格。

以下命令将创建一个具有 2 vCPU、2GB RAM 的沙箱模板。

```bash Bash icon="terminal" theme={null}
ppio-sandbox-cli template build -c "/root/.jupyter/start-up.sh" --cpu-count 2 --memory-mb 2048
```

## 通过配置文件

您也可以在运行 `ppio-sandbox-cli template build` 命令的同一目录下的 `ppio.toml` 文件内指定沙箱模板的 vCPU 和 RAM 规格。

```toml Toml icon="gear" theme={null}
template_id = "0r0efkbfwzfp9p7qpc1c"
dockerfile = "ppio.Dockerfile"
template_name = "my-agent-sandbox"
ready_cmd = "<your-ready-command>"
# 指定沙箱模板 vCPU 和 RAM 规格为 2 vCPU、2GB RAM
cpu_count = 2
memory_mb = 2_048
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.