diff --git a/docs/.vitepress/config.mjs b/docs/.vitepress/config.mjs index df52b127b..202944b71 100644 --- a/docs/.vitepress/config.mjs +++ b/docs/.vitepress/config.mjs @@ -104,6 +104,14 @@ export default withMermaid(defineConfig({ { text: 'Guide', link: '/guide/introduction' }, { text: 'Architecture', link: '/architecture/overview' }, { text: 'Developer', link: '/dev/' }, + { + text: 'Community', + items: [ + { text: 'Roadmap', link: '/guide/roadmap' }, + { text: 'Cube 100 Program', link: '/guide/cube100' }, + { text: 'Contributing', link: 'https://github.com/tencentcloud/CubeSandbox/blob/master/CONTRIBUTING.md' } + ] + }, { text: 'Blog', link: '/blog/' }, { text: 'Changelog', link: '/changelog/' }, { text: 'Contributors', link: '/contributors' }, @@ -117,10 +125,17 @@ export default withMermaid(defineConfig({ text: 'Getting Started', items: [ { text: 'Introduction', link: '/guide/introduction' }, - { text: 'Quick Start', link: '/guide/quickstart' }, + { text: 'Quick Start', link: '/guide/quickstart' } + ] + }, + { + text: 'Deployment', + items: [ { text: 'PVM Deployment', link: '/guide/pvm-deploy' }, { text: 'Bare-Metal Deployment', link: '/guide/bare-metal-deploy' }, + { text: 'Self-Build Deployment', link: '/guide/self-build-deploy' }, { text: 'Multi-Node Cluster', link: '/guide/multi-node-deploy' }, + { text: 'Connect to an Existing Cluster', link: '/guide/connect-existing-cluster' }, { text: 'Kubernetes Deployment', link: '/guide/kubernetes/', @@ -134,47 +149,78 @@ export default withMermaid(defineConfig({ ] }, { text: 'Tencent Cloud Cluster (Terraform)', link: '/guide/tencentcloud-terraform-deploy' }, - { text: 'Self-Build Deployment', link: '/guide/self-build-deploy' }, { text: 'Development Environment (QEMU VM)', link: '/guide/dev-environment' } ] }, + { + text: 'Tutorials', + items: [ + { text: 'Example Projects', link: '/guide/tutorials/examples' } + ] + }, { text: 'Core Concepts', items: [ - { text: 'Roadmap', link: '/guide/roadmap' }, { text: 'Sandbox Lifecycle', link: '/guide/lifecycle' }, { text: 'Templates Overview', link: '/guide/templates' }, - { text: 'Snapshot, Rollback & Clone', link: '/guide/snapshot-rollback-clone' }, - { text: 'Digital Assistant', link: '/guide/digital-assistant' }, - { text: 'Performance Benchmark', link: '/guide/performance-benchmark' } + { text: 'Snapshot, Rollback & Clone', link: '/guide/snapshot-rollback-clone' } ] }, { - text: 'Tutorials', + text: 'Templates & Images', items: [ { text: 'Create Templates from OCI Image', link: '/guide/tutorials/template-from-image' }, - { text: 'Examples', link: '/guide/tutorials/examples' }, - { text: 'Custom Image', link: '/guide/tutorials/bring-your-own-image' } + { text: 'Bring Your Own Image', link: '/guide/tutorials/bring-your-own-image' }, + { text: 'Template Inspection & Request Preview', link: '/guide/template-inspection-and-preview' } ] }, { - text: 'Networking', + text: 'Networking & Security', items: [ { text: 'Network Policy', link: '/guide/network-policy' }, { text: 'Route-Aware Egress', link: '/guide/route-aware-egress' }, { text: 'Security Proxy', link: '/guide/security-proxy' }, - { text: 'Restrict Public Access', link: '/guide/restrict-public-access' } + { text: 'Restrict Public Access', link: '/guide/restrict-public-access' }, + { text: 'Authentication', link: '/guide/authentication' }, + { text: 'HTTPS & Domain Resolution', link: '/guide/https-and-domain' }, + { text: 'Network Hardening', link: '/guide/network-hardening' } ] }, { text: 'Storage', items: [ { text: 'Persistent Storage (Host Mount)', link: '/guide/persistent-storage' }, - { text: 'Volume Plugin Development', link: '/guide/volume-plugin' } + { text: 'Volume Plugin Development', link: '/guide/volume-plugin' }, + { text: 'Tigris (S3-Compatible)', link: '/guide/integrations/tigris' } + ] + }, + { + text: 'Features & Integrations', + items: [ + { text: 'Digital Assistant (Preview)', link: '/guide/digital-assistant' }, + { + text: 'Framework & Tool Integrations', + link: '/guide/integrations/', + collapsed: true, + items: [ + { text: 'Claude Code', link: '/guide/integrations/claude-code' }, + { text: 'LangChain', link: '/guide/integrations/langchain' }, + { text: 'Pi Agent', link: '/guide/integrations/pi-agent' } + ] + }, + { + text: 'Case Studies', + link: '/guide/usecases/', + collapsed: true, + items: [ + { text: 'trpc-agent-go', link: '/guide/usecases/trpc-agent-go' }, + { text: 'Lexmount AI', link: '/guide/usecases/lexmount-browser-agent' } + ] + } ] }, { - text: 'Operations', + text: 'Operations & Reference', items: [ { text: 'WebUI Dashboard', link: '/guide/webui' }, { text: 'Service Management & Logs', link: '/guide/service-management' }, @@ -183,40 +229,20 @@ export default withMermaid(defineConfig({ { text: 'Node Isolation', link: '/guide/node-isolation' }, { text: 'Sandbox Resource Metrics', link: '/guide/resource-metrics' }, { text: 'Sandbox Logs', link: '/guide/sandbox-logs' }, - { text: 'Template Inspection & Request Preview', link: '/guide/template-inspection-and-preview' }, - { text: 'HTTPS & Domain Resolution', link: '/guide/https-and-domain' }, - { text: 'Network Hardening', link: '/guide/network-hardening' }, - { text: 'Authentication', link: '/guide/authentication' }, - { text: 'Soft-delete Purge', link: '/guide/soft-delete-purge' } - ] - }, - { - text: 'Integration', - items: [ - { text: 'Connect to an Existing Cube Cluster', link: '/guide/connect-existing-cluster' } + { text: 'Soft-delete Purge', link: '/guide/soft-delete-purge' }, + { text: 'Performance Benchmark', link: '/guide/performance-benchmark' } ] }, { - text: 'Contribute', + text: 'Troubleshooting', + link: '/guide/troubleshooting/', items: [ - { - text: 'Troubleshooting', - link: '/guide/troubleshooting/', - items: [ - { text: 'Deployment', link: '/guide/troubleshooting/deployment' }, - { text: 'Templates', link: '/guide/troubleshooting/templates' } - ] - }, - { - text: 'Use Cases', - link: '/guide/usecases/', - items: [ - { text: 'trpc-agent-go', link: '/guide/usecases/trpc-agent-go' }, - { text: 'Lexmount AI', link: '/guide/usecases/lexmount-browser-agent' } - ] - }, - { text: 'Cube 100 Program', link: '/guide/cube100' }, - { text: 'Integrations', link: '/guide/integrations/' } + { text: 'Overview', link: '/guide/troubleshooting/' }, + { text: 'Deployment', link: '/guide/troubleshooting/deployment' }, + { text: 'Templates', link: '/guide/troubleshooting/templates' }, + { text: 'Network CIDR Conflicts', link: '/guide/troubleshooting/local-network-cidr-conflict' }, + { text: 'Host Mount Permissions', link: '/guide/troubleshooting/host-mount-permissions' }, + { text: 'Component Log Locations', link: '/guide/troubleshooting/component-log-locations' } ] }, { @@ -259,6 +285,14 @@ export default withMermaid(defineConfig({ { text: '指南', link: '/zh/guide/introduction' }, { text: '架构', link: '/zh/architecture/overview' }, { text: '开发者', link: '/zh/dev/' }, + { + text: '社区', + items: [ + { text: '路线图', link: '/zh/guide/roadmap' }, + { text: 'Cube 100 计划', link: '/zh/guide/cube100' }, + { text: '参与贡献', link: 'https://github.com/tencentcloud/CubeSandbox/blob/master/CONTRIBUTING_zh.md' } + ] + }, { text: '博客', link: '/zh/blog/' }, { text: '更新日志', link: '/zh/changelog/' }, { text: '贡献者', link: '/zh/contributors' }, @@ -269,13 +303,20 @@ export default withMermaid(defineConfig({ '/zh/blog/': [], '/zh/guide/': [ { - text: '入门指南', + text: '入门', items: [ - { text: '简介 (Intro)', link: '/zh/guide/introduction' }, - { text: '快速开始', link: '/zh/guide/quickstart' }, - { text: 'PVM部署', link: '/zh/guide/pvm-deploy' }, - { text: '裸金属/物理机部署', link: '/zh/guide/bare-metal-deploy' }, + { text: '产品简介', link: '/zh/guide/introduction' }, + { text: '快速开始', link: '/zh/guide/quickstart' } + ] + }, + { + text: '部署', + items: [ + { text: 'PVM 部署', link: '/zh/guide/pvm-deploy' }, + { text: '裸金属部署', link: '/zh/guide/bare-metal-deploy' }, + { text: '本地构建部署', link: '/zh/guide/self-build-deploy' }, { text: '多机集群部署', link: '/zh/guide/multi-node-deploy' }, + { text: '连接已有集群', link: '/zh/guide/connect-existing-cluster' }, { text: 'Kubernetes 部署', link: '/zh/guide/kubernetes/', @@ -288,90 +329,101 @@ export default withMermaid(defineConfig({ { text: '常见问题', link: '/zh/guide/kubernetes/faq' } ] }, - { text: '腾讯云集群部署(Terraform)', link: '/zh/guide/tencentcloud-terraform-deploy' }, - { text: '本地构建部署', link: '/zh/guide/self-build-deploy' }, + { text: '腾讯云集群(Terraform)', link: '/zh/guide/tencentcloud-terraform-deploy' }, { text: '开发环境(QEMU 虚机)', link: '/zh/guide/dev-environment' } ] }, + { + text: '教程', + items: [ + { text: '示例项目', link: '/zh/guide/tutorials/examples' } + ] + }, { text: '核心概念', items: [ - { text: '路线图', link: '/zh/guide/roadmap' }, { text: '沙箱生命周期', link: '/zh/guide/lifecycle' }, { text: '模板概览', link: '/zh/guide/templates' }, - { text: '快照、回滚与克隆', link: '/zh/guide/snapshot-rollback-clone' }, - { text: '数字助手', link: '/zh/guide/digital-assistant' }, - { text: '性能测试', link: '/zh/guide/performance-benchmark' } + { text: '快照、回滚与克隆', link: '/zh/guide/snapshot-rollback-clone' } ] }, { - text: '场景教程', + text: '模板与镜像', items: [ { text: '从 OCI 镜像制作模板', link: '/zh/guide/tutorials/template-from-image' }, - { text: '示例项目', link: '/zh/guide/tutorials/examples' }, - { text: '自定义镜像', link: '/zh/guide/tutorials/bring-your-own-image' } + { text: '自带镜像接入', link: '/zh/guide/tutorials/bring-your-own-image' }, + { text: '模板检查与请求预览', link: '/zh/guide/template-inspection-and-preview' } ] }, { - text: '网络', + text: '网络与安全', items: [ { text: '网络策略', link: '/zh/guide/network-policy' }, { text: '路由感知出网', link: '/zh/guide/route-aware-egress' }, { text: '安全代理', link: '/zh/guide/security-proxy' }, - { text: '限制公开访问', link: '/zh/guide/restrict-public-access' } + { text: '限制公开访问', link: '/zh/guide/restrict-public-access' }, + { text: 'API 鉴权', link: '/zh/guide/authentication' }, + { text: 'HTTPS 与域名解析', link: '/zh/guide/https-and-domain' }, + { text: '网络加固', link: '/zh/guide/network-hardening' } ] }, { text: '存储', items: [ { text: '持久化存储(Host Mount)', link: '/zh/guide/persistent-storage' }, - { text: 'Volume 插件开发', link: '/zh/guide/volume-plugin' } - ] - }, - { - text: '安全与运维', - items: [ - { text: 'WebUI 控制台', link: '/zh/guide/webui' }, - { text: '服务管理与日志', link: '/zh/guide/service-management' }, - { text: '命令行工具', link: '/zh/guide/cli-tools' }, - { text: 'CubeMaster 调度器配置参考', link: '/zh/guide/cubemaster-scheduler-config' }, - { text: '隔离节点', link: '/zh/guide/node-isolation' }, - { text: '沙箱资源指标', link: '/zh/guide/resource-metrics' }, - { text: '沙箱日志', link: '/zh/guide/sandbox-logs' }, - { text: '模板检查与请求预览', link: '/zh/guide/template-inspection-and-preview' }, - { text: 'HTTPS 证书与域名解析', link: '/zh/guide/https-and-domain' }, - { text: '网络加固', link: '/zh/guide/network-hardening' }, - { text: '鉴权', link: '/zh/guide/authentication' }, - { text: '软删除数据清理', link: '/zh/guide/soft-delete-purge' } - ] - }, - { - text: '集成', - items: [ - { text: '连接到已有 Cube 集群', link: '/zh/guide/connect-existing-cluster' } + { text: 'Volume 插件开发', link: '/zh/guide/volume-plugin' }, + { text: 'Tigris(S3 兼容)', link: '/zh/guide/integrations/tigris' } ] }, { - text: '社区共建', + text: '功能与生态集成', items: [ + { text: '数字助手(预览)', link: '/zh/guide/digital-assistant' }, { - text: '故障排障', - link: '/zh/guide/troubleshooting/', + text: '框架与工具集成', + link: '/zh/guide/integrations/', + collapsed: true, items: [ - { text: '部署相关', link: '/zh/guide/troubleshooting/deployment' }, - { text: '模板相关', link: '/zh/guide/troubleshooting/templates' } + { text: 'Claude Code', link: '/zh/guide/integrations/claude-code' }, + { text: 'LangChain', link: '/zh/guide/integrations/langchain' }, + { text: 'Pi Agent', link: '/zh/guide/integrations/pi-agent' } ] }, { - text: '应用案例', + text: '案例实践', link: '/zh/guide/usecases/', + collapsed: true, items: [ { text: 'trpc-agent-go', link: '/zh/guide/usecases/trpc-agent-go' }, { text: 'Lexmount AI', link: '/zh/guide/usecases/lexmount-browser-agent' } ] - }, - { text: 'Cube 100 计划', link: '/zh/guide/cube100' }, - { text: '生态集成', link: '/zh/guide/integrations/' } + } + ] + }, + { + text: '运维与参考', + items: [ + { text: 'WebUI 控制台', link: '/zh/guide/webui' }, + { text: '服务管理与日志', link: '/zh/guide/service-management' }, + { text: '命令行工具', link: '/zh/guide/cli-tools' }, + { text: 'CubeMaster 调度器配置', link: '/zh/guide/cubemaster-scheduler-config' }, + { text: '节点隔离', link: '/zh/guide/node-isolation' }, + { text: '沙箱资源指标', link: '/zh/guide/resource-metrics' }, + { text: '沙箱日志', link: '/zh/guide/sandbox-logs' }, + { text: '软删除数据清理', link: '/zh/guide/soft-delete-purge' }, + { text: '性能基准', link: '/zh/guide/performance-benchmark' } + ] + }, + { + text: '故障排查', + link: '/zh/guide/troubleshooting/', + items: [ + { text: '排障概览', link: '/zh/guide/troubleshooting/' }, + { text: '部署问题', link: '/zh/guide/troubleshooting/deployment' }, + { text: '模板问题', link: '/zh/guide/troubleshooting/templates' }, + { text: '网络 CIDR 冲突', link: '/zh/guide/troubleshooting/local-network-cidr-conflict' }, + { text: 'Host Mount 权限', link: '/zh/guide/troubleshooting/host-mount-permissions' }, + { text: '组件日志位置', link: '/zh/guide/troubleshooting/component-log-locations' } ] }, { diff --git a/docs/.vitepress/theme/home.css b/docs/.vitepress/theme/home.css new file mode 100644 index 000000000..8c0f84002 --- /dev/null +++ b/docs/.vitepress/theme/home.css @@ -0,0 +1,13 @@ +/* Keep the Chinese home-page tagline on one line when the viewport has room. + Narrow screens retain VitePress's responsive wrapping behavior. */ +@media (min-width: 768px) { + .VPHomeHero .text { + max-width: none; + white-space: nowrap; + } + + html[lang^='zh'] .VPHomeHero .tagline { + max-width: none; + white-space: nowrap; + } +} diff --git a/docs/.vitepress/theme/index.js b/docs/.vitepress/theme/index.js index 50fd0250c..095a85848 100644 --- a/docs/.vitepress/theme/index.js +++ b/docs/.vitepress/theme/index.js @@ -3,6 +3,7 @@ import DefaultTheme from 'vitepress/theme' import Layout from './Layout.vue' import BlogIndex from './BlogIndex.vue' import './blog.css' +import './home.css' export default { extends: DefaultTheme, diff --git a/docs/guide/integrations/claude-code.md b/docs/guide/integrations/claude-code.md index b3a4ad34b..5cf2a8ceb 100644 --- a/docs/guide/integrations/claude-code.md +++ b/docs/guide/integrations/claude-code.md @@ -11,8 +11,6 @@ lang: en-US # Claude Code -[中文文档](../../zh/guide/integrations/claude-code.md) - [Claude Code](https://docs.anthropic.com/en/docs/claude-code) is a terminal-based AI coding agent developed by Anthropic. It runs commands, edits files, and executes code in your terminal. This guide shows how to keep Claude Code running **on your host** while transparently redirecting **every Bash command it runs** into an isolated CubeSandbox MicroVM, using a `PreToolUse` hook. The model never sees the sandbox layer, and no prompt or workflow changes are required. diff --git a/docs/guide/integrations/langchain.md b/docs/guide/integrations/langchain.md index 5d5dec585..095a959fc 100644 --- a/docs/guide/integrations/langchain.md +++ b/docs/guide/integrations/langchain.md @@ -11,8 +11,6 @@ lang: en-US # LangChain Integration Guide -[中文](../../zh/guide/integrations/langchain.md) - Run a LangChain agent that calls a Python tool inside a [CubeSandbox](https://github.com/TencentCloud/CubeSandbox) MicroVM. Because Cube exposes an **E2B-compatible API**, migrating a LangChain app from E2B to Cube usually means changing a few diff --git a/docs/guide/integrations/pi-agent.md b/docs/guide/integrations/pi-agent.md index f04b8b910..e866e1c50 100644 --- a/docs/guide/integrations/pi-agent.md +++ b/docs/guide/integrations/pi-agent.md @@ -12,8 +12,6 @@ lang: en-US # Pi Agent Integration Guide -[中文文档](../../zh/guide/integrations/pi-agent.md) - Run the [Pi coding agent](https://www.npmjs.com/package/@earendil-works/pi-coding-agent) — a terminal-native AI coding agent — inside CubeSandbox MicroVMs. This guide covers image build, key injection, egress control, and snapshot-based session diff --git a/docs/guide/performance-benchmark.md b/docs/guide/performance-benchmark.md index 1badf34a9..f9e8e132b 100644 --- a/docs/guide/performance-benchmark.md +++ b/docs/guide/performance-benchmark.md @@ -1,5 +1,6 @@ # Performance Benchmark -For the detailed performance benchmark report, please refer to the blog post: +Detailed benchmark reports: -[CubeSandbox Core Operations Performance Benchmark](../blog/posts/2026-06-01-cubesandbox-perf-benchmark.md) +- [CubeSandbox Core Operations Performance Benchmark](../blog/posts/2026-06-01-cubesandbox-perf-benchmark.md) +- [CubeSandbox Core Operations Performance Benchmark on a PVM Cloud Server](../blog/posts/2026-06-03-cubesandbox-perf-benchmark-pvm.md) diff --git a/docs/guide/self-build-deploy.md b/docs/guide/self-build-deploy.md index d83aaa868..b0fddf721 100644 --- a/docs/guide/self-build-deploy.md +++ b/docs/guide/self-build-deploy.md @@ -69,7 +69,7 @@ The default expected filename is `vmlinux`. You can override the path via the `O From the repository root: ```bash -cd cube-sandbox +cd CubeSandbox ./deploy/one-click/build-release-bundle-builder.sh ``` diff --git a/docs/guide/tutorials/bring-your-own-image.md b/docs/guide/tutorials/bring-your-own-image.md index 11e57674c..d50cf084a 100644 --- a/docs/guide/tutorials/bring-your-own-image.md +++ b/docs/guide/tutorials/bring-your-own-image.md @@ -8,8 +8,6 @@ If you want the whole story about how OCI images become templates, read tutorial is the prerequisite that gets your image **ready for the readiness probe** that tutorial requires. ---- - ## 1. Why does my image need `envd`? Cube-Sandbox talks to every running sandbox through an in-container daemon @@ -28,8 +26,6 @@ In other words: **any image you want to use as a Cube template must have that is to build `FROM` the official `cubesandbox-base` image — the next section walks through the full happy path. ---- - ## 2. Quick start: build on top of `cubesandbox-base` `cubesandbox-base` is a plain `ubuntu:22.04` with `envd` preinstalled at @@ -96,8 +92,6 @@ Cube SDK or `cubemastercli`; the full SDK usage is covered in Pin the exact envd version (`2026.16`) for reproducible builds. ---- - ## 3. Alternative: inject `envd` into an existing image When you want to bring your own custom image, copy `envd` and the @@ -142,8 +136,6 @@ CMD ["uvicorn", "app:app", "--app-dir", "/srv", "--host", "0.0.0.0", "--port", " Build, push and template creation are identical to sections 2.2 / 2.3. ---- - ## 4. The entrypoint contract `cube-entrypoint.sh` implements a simple "envd-in-the-background, your @@ -189,8 +181,6 @@ control to your main process: exec "$@" ``` ---- - ## 5. Verifying the image locally (optional) Before creating a template you can run the same smoke test that CI runs @@ -217,8 +207,6 @@ If `/health` does not reach `204` within a few seconds, inspect docker exec "$cid" cat /var/log/envd.log ``` ---- - ## 6. Troubleshooting | Symptom | Likely cause | Fix | @@ -231,8 +219,6 @@ docker exec "$cid" cat /var/log/envd.log | `sudo: command not found` in your CMD | You started `FROM` a `-slim` / `-alpine` image without sudo | Either `apt-get install -y sudo`, or drop `sudo` from your entrypoint — `cube-entrypoint.sh` doesn't require it. | | Template creation times out in `PULLING` | Registry unreachable from Cube nodes | Push to a registry the cluster can reach, or supply `--registry-username` / `--registry-password`. | ---- - ## 7. Advanced — rebuild the base image yourself The base image is produced by a single GitHub Actions workflow in this diff --git a/docs/zh/guide/integrations/claude-code.md b/docs/zh/guide/integrations/claude-code.md index 4c91d942e..acf64d8a1 100644 --- a/docs/zh/guide/integrations/claude-code.md +++ b/docs/zh/guide/integrations/claude-code.md @@ -11,8 +11,6 @@ lang: zh-CN # Claude Code -[English](../../../guide/integrations/claude-code.md) - [Claude Code](https://docs.anthropic.com/en/docs/claude-code) 是 Anthropic 出品的、基于终端的 AI 编码 agent,它在终端里执行命令、编辑文件、运行代码。 本指南介绍如何让 Claude Code 继续跑在**你的宿主机**上,同时用一个 `PreToolUse` hook 把它执行的**每一条 Bash 命令**透明转发进隔离的 CubeSandbox MicroVM。模型完全感知不到沙箱层,也无需改动 prompt 或使用方式。 diff --git a/docs/zh/guide/integrations/langchain.md b/docs/zh/guide/integrations/langchain.md index 79fcde7cf..9cf4c9790 100644 --- a/docs/zh/guide/integrations/langchain.md +++ b/docs/zh/guide/integrations/langchain.md @@ -11,8 +11,6 @@ lang: zh-CN # LangChain 集成指南 -[English](../../guide/integrations/langchain.md) - 将调用 Python 工具的 [LangChain](https://github.com/langchain-ai/langchain) Agent 运行在 [CubeSandbox](https://github.com/TencentCloud/CubeSandbox) 的 MicroVM 中。由于 Cube 暴露了 **与 E2B 兼容的 API**,把 LangChain 应用从 E2B 迁移到 Cube 通常只需改几个环境变量,同时还能为 diff --git a/docs/zh/guide/integrations/pi-agent.md b/docs/zh/guide/integrations/pi-agent.md index 4d55e8c9d..0213d6af5 100644 --- a/docs/zh/guide/integrations/pi-agent.md +++ b/docs/zh/guide/integrations/pi-agent.md @@ -12,8 +12,6 @@ lang: zh-CN # Pi Agent 集成指南 -[English](../../../guide/integrations/pi-agent.md) - 在 CubeSandbox MicroVM 内运行 [Pi coding agent](https://www.npmjs.com/package/@earendil-works/pi-coding-agent) (面向终端的 AI 编码 Agent)。本文覆盖镜像构建、密钥注入、出网管控,以及基于快照的会话持久化,配套的可运行示例位于 [`examples/pi-agent-integration`](https://github.com/TencentCloud/CubeSandbox/tree/master/examples/pi-agent-integration)。 diff --git a/docs/zh/guide/lifecycle.md b/docs/zh/guide/lifecycle.md index 4cecaa080..8df0ccf3d 100644 --- a/docs/zh/guide/lifecycle.md +++ b/docs/zh/guide/lifecycle.md @@ -38,7 +38,7 @@ Go:`cubesandbox.NeverTimeout`;Python:`from cubesandbox import NEVER_TIMEOU create() ┌────▼────┐ timeout & on_timeout=pause ┌─────────┐ ───────────────►│ running │ ──────────────────────────────►│ paused │ │ │◄──────── connect() 或 │ │ - └─┬─────┬─┘ auto_resume 触发的请求 └────┬────┘ + └─┬─────┬─┘ auto_resume 触发的请求 └────┬────┘ │ │ │ kill() │ │ timeout & on_timeout=kill │ kill() ────────────┘ └─────────────────┐ │ diff --git a/docs/zh/guide/multi-node-deploy.md b/docs/zh/guide/multi-node-deploy.md index bdf626b14..73516ad1e 100644 --- a/docs/zh/guide/multi-node-deploy.md +++ b/docs/zh/guide/multi-node-deploy.md @@ -191,7 +191,7 @@ sudo ./down.sh | `CUBE_SANDBOX_NETWORK_CIDR_SKIP_CONFLICT_CHECK` | `0` | 设为 `1` 跳过冲突检测(不推荐)。 | | `ONE_CLICK_RUN_QUICKCHECK` | `1` | 安装后是否执行健康检查 | -完整配置参考(构建选项、数据库、代理等)请参阅[本地构建部署 — 配置参考](./self-build-deploy.md#配置参考)。 +完整配置参考(构建选项、数据库、代理等)请参阅[本地构建部署 — 配置参考](./self-build-deploy.md#配置参考)。 ## 故障排查 diff --git a/docs/zh/guide/performance-benchmark.md b/docs/zh/guide/performance-benchmark.md index bf6d2faa7..136c180f9 100644 --- a/docs/zh/guide/performance-benchmark.md +++ b/docs/zh/guide/performance-benchmark.md @@ -1,5 +1,6 @@ # 性能测试 -详细的性能基准测试报告请参见博客: +详细的性能基准测试报告: -[CubeSandbox 核心操作性能基准测试报告](../blog/posts/2026-06-01-cubesandbox-perf-benchmark.md) +- [CubeSandbox 核心操作性能基准测试报告](../blog/posts/2026-06-01-cubesandbox-perf-benchmark.md) +- [CubeSandbox PVM 云服务器核心操作性能基准测试报告](../blog/posts/2026-06-03-cubesandbox-perf-benchmark-pvm.md) diff --git a/docs/zh/guide/self-build-deploy.md b/docs/zh/guide/self-build-deploy.md index 532e7b3e3..e446be504 100644 --- a/docs/zh/guide/self-build-deploy.md +++ b/docs/zh/guide/self-build-deploy.md @@ -69,7 +69,7 @@ cp /path/to/vmlinux deploy/one-click/assets/kernel-artifacts/ 在仓库根目录执行: ```bash -cd cube-sandbox +cd CubeSandbox ./deploy/one-click/build-release-bundle-builder.sh ``` diff --git a/docs/zh/guide/tutorials/bring-your-own-image.md b/docs/zh/guide/tutorials/bring-your-own-image.md index 52bf3d8e2..2817db861 100644 --- a/docs/zh/guide/tutorials/bring-your-own-image.md +++ b/docs/zh/guide/tutorials/bring-your-own-image.md @@ -7,8 +7,6 @@ [从 OCI 镜像制作模板](./template-from-image.md)。本教程是那篇文档的 **前置步骤**:保证你的镜像满足它所要求的探活 (readiness probe) 条件。 ---- - ## 1. 为什么我的镜像需要 `envd`? Cube-Sandbox 与沙箱容器之间的所有通信都是通过容器内的 `envd` 守护进程 @@ -26,8 +24,6 @@ Cube-Sandbox 与沙箱容器之间的所有通信都是通过容器内的 `envd` `:49983` 上监听**。最简单的方式就是直接基于官方 `cubesandbox-base` 构建——下一节就是完整流程。 ---- - ## 2. 快速开始:基于 `cubesandbox-base` `cubesandbox-base` 是一个普通的 `ubuntu:22.04`,在 `/usr/bin/envd` 预装 @@ -91,8 +87,6 @@ cubemastercli tpl create-from-image \ 为了保证可复现构建,**推荐 pin 到精确的 envd 版本 (`2026.16`)**。 ---- - ## 3. 备选:往现有镜像里注入 `envd` 如果你想使用你自定义的镜像,可以用 `COPY --from=` 从 `cubesandbox-base` @@ -136,8 +130,6 @@ CMD ["uvicorn", "app:app", "--app-dir", "/srv", "--host", "0.0.0.0", "--port", " 构建、推送、创建模板的流程和第 2.2 / 2.3 节一致。 ---- - ## 4. 入口脚本契约 `cube-entrypoint.sh` 实现了一个非常简单的 "envd 后台 + 用户应用前台" 的 @@ -178,8 +170,6 @@ CMD ["uvicorn", "app:app", "--app-dir", "/srv", "--host", "0.0.0.0", "--port", " exec "$@" ``` ---- - ## 5. 本地验证镜像(可选) 创建模板前,可以跑一遍 CI 用于验证 base 镜像的同款 smoke test: @@ -204,8 +194,6 @@ docker rm -f "$cid" docker exec "$cid" cat /var/log/envd.log ``` ---- - ## 6. 排错速查 | 现象 | 可能原因 | 解决 | @@ -218,8 +206,6 @@ docker exec "$cid" cat /var/log/envd.log | `sudo: command not found` | 基于 `-slim` / `-alpine` 这种无 sudo 的镜像构建 | `apt-get install -y sudo`,或直接把 `sudo` 从 CMD 里去掉——`cube-entrypoint.sh` 不依赖它 | | 模板创建长时间卡在 `PULLING` | registry 从 Cube 节点不可达 | 推送到集群可访问的 registry,或用 `--registry-username` / `--registry-password` | ---- - ## 7. 进阶 —— 自己重建基础镜像 基础镜像由仓库内单个 GitHub Actions workflow 自动构建: