diff --git a/.github/workflows/docs-request-trigger.yml b/.github/workflows/docs-request-trigger.yml index 7ca14c234..cece9e7a6 100644 --- a/.github/workflows/docs-request-trigger.yml +++ b/.github/workflows/docs-request-trigger.yml @@ -22,7 +22,7 @@ concurrency: jobs: # This workflow contains a single job called "build" build: - if: github.event.pull_request.merged == true + if: github.event_name != 'pull_request' || github.event.pull_request.merged == true # The type of runner that the job will run on runs-on: ubuntu-latest # work on CI script dir @@ -42,6 +42,18 @@ jobs: COMMIT_ID=$([ "${{ github.event_name }}" == "pull_request" ] && echo "${{ github.event.pull_request.head.sha }}" || echo "${{ github.sha }}") echo "Using Commit ID: $COMMIT_ID" echo "$GITHUB_REF" - PR_ID=$(echo "$GITHUB_REF" | sed 's@refs/pull/\([0-9]\+\)/.*@\1@') + # Extract PR ID correctly for different scenarios + if [[ "${{ github.event_name }}" == "pull_request" ]]; then + # For pull_request events, we can use the event payload + PR_ID="${{ github.event.pull_request.number }}" + else + # Try to extract PR ID from GITHUB_REF if it's in PR format + if [[ "$GITHUB_REF" =~ refs/pull/([0-9]+)/ ]]; then + PR_ID="${BASH_REMATCH[1]}" + else + # Generate a random value when no PR ID is found + PR_ID="random-$(date +%s)-$$" + fi + fi echo "PR ID is $PR_ID" ./trigger-docs.sh "$COMMIT_ID" "${{ secrets.CI_SECRET }}" "${{ github.event.pull_request.head.repo.clone_url }}" "$PR_ID" "${{ secrets.CHECK_USER_NAME }}" "${{ secrets.CHECK_TOKEN }}" \ No newline at end of file diff --git a/assets/rock_wechat.png b/assets/rock_wechat.png index fec040462..6ae5c4091 100644 Binary files a/assets/rock_wechat.png and b/assets/rock_wechat.png differ diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index 892d696d8..977f2f938 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -135,7 +135,7 @@ const config = { // Please change this to your repo. // Remove this to remove the "edit this page" links. editUrl: - 'https://github.com/alibaba/ROCK/tree/master/docs/rock/', + 'https://github.com/alibaba/ROCK/tree/master/docs/', showLastUpdateTime: true, sidebarItemsGenerator: async ({ defaultSidebarItemsGenerator, ...args }) => { const sidebarItems = await defaultSidebarItemsGenerator(args); diff --git a/docs/i18n/zh-Hans/code.json b/docs/i18n/zh-Hans/code.json index 2e55b7a71..03099ac15 100644 --- a/docs/i18n/zh-Hans/code.json +++ b/docs/i18n/zh-Hans/code.json @@ -360,5 +360,113 @@ "theme.tags.tagsPageTitle": { "message": "标签", "description": "The title of the tag list page" + }, + "Get Started": { + "message": "快速入门" + }, + "ABOUT ROCK": { + "message": "关于 ROCK" + }, + "ROCK (Reinforcement Open Construction Kit) is": { + "message": "ROCK (Reinforcement Open Construction Kit) 是" + }, + "an AI-powered reinforcement learning environment platform": { + "message": "一个由人工智能驱动的强化学习环境平台" + }, + "that offers standardized infrastructure, intelligent model services, TPP access, and a rich set of built-in scenarios, enabling developers to rapidly conduct RL training tasks.": { + "message": ",该平台提供标准化的基础设施、智能模型服务、TPP 接入以及丰富的内置场景,使开发者能够快速开展强化学习训练任务。" + }, + "AI Intelligence": { + "message": "AI 智能" + }, + "Cloud Native": { + "message": "云原生" + }, + "Standardization": { + "message": "标准化" + }, + "CORE FEATURES": { + "message": "核心特性" + }, + "Multi-Protocol Action Support": { + "message": "多协议动作支持" + }, + "Supports multiple action protocols including GEM, Bash, and Chat.": { + "message": "支持多种动作协议,包括 GEM、Bash 和 Chat。" + }, + "Sandbox Runtime": { + "message": "沙箱运行时" + }, + "Stateful runtime environments with multiple isolation mechanisms to ensure consistency and security": { + "message": "具有多种隔离机制的有状态运行时环境,以确保一致性和安全性" + }, + "Flexible Deployment": { + "message": "灵活部署" + }, + "Supports different deployment methods for diverse environment and OS": { + "message": "支持针对不同环境和操作系统的多种部署方式" + }, + "Unified SDK Interface": { + "message": "统一 SDK 接口" + }, + "Clean Python SDK for Env and Sandbox interaction": { + "message": "简洁的 Python SDK,用于环境和沙箱交互" + }, + "Layered Service Architecture": { + "message": "分层服务架构" + }, + "Distributed Admin, Worker, and Rocklet architecture for scalable resource management": { + "message": "分布式 Admin、Worker 和 Rocklet 架构,实现可扩展的资源管理" + }, + "Efficient Resource Management": { + "message": "高效资源管理" + }, + "Automatic sandbox lifecycle management with configurable resource allocation": { + "message": "自动化的沙箱生命周期管理,支持可配置的资源分配" + }, + "ROCK Open Source Community": { + "message": "ROCK 开源社区" + }, + "Stars": { + "message": "星标" + }, + "Contributors": { + "message": "贡献者" + }, + "PRs": { + "message": "PRs" + }, + "The two work together to form a complete closed loop for intelligent agent training.": { + "message": "两者协同工作,形成智能体训练的完整闭环。" + }, + "We welcome contributions from the community!": { + "message": "我们欢迎社区的贡献!" + }, + "how to get involved": { + "message": "如何参与" + }, + "fork the repository and create a feature branch to make your changes; if applicable, add tests, and then submit a pull request.": { + "message": "fork 仓库并创建特性分支进行修改;如适用,添加测试,然后提交 pull request。" + }, + "Please use the GitHub issue tracker to report bugs or suggest features.": { + "message": "请使用 GitHub issue 追踪器报告错误或建议新功能。" + }, + "Follow existing code style and conventions. Please run tests before submitting pull requests.": { + "message": "遵循现有的代码风格和约定。请在提交 pull request 之前运行测试。" + }, + "GitHub Repository": { + "message": "GitHub 仓库" + }, + "WeChat": { + "message": "微信群" + }, + "Follow us on X": { + "message": "关注我们的 X 账号" + }, + "Home": { + "message": "首页" + }, + "Docs": { + "message": "文档" } -} +} \ No newline at end of file diff --git a/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-0.2.x.json b/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-0.2.x.json index 8ab672287..bc97984c0 100644 --- a/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-0.2.x.json +++ b/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-0.2.x.json @@ -1,7 +1,7 @@ { "version.label": { "message": "0.2.x", - "description": "The label for version current" + "description": "The label for version 0.2.x" }, "sidebar.tutorialSidebar.category.Getting Started": { "message": "快速上手", @@ -23,4 +23,4 @@ "message": "Python SDK 参考", "description": "The label for category 'Python SDK References' in sidebar 'tutorialSidebar'" } -} \ No newline at end of file +} diff --git a/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-0.2.x/Getting Started/installation.md b/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-0.2.x/Getting Started/installation.md index 50368c151..0ab70e55d 100644 --- a/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-0.2.x/Getting Started/installation.md +++ b/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-0.2.x/Getting Started/installation.md @@ -2,7 +2,7 @@ sidebar_position: 3 --- -# 安装 +# 安装指南 本文档介绍如何使用 `uv` 和 `pip` 安装和设置 ROCK 开发环境。该项目是一个强化学习开放构建工具包,支持多种组件。 diff --git a/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-0.2.x/Getting Started/quickstart.md b/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-0.2.x/Getting Started/quickstart.md index 1fe3dfe7d..70eb3ec9b 100644 --- a/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-0.2.x/Getting Started/quickstart.md +++ b/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-0.2.x/Getting Started/quickstart.md @@ -6,28 +6,10 @@ sidebar_position: 2 本指南将通过完整的示例演示如何使用 ROCK 创建和管理强化学习环境。ROCK (Reinforcement Open Construction Kit) 是一个全面的沙箱环境管理框架,主要用于强化学习和AI开发环境。 -## 目录 - -- [快速上手](#快速上手) - - [目录](#目录) - - [1. 环境准备](#1-环境准备) - - [1.1 系统要求](#11-系统要求) - - [1.2 验证依赖安装](#12-验证依赖安装) - - [1.3 项目初始化](#13-项目初始化) - - [2. 激活虚拟环境](#2-激活虚拟环境) - - [3. 验证环境配置](#3-验证环境配置) - - [4. 启动 ROCK 服务](#4-启动-rock-服务) - - [5. 运行示例环境](#5-运行示例环境) - - [5.1 示例说明](#51-示例说明) - - [6. 分布式环境配置(可选)](#6-分布式环境配置可选) - - [7. MacOS 启动](#7-macos-启动) - - [8. 从Pip源启动](#8-从pip源启动) - - [总结](#总结) - - [下一步学习](#下一步学习) ## 1. 环境准备 -我们推荐在 Linux 系统下启动 ROCK,能够尽量复用项目依赖,提升环境拉起速度。如果需要在 macOS 上尝试,可以参考 [MacOS 启动](#7-macos启动) 一节。 +我们推荐在 Linux 系统下启动 ROCK,能够尽量复用项目依赖,提升环境拉起速度。如果需要在 macOS 上尝试,可以参考 [MacOS 启动](#7-macos-启动) 一节。 在开始之前,请确保您的系统已安装以下依赖项: @@ -87,7 +69,7 @@ python -c "import sys; print('Base prefix:', sys.base_prefix)" ```bash # 检查关键依赖 -python -c "import rock; print("Hello ROCK") +python -c "import rock; print(\"Hello ROCK\")" ``` @@ -154,14 +136,14 @@ python examples/sokoban_demo.py export ROCK_WORKER_ENV_TYPE=uv ``` -在容器启动时,会安装对应的 uv 环境,细节可以参考 `rock/rocklet/docker_run_with_uv.sh` 脚本。 +在容器启动时,会安装对应的 uv 环境,细节可以参考 `rock/rocklet/local_files/docker_run_with_uv.sh` 脚本。 > **注意**: 相比 Linux 系统,macOS 上的启动速度会较慢,且比较依赖网络环境,可以根据实际情况调整脚本。ROCK_WORKER_ENV_TYPE的细节可以参考 [Configuration Guide](../User%20Guides/configuration.md). ## 8. 从Pip源启动 -如果从Pip源启动Admin Server,在参照[installation.md](./installation.md)安装完成ROCK后, 需要设置额外环境变量: +如果从Pip源启动Admin Server,在参照[安装指南](./installation.md)安装完成ROCK后, 需要设置额外环境变量: ```bash export ROCK_WORKER_ENV_TYPE=pip diff --git a/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-0.2.x/Getting Started/rockroll.md b/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-0.2.x/Getting Started/rockroll.md index d53a6dbc4..3b53810ba 100644 --- a/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-0.2.x/Getting Started/rockroll.md +++ b/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-0.2.x/Getting Started/rockroll.md @@ -105,7 +105,7 @@ bash examples/agentic_demo/run_agentic_pipeline_sokoban_sandbox_single_node.sh 为获得最佳兼容性,推荐使用 ROLL 官方提供的基础 Docker 镜像,因为它们已经预装了匹配的 CUDA、cuDNN 和其他基础库。 -> [ROLL 官方镜像列表](https://alibaba.github.io/ROLL/docs/English/QuickStart/) +> [ROLL 官方镜像列表](https://alibaba.github.io/ROLL/zh-Hans/docs/Getting%20Started/Installation/image_address/) #### 注意 @@ -142,7 +142,7 @@ bash examples/agentic_demo/run_agentic_pipeline_sokoban_sandbox_single_node.sh ### 3.1 在机器 A 上部署 ROCK 服务 -在一台独立的机器(或容器)上,参照[ROCK快速指南](https://rock.io.alibaba-inc.com/docs/rock/CN/quickstart)部署并启动 ROCK 服务。 +在一台独立的机器(或容器)上,参照[ROCK快速指南](./quickstart.md)部署并启动 ROCK 服务。 > **重要提示** > 启动服务后,请记下ROCK服务的IP地址和端口,例如`http://192.168.1.10:8000`,后续步骤将需要这个地址。 diff --git a/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-0.2.x/References/Python SDK References/python_sdk.md b/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-0.2.x/References/Python SDK References/python_sdk.md index 388cb37be..3b816b751 100644 --- a/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-0.2.x/References/Python SDK References/python_sdk.md +++ b/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-0.2.x/References/Python SDK References/python_sdk.md @@ -6,19 +6,6 @@ sidebar_position: 2 本指南详细介绍如何使用 ROCK SDK 进行开发,包括沙箱环境管理和 GEM 环境交互。 -## 目录 - -- [Python SDK 参考](#python-sdk-参考) - - [目录](#目录) - - [1. 概述](#1-概述) - - [2. Sandbox SDK](#2-sandbox-sdk) - - [2.1 基本沙箱操作](#21-基本沙箱操作) - - [3.2 沙箱组管理](#32-沙箱组管理) - - [相关文档](#相关文档) - - [3.3 配置示例](#33-配置示例) - - [4. GEM SDK](#4-gem-sdk) - - [4.1 Python SDK 方式](#41-python-sdk-方式) - ## 1. 概述 ROCK SDK为开发者提供了便捷的Python接口来使用ROCK平台的功能,包括沙箱环境管理和GEM环境交互。 diff --git a/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-0.2.x/References/api.md b/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-0.2.x/References/api.md index 0200ed969..420b13198 100644 --- a/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-0.2.x/References/api.md +++ b/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-0.2.x/References/api.md @@ -6,28 +6,6 @@ sidebar_position: 1 本指南详细介绍 ROCK 平台提供的核心 API 服务,包括沙箱环境管理和 GEM 环境交互。 -## 目录 - -- [API 参考](#api-参考) - - [目录](#目录) - - [1. 概述](#1-概述) - - [2. Sandbox API](#2-sandbox-api) - - [沙箱管理接口](#沙箱管理接口) - - [命令执行接口](#命令执行接口) - - [文件操作接口](#文件操作接口) - - [3. GEM API](#3-gem-api) - - [相关文档](#相关文档) - - [4. HTTP API 使用示例](#4-http-api-使用示例) - - [4.1 Sandbox API 示例](#41-sandbox-api-示例) - - [启动沙箱](#启动沙箱) - - [异步启动沙箱](#异步启动沙箱) - - [执行命令](#执行命令) - - [创建会话](#创建会话) - - [在会话中执行命令](#在会话中执行命令) - - [上传文件](#上传文件) - - [停止沙箱](#停止沙箱) - - [4.2 GEM API 示例](#42-gem-api-示例) - ## 1. 概述 ROCK平台提供两种核心API服务: @@ -106,14 +84,6 @@ GEM环境交互功能: 4. **Close Environment** - 关闭GEM环境 - 释放GEM环境资源 -## 相关文档 - -- [快速开始指南](../Getting%20Started/quickstart.md) - 了解如何快速开始使用 ROCK API -- [Python SDK 文档](./Python%20SDK%20References/python_sdk.md) - 学习如何使用 SDK 调用 API -- [配置指南](../User%20Guides/configuration.md) - 了解 API 相关的配置选项 -- [安装指南](../Getting%20Started/installation.md) - 详细了解 ROCK 安装和配置 - - ## 4. HTTP API 使用示例 ### 4.1 Sandbox API 示例 @@ -214,4 +184,11 @@ curl -X POST 'http://localhost:8080/apis/v1/envs/gem/step' \ curl -X POST 'http://localhost:8080/apis/v1/envs/gem/close' \ -H 'Content-Type: application/json' \ -d '{"sandbox_id": "sandbox-12345"}' -``` \ No newline at end of file +``` + +## 相关文档 + +- [快速开始指南](../Getting%20Started/quickstart.md) - 了解如何快速开始使用 ROCK API +- [Python SDK 文档](./Python%20SDK%20References/python_sdk.md) - 学习如何使用 SDK 调用 API +- [配置指南](../User%20Guides/configuration.md) - 了解 API 相关的配置选项 +- [安装指南](../Getting%20Started/installation.md) - 详细了解 ROCK 安装和配置 \ No newline at end of file diff --git a/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-0.2.x/User Guides/configuration.md b/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-0.2.x/User Guides/configuration.md index 6e134ccc2..a212189bc 100644 --- a/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-0.2.x/User Guides/configuration.md +++ b/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-0.2.x/User Guides/configuration.md @@ -6,13 +6,6 @@ sidebar_position: 4 本指南详细介绍如何配置 ROCK 环境以满足不同的使用需求,包括本地开发、测试和生产部署。 -## 目录 - -- [环境变量配置](#1-环境变量配置) - - [运行时环境](#11-运行时环境) - - [日志配置](#12-日志配置) -- [分布式部署要求](#2-分布式部署要求) - ## 1. 环境变量配置 ROCK 支持通过环境变量配置关键参数。以下是主要的环境变量: diff --git a/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-0.2.x/overview.md b/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-0.2.x/overview.md index 4d209b6e3..a02536f50 100644 --- a/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-0.2.x/overview.md +++ b/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-0.2.x/overview.md @@ -6,16 +6,6 @@ sidebar_position: 1 ROCK (Reinforcement Open Construction Kit) 是一个开源的强化学习环境开发框架,旨在简化强化学习环境的开发、部署和管理流程。 -## 目录 - -- [概览](#概览) - - [目录](#目录) - - [什么是 ROCK](#什么是-rock) - - [ROCK 的核心功能](#rock-的核心功能) - - [ROCK 的价值](#rock-的价值) - - [了解更多](#了解更多) - - [相关文档](#相关文档) - ## 什么是 ROCK ROCK (Reinforcement Open Construction Kit) 是一个开源强化学习环境开发框架。通过使用 ROCK,开发者可以快速地开发强化学习环境,并结合其他强化学习训练框架,实现高效的强化学习训练。 @@ -35,14 +25,6 @@ ROCK 为不同角色的工程师提供了显著价值: - **强化学习算法工程师**:ROCK 可以简化强化学习环境的开发流程,让工程师专注于算法实现 - **强化学习应用工程师**:ROCK 可以进行快速强化学习环境的大规模部署,提高应用开发效率 -## 了解更多 - -- [快速开始指南](./Getting%20Started/quickstart.md) - 快速上手 ROCK -- [配置指南](./User%20Guides/configuration.md) - 详细了解 ROCK 的配置选项 -- [API 文档](./References/api.md) - 查看 ROCK 提供的 API 接口 -- [Python SDK 文档](./References/Python%20SDK%20References/python_sdk.md) - 学习如何使用 ROCK 的 Python SDK -- [安装指南](./Getting%20Started/installation.md) - 详细了解 ROCK 安装和配置 - ## 相关文档 如果您是第一次使用 ROCK,建议按以下顺序阅读文档: diff --git a/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-1.0.x.json b/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-1.0.x.json index 06f3df300..92a3ec073 100644 --- a/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-1.0.x.json +++ b/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-1.0.x.json @@ -1,7 +1,7 @@ { "version.label": { "message": "1.0.x", - "description": "The label for version current" + "description": "The label for version 1.0.x" }, "sidebar.tutorialSidebar.category.Getting Started": { "message": "快速上手", @@ -26,5 +26,9 @@ "sidebar.tutorialSidebar.category.sandbox-agent": { "message": "Sandbox Agent参考", "description": "The label for category 'Sandbox Agent References' in sidebar 'tutorialSidebar'" + }, + "sidebar.tutorialSidebar.category.Python SDK References": { + "message": "Python SDK 参考", + "description": "The label for category 'Python SDK References' in sidebar 'tutorialSidebar'" } } \ No newline at end of file diff --git a/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-1.0.x/Getting Started/installation.md b/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-1.0.x/Getting Started/installation.md index 50368c151..0ab70e55d 100644 --- a/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-1.0.x/Getting Started/installation.md +++ b/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-1.0.x/Getting Started/installation.md @@ -2,7 +2,7 @@ sidebar_position: 3 --- -# 安装 +# 安装指南 本文档介绍如何使用 `uv` 和 `pip` 安装和设置 ROCK 开发环境。该项目是一个强化学习开放构建工具包,支持多种组件。 diff --git a/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-1.0.x/Getting Started/quickstart.md b/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-1.0.x/Getting Started/quickstart.md index 1fe3dfe7d..e49489662 100644 --- a/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-1.0.x/Getting Started/quickstart.md +++ b/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-1.0.x/Getting Started/quickstart.md @@ -6,28 +6,9 @@ sidebar_position: 2 本指南将通过完整的示例演示如何使用 ROCK 创建和管理强化学习环境。ROCK (Reinforcement Open Construction Kit) 是一个全面的沙箱环境管理框架,主要用于强化学习和AI开发环境。 -## 目录 - -- [快速上手](#快速上手) - - [目录](#目录) - - [1. 环境准备](#1-环境准备) - - [1.1 系统要求](#11-系统要求) - - [1.2 验证依赖安装](#12-验证依赖安装) - - [1.3 项目初始化](#13-项目初始化) - - [2. 激活虚拟环境](#2-激活虚拟环境) - - [3. 验证环境配置](#3-验证环境配置) - - [4. 启动 ROCK 服务](#4-启动-rock-服务) - - [5. 运行示例环境](#5-运行示例环境) - - [5.1 示例说明](#51-示例说明) - - [6. 分布式环境配置(可选)](#6-分布式环境配置可选) - - [7. MacOS 启动](#7-macos-启动) - - [8. 从Pip源启动](#8-从pip源启动) - - [总结](#总结) - - [下一步学习](#下一步学习) - ## 1. 环境准备 -我们推荐在 Linux 系统下启动 ROCK,能够尽量复用项目依赖,提升环境拉起速度。如果需要在 macOS 上尝试,可以参考 [MacOS 启动](#7-macos启动) 一节。 +我们推荐在 Linux 系统下启动 ROCK,能够尽量复用项目依赖,提升环境拉起速度。如果需要在 macOS 上尝试,可以参考 [MacOS 启动](#7-macos-启动) 一节。 在开始之前,请确保您的系统已安装以下依赖项: @@ -87,7 +68,7 @@ python -c "import sys; print('Base prefix:', sys.base_prefix)" ```bash # 检查关键依赖 -python -c "import rock; print("Hello ROCK") +python -c "import rock; print(\"Hello ROCK\")" ``` @@ -154,14 +135,14 @@ python examples/sokoban_demo.py export ROCK_WORKER_ENV_TYPE=uv ``` -在容器启动时,会安装对应的 uv 环境,细节可以参考 `rock/rocklet/docker_run_with_uv.sh` 脚本。 +在容器启动时,会安装对应的 uv 环境,细节可以参考 `rock/rocklet/local_files/docker_run_with_uv.sh` 脚本。 > **注意**: 相比 Linux 系统,macOS 上的启动速度会较慢,且比较依赖网络环境,可以根据实际情况调整脚本。ROCK_WORKER_ENV_TYPE的细节可以参考 [Configuration Guide](../User%20Guides/configuration.md). ## 8. 从Pip源启动 -如果从Pip源启动Admin Server,在参照[installation.md](./installation.md)安装完成ROCK后, 需要设置额外环境变量: +如果从Pip源启动Admin Server,在参照[安装指南](./installation.md)安装完成ROCK后, 需要设置额外环境变量: ```bash export ROCK_WORKER_ENV_TYPE=pip diff --git a/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-1.0.x/Getting Started/rockroll.md b/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-1.0.x/Getting Started/rockroll.md index d53a6dbc4..3b53810ba 100644 --- a/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-1.0.x/Getting Started/rockroll.md +++ b/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-1.0.x/Getting Started/rockroll.md @@ -105,7 +105,7 @@ bash examples/agentic_demo/run_agentic_pipeline_sokoban_sandbox_single_node.sh 为获得最佳兼容性,推荐使用 ROLL 官方提供的基础 Docker 镜像,因为它们已经预装了匹配的 CUDA、cuDNN 和其他基础库。 -> [ROLL 官方镜像列表](https://alibaba.github.io/ROLL/docs/English/QuickStart/) +> [ROLL 官方镜像列表](https://alibaba.github.io/ROLL/zh-Hans/docs/Getting%20Started/Installation/image_address/) #### 注意 @@ -142,7 +142,7 @@ bash examples/agentic_demo/run_agentic_pipeline_sokoban_sandbox_single_node.sh ### 3.1 在机器 A 上部署 ROCK 服务 -在一台独立的机器(或容器)上,参照[ROCK快速指南](https://rock.io.alibaba-inc.com/docs/rock/CN/quickstart)部署并启动 ROCK 服务。 +在一台独立的机器(或容器)上,参照[ROCK快速指南](./quickstart.md)部署并启动 ROCK 服务。 > **重要提示** > 启动服务后,请记下ROCK服务的IP地址和端口,例如`http://192.168.1.10:8000`,后续步骤将需要这个地址。 diff --git a/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-1.0.x/References/Python SDK References/python_sdk.md b/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-1.0.x/References/Python SDK References/python_sdk.md index 388cb37be..96d41e489 100644 --- a/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-1.0.x/References/Python SDK References/python_sdk.md +++ b/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-1.0.x/References/Python SDK References/python_sdk.md @@ -6,19 +6,6 @@ sidebar_position: 2 本指南详细介绍如何使用 ROCK SDK 进行开发,包括沙箱环境管理和 GEM 环境交互。 -## 目录 - -- [Python SDK 参考](#python-sdk-参考) - - [目录](#目录) - - [1. 概述](#1-概述) - - [2. Sandbox SDK](#2-sandbox-sdk) - - [2.1 基本沙箱操作](#21-基本沙箱操作) - - [3.2 沙箱组管理](#32-沙箱组管理) - - [相关文档](#相关文档) - - [3.3 配置示例](#33-配置示例) - - [4. GEM SDK](#4-gem-sdk) - - [4.1 Python SDK 方式](#41-python-sdk-方式) - ## 1. 概述 ROCK SDK为开发者提供了便捷的Python接口来使用ROCK平台的功能,包括沙箱环境管理和GEM环境交互。 @@ -72,7 +59,7 @@ if __name__ == "__main__": asyncio.run(run_sandbox()) ``` -### 3.2 沙箱组管理 +### 2.2 沙箱组管理 ```python from rock.sdk.sandbox.config import SandboxGroupConfig @@ -96,14 +83,7 @@ for sandbox in sandbox_group.sandbox_list: await sandbox_group.stop() ``` -## 相关文档 - -- [快速开始指南](../../Getting%20Started/quickstart.md) - 了解如何快速开始使用 ROCK SDK -- [API 文档](../api.md) - 查看 SDK 封装的底层 API 接口 -- [配置指南](../../User%20Guides/configuration.md) - 了解 SDK 相关的配置选项 -- [安装指南](../../Getting%20Started/installation.md) - 详细了解 ROCK 安装和配置 - -### 3.3 配置示例 +### 2.3 配置示例 ```python config = SandboxConfig( @@ -113,9 +93,9 @@ config = SandboxConfig( ) ``` -## 4. GEM SDK +## 3. GEM SDK -### 4.1 Python SDK 方式 +### 3.1 Python SDK 方式 ```python import random @@ -180,4 +160,11 @@ if __name__ == "__main__": + "\n" ) main() -``` \ No newline at end of file +``` + +## 相关文档 + +- [快速开始指南](../../Getting%20Started/quickstart.md) - 了解如何快速开始使用 ROCK SDK +- [API 文档](../api.md) - 查看 SDK 封装的底层 API 接口 +- [配置指南](../../User%20Guides/configuration.md) - 了解 SDK 相关的配置选项 +- [安装指南](../../Getting%20Started/installation.md) - 详细了解 ROCK 安装和配置 \ No newline at end of file diff --git a/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-1.0.x/References/api.md b/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-1.0.x/References/api.md index 0200ed969..06f44c326 100644 --- a/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-1.0.x/References/api.md +++ b/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-1.0.x/References/api.md @@ -6,28 +6,6 @@ sidebar_position: 1 本指南详细介绍 ROCK 平台提供的核心 API 服务,包括沙箱环境管理和 GEM 环境交互。 -## 目录 - -- [API 参考](#api-参考) - - [目录](#目录) - - [1. 概述](#1-概述) - - [2. Sandbox API](#2-sandbox-api) - - [沙箱管理接口](#沙箱管理接口) - - [命令执行接口](#命令执行接口) - - [文件操作接口](#文件操作接口) - - [3. GEM API](#3-gem-api) - - [相关文档](#相关文档) - - [4. HTTP API 使用示例](#4-http-api-使用示例) - - [4.1 Sandbox API 示例](#41-sandbox-api-示例) - - [启动沙箱](#启动沙箱) - - [异步启动沙箱](#异步启动沙箱) - - [执行命令](#执行命令) - - [创建会话](#创建会话) - - [在会话中执行命令](#在会话中执行命令) - - [上传文件](#上传文件) - - [停止沙箱](#停止沙箱) - - [4.2 GEM API 示例](#42-gem-api-示例) - ## 1. 概述 ROCK平台提供两种核心API服务: @@ -106,14 +84,6 @@ GEM环境交互功能: 4. **Close Environment** - 关闭GEM环境 - 释放GEM环境资源 -## 相关文档 - -- [快速开始指南](../Getting%20Started/quickstart.md) - 了解如何快速开始使用 ROCK API -- [Python SDK 文档](./Python%20SDK%20References/python_sdk.md) - 学习如何使用 SDK 调用 API -- [配置指南](../User%20Guides/configuration.md) - 了解 API 相关的配置选项 -- [安装指南](../Getting%20Started/installation.md) - 详细了解 ROCK 安装和配置 - - ## 4. HTTP API 使用示例 ### 4.1 Sandbox API 示例 @@ -214,4 +184,11 @@ curl -X POST 'http://localhost:8080/apis/v1/envs/gem/step' \ curl -X POST 'http://localhost:8080/apis/v1/envs/gem/close' \ -H 'Content-Type: application/json' \ -d '{"sandbox_id": "sandbox-12345"}' -``` \ No newline at end of file +``` + +## 相关文档 + +- [快速开始指南](../Getting%20Started/quickstart.md) - 了解如何快速开始使用 ROCK API +- [Python SDK 文档](./Python%20SDK%20References/python_sdk.md) - 学习如何使用 SDK 调用 API +- [配置指南](../User%20Guides/configuration.md) - 了解 API 相关的配置选项 +- [安装指南](../Getting%20Started/installation.md) - 详细了解 ROCK 安装和配置 diff --git a/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-1.0.x/User Guides/configuration.md b/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-1.0.x/User Guides/configuration.md index 6e134ccc2..a212189bc 100644 --- a/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-1.0.x/User Guides/configuration.md +++ b/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-1.0.x/User Guides/configuration.md @@ -6,13 +6,6 @@ sidebar_position: 4 本指南详细介绍如何配置 ROCK 环境以满足不同的使用需求,包括本地开发、测试和生产部署。 -## 目录 - -- [环境变量配置](#1-环境变量配置) - - [运行时环境](#11-运行时环境) - - [日志配置](#12-日志配置) -- [分布式部署要求](#2-分布式部署要求) - ## 1. 环境变量配置 ROCK 支持通过环境变量配置关键参数。以下是主要的环境变量: diff --git a/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-1.0.x/overview.md b/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-1.0.x/overview.md index 4d209b6e3..a02536f50 100644 --- a/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-1.0.x/overview.md +++ b/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/version-1.0.x/overview.md @@ -6,16 +6,6 @@ sidebar_position: 1 ROCK (Reinforcement Open Construction Kit) 是一个开源的强化学习环境开发框架,旨在简化强化学习环境的开发、部署和管理流程。 -## 目录 - -- [概览](#概览) - - [目录](#目录) - - [什么是 ROCK](#什么是-rock) - - [ROCK 的核心功能](#rock-的核心功能) - - [ROCK 的价值](#rock-的价值) - - [了解更多](#了解更多) - - [相关文档](#相关文档) - ## 什么是 ROCK ROCK (Reinforcement Open Construction Kit) 是一个开源强化学习环境开发框架。通过使用 ROCK,开发者可以快速地开发强化学习环境,并结合其他强化学习训练框架,实现高效的强化学习训练。 @@ -35,14 +25,6 @@ ROCK 为不同角色的工程师提供了显著价值: - **强化学习算法工程师**:ROCK 可以简化强化学习环境的开发流程,让工程师专注于算法实现 - **强化学习应用工程师**:ROCK 可以进行快速强化学习环境的大规模部署,提高应用开发效率 -## 了解更多 - -- [快速开始指南](./Getting%20Started/quickstart.md) - 快速上手 ROCK -- [配置指南](./User%20Guides/configuration.md) - 详细了解 ROCK 的配置选项 -- [API 文档](./References/api.md) - 查看 ROCK 提供的 API 接口 -- [Python SDK 文档](./References/Python%20SDK%20References/python_sdk.md) - 学习如何使用 ROCK 的 Python SDK -- [安装指南](./Getting%20Started/installation.md) - 详细了解 ROCK 安装和配置 - ## 相关文档 如果您是第一次使用 ROCK,建议按以下顺序阅读文档: diff --git a/docs/package.json b/docs/package.json index 8534efb8e..db0654fcf 100644 --- a/docs/package.json +++ b/docs/package.json @@ -25,6 +25,7 @@ "octokit": "^5.0.5", "prism-react-renderer": "^2.3.0", "react": "^19.0.0", + "react-countup": "^6.5.3", "react-dom": "^19.0.0" }, "devDependencies": { @@ -46,4 +47,4 @@ "engines": { "node": ">=20.0" } -} \ No newline at end of file +} diff --git a/docs/src/components/HomePage/Header/index.js b/docs/src/components/HomePage/Header/index.js new file mode 100644 index 000000000..5687b6c77 --- /dev/null +++ b/docs/src/components/HomePage/Header/index.js @@ -0,0 +1,79 @@ +import React from 'react'; +import { useThemeConfig } from '@docusaurus/theme-common'; +import useBaseUrl from '@docusaurus/useBaseUrl'; +import Translate from '@docusaurus/Translate'; + +import styles from './styles.module.css'; + +const Header = ({ locale }) => { + const { + navbar: { logo }, + } = useThemeConfig(); + const isChinese = locale !== 'en'; + console.log('locale', locale, isChinese); + + const toggleLanguage = () => { + handleNavigation(isChinese ? '/ROCK/' : '/ROCK/zh-Hans/'); + }; + + const handleNavigation = (url) => { + if (url.startsWith('http')) { + window.open(url, '_blank'); + } else { + window.location.href = url; + } + }; + + return ( +
+
+ {/* Logo和文案区域 */} +
+
+
+ logo +
+
+
+
ROCK
+
Reinforcement Open Construction Kit
+
+
+ + {/* 导航按钮区域 */} +
+ + + + +
+
+
+ ); +}; + +export default Header; diff --git a/docs/src/components/HomePage/Header/styles.module.css b/docs/src/components/HomePage/Header/styles.module.css new file mode 100644 index 000000000..57eaed940 --- /dev/null +++ b/docs/src/components/HomePage/Header/styles.module.css @@ -0,0 +1,191 @@ +.header { + position: fixed; + top: 20px; + left: 50%; + transform: translateX(-50%); + z-index: 1000; +} + +.container { + width: 774px; + height: 64px; + background: rgba(0, 0, 0, 0.7); + backdrop-filter: blur(20px); + -webkit-backdrop-filter: blur(20px); + border-radius: 32px; + border: 1px solid rgba(255, 255, 255, 0.1); + display: flex; + align-items: center; + justify-content: space-between; + padding: 0 32px; + box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); + transition: all 0.3s ease; +} + +.container:hover { + background: rgba(0, 0, 0, 0.9); + box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4); +} + +/* Logo区域 */ +.logoSection { + display: flex; + align-items: center; + gap: 10px; +} + +.logo { + width: 40px; + height: 40px; + display: flex; + align-items: center; + justify-content: center; +} + +.logoIcon { + width: 40px; + height: 40px; + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + color: white; + font-weight: bold; + font-size: 16px; + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; +} + +.textSection { + display: flex; + flex-direction: column; + gap: 2px; +} + +.primaryText { + color: white; + font-size: 16px; + font-weight: 700; + line-height: 1.2; + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; +} + +.secondaryText { + color: rgba(255, 255, 255, 0.7); + font-size: 12px; + font-weight: 400; + line-height: 1.2; + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; +} + +/* 导航区域 */ +.navSection { + display: flex; + align-items: center; + gap: 8px; +} + +.navButton { + background: transparent; + border: none; + color: rgba(255, 255, 255, 0.8); + font-size: 16px; + font-weight: 500; + padding: 8px 16px; + border-radius: 20px; + cursor: pointer; + transition: all 0.2s ease; + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; +} + +.navButton:hover { + background: rgba(255, 255, 255, 0.1); + color: white; + transform: translateY(-1px); +} + +.navButton:active { + transform: translateY(0); +} + +.languageButton { + background: rgba(255, 255, 255, 0.1); + border: 1px solid rgba(255, 255, 255, 0.2); + color: white; + font-size: 16px; + font-weight: 500; + padding: 5px; + border-radius: 20px; + cursor: pointer; + transition: all 0.2s ease; + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; + min-width: 20px; +} + +.languageButton:hover { + background: rgba(255, 255, 255, 0.2); + border-color: rgba(255, 255, 255, 0.3); + transform: translateY(-1px); +} + +.languageButton:active { + transform: translateY(0); +} + +/* 响应式设计 */ +@media (max-width: 800px) { + .container { + width: 90vw; + max-width: 600px; + padding: 0 20px; + } + + .logoSection { + gap: 12px; + } + + .logo { + width: 40px; + height: 40px; + } + + .logoIcon { + width: 32px; + height: 32px; + font-size: 16px; + } + + .primaryText { + font-size: 16px; + } + + .secondaryText { + font-size: 10px; + } + + .navSection { + gap: 4px; + } + + .navButton, + .languageButton { + font-size: 12px; + padding: 6px 12px; + } +} + +@media (max-width: 600px) { + .container { + height: 70px; + padding: 0 16px; + } + + .secondaryText { + display: none; + } + + .navButton, + .languageButton { + font-size: 11px; + padding: 5px 10px; + } +} diff --git a/docs/src/components/HomePage/index.js b/docs/src/components/HomePage/index.js new file mode 100644 index 000000000..0db6e29cd --- /dev/null +++ b/docs/src/components/HomePage/index.js @@ -0,0 +1,361 @@ +import React, { useState, useEffect, useRef } from 'react'; +import { Button, Image, Modal, ConfigProvider, theme } from 'antd'; +import { GithubOutlined, WechatOutlined, XOutlined } from '@ant-design/icons'; +import clsx from 'clsx'; +import dayjs from 'dayjs'; +import CountUp from 'react-countup'; +import Translate from '@docusaurus/Translate'; +import Header from './Header'; + +import styles from './styles.module.css'; + +export default ({ currentLocale }) => { + const [open, setOpen] = useState(false); + const aboutRef = useRef(null); + const featuresRef = useRef(null); + const opensourceRef = useRef(null); + const rockRollRef = useRef(null); + const communityRef = useRef(null); + const [todayStat, setTodayStat] = useState({}); + const [startCounting, setStartCounting] = useState(false); + const today = dayjs().format('YYYY-MM-DD'); + const isChinese = currentLocale !== 'en'; + + useEffect(() => { + const observerOptions = { + root: null, + rootMargin: '0px', + threshold: 0.5 + }; + + const observer = new IntersectionObserver((entries) => { + entries.forEach(entry => { + if (entry.isIntersecting) { + entry.target.classList.add(styles.visible); + // 当开源社区统计区域可见时,开始计数 + if (entry.target === opensourceRef.current) { + setStartCounting(true); + } + } + }); + }, observerOptions); + + const sections = [ + aboutRef.current, + featuresRef.current, + opensourceRef.current, + rockRollRef.current, + communityRef.current + ]; + + sections.forEach(section => { + if (section) { + observer.observe(section); + } + }); + + return () => { + sections.forEach(section => { + if (section) { + observer.unobserve(section); + } + }); + }; + }, []); + + useEffect(() => { + fetch('/ROCK/stats.json').then(res => res.json()).then(data => { + setTodayStat(data[today]); + }) + }, []); + + return +
+
+ +
+ +
+ +
+ +
+ Reinforcement Learning Infrastructure Platform +
+
+ +
+
+
+
+
+ + ABOUT ROCK + +
+
+ + ROCK (Reinforcement Open Construction Kit) is + +   + + an AI-powered reinforcement learning environment platform + +   + + that offers standardized infrastructure, intelligent model services, TPP access, and a rich set of built-in scenarios, enabling developers to rapidly conduct RL training tasks. + +
+
+
+
+ + AI Intelligence + +
+ +
+
+
+ + Cloud Native + +
+ +
+
+
+ + Standardization + +
+ +
+
+
+
+
+ + CORE FEATURES + +
+
+
+ +
+ + Multi-Protocol Action Support + +
+
+
+ + Supports multiple action protocols including GEM, Bash, and Chat. + +
+
+
+ +
+ + Sandbox Runtime + +
+
+
+ + Stateful runtime environments with multiple isolation mechanisms to ensure consistency and security + +
+
+
+
+
+
+ +
+ + Flexible Deployment + +
+
+
+ + Supports different deployment methods for diverse environment and OS + +
+
+
+ +
+ + Unified SDK Interface + +
+
+
+ + Clean Python SDK for Env and Sandbox interaction + +
+
+
+
+
+
+ + Layered Service Architecture + +
+
+
+ + Distributed Admin, Worker, and Rocklet architecture for scalable resource management + +
+
+
+
+ + Efficient Resource Management + +
+
+
+ + Automatic sandbox lifecycle management with configurable resource allocation + +
+
+
+
+
+
+
+ + ROCK Open Source Community + +
+
+
+
+ {startCounting && } +
+
+ + Stars + +
+
+
+
+ {startCounting && } +
+
+ + Contributors + +
+
+
+
+ {startCounting && } +
+
+ + PRs + +
+
+
+
+
+
+ ROCK&ROLL +
+
+ + The two work together to form a complete closed loop for intelligent agent training. + +
+ +
+
+
+ + We welcome contributions from the community! + +
+
+
+
+ + how to get involved + +
+

fork the repository and create a feature branch to make your changes; if applicable, add tests, and then submit a pull request.

+

Please use the GitHub issue tracker to report bugs or suggest features.

+

Follow existing code style and conventions. Please run tests before submitting pull requests.

+
+
+ + + +
+
+
+
+ +
+ setOpen(false)} + footer={null} + getContainer={() => document.getElementById('home') || document.body} + > + + +
+
+ +} diff --git a/docs/src/components/HomePage/styles.module.css b/docs/src/components/HomePage/styles.module.css new file mode 100644 index 000000000..07e623195 --- /dev/null +++ b/docs/src/components/HomePage/styles.module.css @@ -0,0 +1,392 @@ +.container { + background-color: #000; + width: 100%; + min-height: 100vh; + .whiteImg { + filter: var(--white-image-reverse-filter); + } + .header { + position: relative; + height: 700px; + margin: 0 auto; + overflow: hidden; + + .headerVideo { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + object-fit: cover; + z-index: 0; + } + + .headerOverlay { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 1; + } + + .rock { + position: relative; + z-index: 2; + text-align: center; + padding-top: 300px; + .description { + margin-top: 20px; + font-family: Inter; + font-size: 20px; + font-weight: bold; + line-height: normal; + text-align: center; + text-transform: capitalize; + letter-spacing: normal; + color: #A2B1F2; + } + .btns { + margin-top: 52px; + .button { + font-size: 16px; + padding: 14px 16px; + border-radius: 20px; + background: #575DF4; + border: 5px solid #3c42a1; + &:hover { + color: #fff; + } + } + } + } + } + .about, .features, .opensource, .rock_roll { + width: 1240px; + margin: 200px auto 0; + .title { + font-family: Inter; + font-size: 48px; + font-weight: bold; + line-height: normal; + text-align: center; + text-transform: uppercase; + letter-spacing: normal; + color: #FFFFFF; + } + .title2 { + font-family: Inter; + font-size: 32px; + font-weight: bold; + line-height: normal; + text-align: center; + text-transform: uppercase; + letter-spacing: normal; + color: #FFFFFF; + } + .desc { + margin-top: 62px; + font-family: Inter; + font-size: 16px; + font-weight: normal; + line-height: 28px; + letter-spacing: normal; + color: #9E9E9E; + text-align: center; + .pot { + color: #575DF4; + } + } + .desc2 { + margin-top: 28px; + font-family: Inter; + font-size: 20px; + font-weight: normal; + line-height: normal; + text-align: center; + letter-spacing: normal; + color: #9E9E9E; + } + .images { + margin-top: 80px; + display: flex; + .sub { + flex: 1; + display: flex; + flex-direction: column; + align-items: center; + .imgTitle { + font-family: Inter; + font-size: 18px; + font-weight: 600; + line-height: 25.37px; + text-align: center; + letter-spacing: 0.01em; + color: #FFFFFF; + } + } + } + } + /* 滚动动画样式 */ + .fadeInSection { + opacity: 0; + transform: translateY(30px); + transition: opacity 0.8s ease-out, transform 0.8s ease-out; + } + .fadeInSection.visible { + opacity: 1; + transform: translateY(0); + } + .features { + .cards { + margin-top: 80px; + display: flex; + align-items: stretch; + gap: 30px; + .card { + border-radius: 32px; + box-sizing: border-box; + border: 1px solid rgba(255, 255, 255, 0.2); + padding: 32px; + .subTitle { + margin-top: 16px; + font-family: Inter; + font-size: 24px; + font-weight: bold; + line-height: normal; + letter-spacing: normal; + color: #FFFFFF; + } + .line { + margin: 18px 0; + opacity: 0.3; + height: 1px; + background: linear-gradient(270deg, rgba(255, 255, 255, 0) 0%, #FFFFFF 50%, rgba(255, 255, 255, 0) 100%); + } + .subDesc { + font-family: Inter; + font-size: 16px; + font-weight: normal; + line-height: 173%; + letter-spacing: normal; + color: #9E9E9E; + } + } + .multi { + width: calc(60% - 15px); + position: relative; + background: linear-gradient(46deg, rgba(61, 93, 255, 0.17) 2%, rgba(61, 93, 255, 0.05) 48%); + border-radius: 32px; + display: flex; + flex-direction: column; + &::before { + content: ''; + position: absolute; + inset: -1px; + border-radius: 33px; + padding: 1px; + background: radial-gradient(80% 80% at 100% 100%, #575DF4 0%, rgba(87, 93, 244, 0.4) 40%, rgba(87, 93, 244, 0.15) 70%, rgba(87, 93, 244, 0) 100%); + -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); + -webkit-mask-composite: xor; + mask-composite: exclude; + pointer-events: none; + } + } + .sandbox { + width: calc(40% - 15px); + position: relative; + background: linear-gradient(35deg, rgba(61, 93, 255, 0.17) 2%, rgba(61, 93, 255, 0.05) 49%); + border-radius: 32px; + display: flex; + flex-direction: column; + &::before { + content: ''; + position: absolute; + inset: -1px; + border-radius: 33px; + padding: 1px; + background: radial-gradient(80% 80% at 0% 100%, #575DF4 0%, rgba(87, 93, 244, 0.4) 40%, rgba(87, 93, 244, 0.15) 70%, rgba(87, 93, 244, 0) 100%); + -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); + -webkit-mask-composite: xor; + mask-composite: exclude; + pointer-events: none; + } + } + .imageCards { + width: calc(60% - 15px); + display: flex; + gap: 30px; + .deployment, .sdk { + flex: 1; + display: flex; + flex-direction: column; + } + .deployment { + background: linear-gradient(31deg, rgba(61, 93, 255, 0.17) 2%, rgba(61, 93, 255, 0.05) 50%); + border: 1px solid rgba(255, 255, 255, 0.2); + box-sizing: border-box; + } + .sdk { + position: relative; + background: linear-gradient(31deg, rgba(61, 93, 255, 0.17) 2%, rgba(61, 93, 255, 0.05) 50%); + border-radius: 32px; + box-sizing: border-box; + &::before { + content: ''; + position: absolute; + inset: -1px; + border-radius: 33px; + padding: 1px; + background: radial-gradient(80% 80% at 100% 0%, #575DF4 0%, rgba(87, 93, 244, 0.4) 40%, rgba(87, 93, 244, 0.15) 70%, rgba(87, 93, 244, 0) 100%); + -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); + -webkit-mask-composite: xor; + mask-composite: exclude; + pointer-events: none; + } + } + } + .textCards { + width: calc(40% - 15px); + display: flex; + flex-direction: column; + gap: 30px; + .arch, .management { + flex: 1; + } + .arch { + position: relative; + background: linear-gradient(61deg, rgba(61, 93, 255, 0.17) 2%, rgba(61, 93, 255, 0.05) 47%); + border-radius: 32px; + &::before { + content: ''; + position: absolute; + inset: -1px; + border-radius: 33px; + padding: 1px; + background: radial-gradient(120% 120% at 0% 0%, #575DF4 0%, rgba(87, 93, 244, 0.5) 30%, rgba(87, 93, 244, 0.3) 50%, rgba(87, 93, 244, 0.15) 70%, rgba(87, 93, 244, 0) 100%); + -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); + -webkit-mask-composite: xor; + mask-composite: exclude; + pointer-events: none; + } + } + .management { + background: linear-gradient(61deg, rgba(61, 93, 255, 0.17) 2%, rgba(61, 93, 255, 0.05) 47%); + border-radius: 32px; + border: 1px solid rgba(255, 255, 255, 0.2); + } + } + } + } + .opensource { + padding-bottom: 80px; + border-bottom: 1px solid rgba(255, 255, 255, 0.2); + .stats { + margin-top: 80px; + display: flex; + gap: 30px; + .statItem { + flex: 1; + display: flex; + flex-direction: column; + align-items: center; + .statNumber { + font-family: Inter; + font-size: 48px; + font-weight: 600; + line-height: normal; + text-align: center; + color: #575DF4; + } + .statDesc { + margin-top: 16px; + font-family: Inter; + font-size: 14px; + font-weight: normal; + line-height: normal; + text-align: center; + color: #9E9E9E; + } + } + } + } + .rock_roll { + margin-top: 50px; + } + .community { + width: 1240px; + margin: 100px auto 0; + .leftTitle { + font-family: Inter; + font-size: 24px; + font-weight: bold; + line-height: normal; + letter-spacing: normal; + color: #FFFFFF; + } + .content { + display: flex; + gap: 14px; + margin-top: 32px; + .join, .buttons { + border-radius: 32px; + background: rgba(143, 164, 250, 0.1); + padding: 26px; + } + .join { + flex: 1; + .subTitle { + font-family: Inter; + font-size: 20px; + font-weight: bold; + line-height: normal; + letter-spacing: normal; + color: #FFFFFF; + margin-bottom: 32px; + } + .subDesc { + font-family: Inter; + font-size: 14px; + font-weight: normal; + line-height: normal; + text-transform: capitalize; + letter-spacing: 0.1em; + color: #9E9E9E; + .bullet { + display: inline-block; + width: 8px; + height: 8px; + border-radius: 50%; + background-color: #575DF4; + margin-right: 12px; + vertical-align: middle; + } + } + } + .buttons { + flex: unset; + width: 300px; + display: flex; + flex-direction: column; + gap: 18px; + justify-content: center; + align-items: center; + .btn, .github { + width: 200px; + border-radius: 20px; + border: 1px solid rgba(255, 255, 255, 0.15); + font-size: 14px; + color: #fff; + } + .btn { + background-color: transparent; + } + .github { + background-color: #575DF4; + border: 5px solid #3c42a1; + } + } + } + } + +} \ No newline at end of file diff --git a/docs/src/css/custom.css b/docs/src/css/custom.css index 750598e3f..58dcc856b 100644 --- a/docs/src/css/custom.css +++ b/docs/src/css/custom.css @@ -16,6 +16,7 @@ --ifm-code-font-size: 95%; --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1); --image-filter: unset; + --white-image-reverse-filter: unset; } /* For readability concerns, you should choose a lighter palette in dark mode. */ @@ -29,6 +30,7 @@ --ifm-color-primary-lightest: #4fddbf; --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3); --image-filter: invert(90%) hue-rotate(180deg) saturate(140%); + --white-image-reverse-filter: invert(90%) hue-rotate(180deg) saturate(140%); } .invert-dark-mode { diff --git a/docs/src/pages/index.js b/docs/src/pages/index.js index b6f74ea8f..c76e39649 100644 --- a/docs/src/pages/index.js +++ b/docs/src/pages/index.js @@ -1,53 +1,18 @@ import clsx from 'clsx'; -import Link from '@docusaurus/Link'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import Layout from '@theme/Layout'; -// import HomepageFeatures from '@site/src/components/HomepageFeatures'; -import { useHistory } from '@docusaurus/router'; - -import Heading from '@theme/Heading'; -import styles from './index.module.css'; -import { useLayoutEffect } from 'react'; - -function HomepageHeader() { - const { siteConfig } = useDocusaurusContext(); - return ( -
-
- - {siteConfig.title} - -

{siteConfig.tagline}

-
- {/* - Docusaurus Tutorial - 5min ⏱️ - */} -
-
-
- ); -} +import HomePage from '@site/src/components/HomePage'; export default function Home() { const { siteConfig, i18n } = useDocusaurusContext(); - const history = useHistory(); const { currentLocale } = i18n; - const isChinese = currentLocale === 'zh-Hans'; - - useLayoutEffect(() => { - history.push(isChinese ? '/ROCK/zh-Hans/docs/overview' : '/ROCK/docs/overview'); - }, []); - return ( -
- {/* */} +
); diff --git a/docs/src/theme/Navbar/index.js b/docs/src/theme/Navbar/index.js new file mode 100644 index 000000000..307a7fde3 --- /dev/null +++ b/docs/src/theme/Navbar/index.js @@ -0,0 +1,18 @@ +import React from 'react'; +import Navbar from '@theme-original/Navbar'; +import { useLocation } from '@docusaurus/router'; + +export default function NavbarWrapper(props) { + const location = useLocation(); + const isHomepage = location.pathname === '/' || location.pathname === '/ROCK/' || location.pathname === '/ROCK/zh-Hans/'; + + if (isHomepage) { + return null; + } + + return ( + <> + + + ); +} diff --git a/docs/versioned_docs/version-0.2.x/Getting Started/quickstart.md b/docs/versioned_docs/version-0.2.x/Getting Started/quickstart.md index 80f5f6df9..f86d3fc30 100644 --- a/docs/versioned_docs/version-0.2.x/Getting Started/quickstart.md +++ b/docs/versioned_docs/version-0.2.x/Getting Started/quickstart.md @@ -85,7 +85,7 @@ After activating the virtual environment, verify that dependencies are installed ```bash # Check key dependencies -python -c "import rock; print("Hello ROCK") +python -c "import rock; print(\"Hello ROCK\")" ``` ## 4. Start ROCK Service @@ -150,13 +150,13 @@ On macOS, if you need to start Linux image environments, you first need to set t export ROCK_WORKER_ENV_TYPE=uv ``` -During container startup, the corresponding uv environment will be installed. For details, please refer to the `rock/rocklet/docker_run_with_uv.sh` script. +During container startup, the corresponding uv environment will be installed. For details, please refer to the `rock/rocklet/local_files/docker_run_with_uv.sh` script. > **Note**: Compared to Linux systems, the startup speed on macOS will be slower and more dependent on network conditions. You can adjust the script according to actual conditions.You can find detatils for ROCK_WORKER_ENV_TYPE in [Configuration Guide](../User%20Guides/configuration.md). ## 8. Starting from Pip Source -If starting the Admin Server from Pip source, after completing the ROCK installation by referring to [installation.md](./installation.md), you need to set an additional environment variable: +If starting the Admin Server from Pip source, after completing the ROCK installation by referring to [installation](./installation.md), you need to set an additional environment variable: ```bash export ROCK_WORKER_ENV_TYPE=pip diff --git a/docs/versioned_docs/version-0.2.x/Getting Started/rockroll.md b/docs/versioned_docs/version-0.2.x/Getting Started/rockroll.md index a389c9262..2465a7733 100644 --- a/docs/versioned_docs/version-0.2.x/Getting Started/rockroll.md +++ b/docs/versioned_docs/version-0.2.x/Getting Started/rockroll.md @@ -101,7 +101,7 @@ bash examples/agentic_demo/run_agentic_pipeline_sokoban_sandbox_single_node.sh For optimal compatibility with this method, we recommend running these commands inside one of ROLL's official base Docker images. These images come pre-installed with matching CUDA, cuDNN, and other foundational libraries. -> [ROLL's Official Docker Image List](https://alibaba.github.io/ROLL/docs/English/QuickStart/image_address) +> [ROLL's Official Docker Image List](https://alibaba.github.io/ROLL/docs/Getting%20Started/Installation/image_address) #### Warning @@ -136,7 +136,7 @@ Instead of running everything on a single machine, you can deploy the **ROCK Se ### 3.1 Deploy the ROCK Service on Machine A -On a dedicated machine (or container), follow the [ROCK Quick Start Guide](https://rock.io.alibaba-inc.com/docs/rock/quickstart) to deploy and start the ROCK service. +On a dedicated machine (or container), follow the [ROCK Quick Start Guide](./quickstart.md) to deploy and start the ROCK service. > **Important** > After starting the service, take note of its IP address and port (e.g., `http://192.168.1.10:8000`). You will need this address for the subsequent steps. diff --git a/docs/versioned_docs/version-0.2.x/References/Python SDK References/python_sdk.md b/docs/versioned_docs/version-0.2.x/References/Python SDK References/python_sdk.md index 68d57e5ce..3c49837d8 100644 --- a/docs/versioned_docs/version-0.2.x/References/Python SDK References/python_sdk.md +++ b/docs/versioned_docs/version-0.2.x/References/Python SDK References/python_sdk.md @@ -6,19 +6,6 @@ sidebar_position: 2 This guide provides detailed information on how to use the ROCK SDK for development, including sandbox environment management and GEM environment interaction. -## Table of Contents - -- [Python SDK Reference](#python-sdk-reference) - - [Table of Contents](#table-of-contents) - - [1. Overview](#1-overview) - - [2. Sandbox SDK](#2-sandbox-sdk) - - [2.1 Basic Sandbox Operations](#21-basic-sandbox-operations) - - [3.2 Sandbox Group Management](#32-sandbox-group-management) - - [3.4 Configuration Example](#34-configuration-example) - - [Related Documents](#related-documents) - - [3. GEM SDK](#3-gem-sdk) - - [3.1 Python SDK Approach](#31-python-sdk-approach) - ## 1. Overview ROCK SDK provides developers with convenient Python interfaces to use ROCK platform features, including sandbox environment management and GEM environment interaction. diff --git a/docs/versioned_docs/version-0.2.x/References/api.md b/docs/versioned_docs/version-0.2.x/References/api.md index fc4af951f..d73bf49d6 100644 --- a/docs/versioned_docs/version-0.2.x/References/api.md +++ b/docs/versioned_docs/version-0.2.x/References/api.md @@ -6,28 +6,6 @@ sidebar_position: 1 This guide provides detailed information about the core API services provided by the ROCK platform, including sandbox environment management and GEM environment interaction. -## Table of Contents - -- [API Reference](#api-reference) - - [Table of Contents](#table-of-contents) - - [1. Overview](#1-overview) - - [2. Sandbox API](#2-sandbox-api) - - [Sandbox Management Interfaces](#sandbox-management-interfaces) - - [Command Execution Interfaces](#command-execution-interfaces) - - [File Operation Interfaces](#file-operation-interfaces) - - [3. GEM API](#3-gem-api) - - [4. HTTP API Usage Examples](#4-http-api-usage-examples) - - [4.1 Sandbox API Examples](#41-sandbox-api-examples) - - [Start Sandbox](#start-sandbox) - - [Asynchronously Start Sandbox](#asynchronously-start-sandbox) - - [Execute Command](#execute-command) - - [Create Session](#create-session) - - [Run Command in Session](#run-command-in-session) - - [Upload File](#upload-file) - - [Stop Sandbox](#stop-sandbox) - - [4.2 GEM API Examples](#42-gem-api-examples) - - [Related Documents](#related-documents) - ## 1. Overview The ROCK platform provides two core API services: diff --git a/docs/versioned_docs/version-0.2.x/User Guides/configuration.md b/docs/versioned_docs/version-0.2.x/User Guides/configuration.md index 38c717592..604256878 100644 --- a/docs/versioned_docs/version-0.2.x/User Guides/configuration.md +++ b/docs/versioned_docs/version-0.2.x/User Guides/configuration.md @@ -6,13 +6,6 @@ sidebar_position: 4 This guide provides detailed instructions on how to configure the ROCK environment to meet different usage requirements, including local development, testing, and production deployment. -## Table of Contents - -- [Environment Variable Configuration](#1-environment-variable-configuration) - - [Runtime Environments](#11-runtime-environments) - - [Logging Configuration](#12-logging-configuration) -- [Distributed Deployment Requirements](#2-distributed-deployment-requirements) - ## 1. Environment Variable Configuration ROCK supports configuring key parameters through environment variables. The main environment variables are as follows: diff --git a/docs/versioned_docs/version-0.2.x/overview.md b/docs/versioned_docs/version-0.2.x/overview.md index 845e84e76..0c377e8b2 100644 --- a/docs/versioned_docs/version-0.2.x/overview.md +++ b/docs/versioned_docs/version-0.2.x/overview.md @@ -6,15 +6,6 @@ sidebar_position: 1 ROCK (Reinforcement Open Construction Kit) is an open-source reinforcement learning environment development framework designed to simplify the development, deployment, and management of reinforcement learning environments. -## Table of Contents - -- [Overview](#overview) - - [Table of Contents](#table-of-contents) - - [What is ROCK](#what-is-rock) - - [Core Capabilities of ROCK](#core-capabilities-of-rock) - - [Value of ROCK](#value-of-rock) - - [Learn More](#learn-more) - ## What is ROCK ROCK (Reinforcement Open Construction Kit) is an open-source reinforcement learning environment development framework. By using ROCK, developers can quickly develop reinforcement learning environments and integrate with other reinforcement learning training frameworks to implement efficient reinforcement learning training. diff --git a/docs/versioned_docs/version-1.0.x/Getting Started/quickstart.md b/docs/versioned_docs/version-1.0.x/Getting Started/quickstart.md index 80f5f6df9..3461c01d4 100644 --- a/docs/versioned_docs/version-1.0.x/Getting Started/quickstart.md +++ b/docs/versioned_docs/version-1.0.x/Getting Started/quickstart.md @@ -6,25 +6,6 @@ sidebar_position: 2 This guide will demonstrate how to use ROCK to create and manage reinforcement learning environments through complete examples. -## Table of Contents - -- [Getting Started](#getting-started) - - [Table of Contents](#table-of-contents) - - [1. Environment Preparation](#1-environment-preparation) - - [1.1 System Requirements](#11-system-requirements) - - [1.2 Verify Dependency Installation](#12-verify-dependency-installation) - - [1.3 Project Initialization](#13-project-initialization) - - [2. Activate Virtual Environment](#2-activate-virtual-environment) - - [3. Verify Environment Configuration](#3-verify-environment-configuration) - - [4. Start ROCK Service](#4-start-rock-service) - - [5. Run Example Environments](#5-run-example-environments) - - [5.1 Example Descriptions](#51-example-descriptions) - - [6. Distributed Environment Configuration (Optional)](#6-distributed-environment-configuration-optional) - - [7. MacOS Startup](#7-macos-startup) - - [8. Starting from Pip Source](#8-starting-from-pip-source) - - [Summary](#summary) - - [Next Steps](#next-steps) - ## 1. Environment Preparation We recommend starting ROCK on Linux systems to maximize dependency reuse and improve environment startup speed. If you need to try on macOS, please refer to the [MacOS Startup](#7-macos-startup) section. @@ -85,7 +66,7 @@ After activating the virtual environment, verify that dependencies are installed ```bash # Check key dependencies -python -c "import rock; print("Hello ROCK") +python -c "import rock; print(\"Hello ROCK\")" ``` ## 4. Start ROCK Service @@ -150,13 +131,13 @@ On macOS, if you need to start Linux image environments, you first need to set t export ROCK_WORKER_ENV_TYPE=uv ``` -During container startup, the corresponding uv environment will be installed. For details, please refer to the `rock/rocklet/docker_run_with_uv.sh` script. +During container startup, the corresponding uv environment will be installed. For details, please refer to the `rock/rocklet/local_files/docker_run_with_uv.sh` script. > **Note**: Compared to Linux systems, the startup speed on macOS will be slower and more dependent on network conditions. You can adjust the script according to actual conditions.You can find detatils for ROCK_WORKER_ENV_TYPE in [Configuration Guide](../User%20Guides/configuration.md). ## 8. Starting from Pip Source -If starting the Admin Server from Pip source, after completing the ROCK installation by referring to [installation.md](./installation.md), you need to set an additional environment variable: +If starting the Admin Server from Pip source, after completing the ROCK installation by referring to [installation](./installation.md), you need to set an additional environment variable: ```bash export ROCK_WORKER_ENV_TYPE=pip diff --git a/docs/versioned_docs/version-1.0.x/Getting Started/rockroll.md b/docs/versioned_docs/version-1.0.x/Getting Started/rockroll.md index a389c9262..2465a7733 100644 --- a/docs/versioned_docs/version-1.0.x/Getting Started/rockroll.md +++ b/docs/versioned_docs/version-1.0.x/Getting Started/rockroll.md @@ -101,7 +101,7 @@ bash examples/agentic_demo/run_agentic_pipeline_sokoban_sandbox_single_node.sh For optimal compatibility with this method, we recommend running these commands inside one of ROLL's official base Docker images. These images come pre-installed with matching CUDA, cuDNN, and other foundational libraries. -> [ROLL's Official Docker Image List](https://alibaba.github.io/ROLL/docs/English/QuickStart/image_address) +> [ROLL's Official Docker Image List](https://alibaba.github.io/ROLL/docs/Getting%20Started/Installation/image_address) #### Warning @@ -136,7 +136,7 @@ Instead of running everything on a single machine, you can deploy the **ROCK Se ### 3.1 Deploy the ROCK Service on Machine A -On a dedicated machine (or container), follow the [ROCK Quick Start Guide](https://rock.io.alibaba-inc.com/docs/rock/quickstart) to deploy and start the ROCK service. +On a dedicated machine (or container), follow the [ROCK Quick Start Guide](./quickstart.md) to deploy and start the ROCK service. > **Important** > After starting the service, take note of its IP address and port (e.g., `http://192.168.1.10:8000`). You will need this address for the subsequent steps. diff --git a/docs/versioned_docs/version-1.0.x/References/Python SDK References/python_sdk.md b/docs/versioned_docs/version-1.0.x/References/Python SDK References/python_sdk.md index 68d57e5ce..c81cee4aa 100644 --- a/docs/versioned_docs/version-1.0.x/References/Python SDK References/python_sdk.md +++ b/docs/versioned_docs/version-1.0.x/References/Python SDK References/python_sdk.md @@ -6,19 +6,6 @@ sidebar_position: 2 This guide provides detailed information on how to use the ROCK SDK for development, including sandbox environment management and GEM environment interaction. -## Table of Contents - -- [Python SDK Reference](#python-sdk-reference) - - [Table of Contents](#table-of-contents) - - [1. Overview](#1-overview) - - [2. Sandbox SDK](#2-sandbox-sdk) - - [2.1 Basic Sandbox Operations](#21-basic-sandbox-operations) - - [3.2 Sandbox Group Management](#32-sandbox-group-management) - - [3.4 Configuration Example](#34-configuration-example) - - [Related Documents](#related-documents) - - [3. GEM SDK](#3-gem-sdk) - - [3.1 Python SDK Approach](#31-python-sdk-approach) - ## 1. Overview ROCK SDK provides developers with convenient Python interfaces to use ROCK platform features, including sandbox environment management and GEM environment interaction. @@ -72,7 +59,7 @@ if __name__ == "__main__": asyncio.run(run_sandbox()) ``` -### 3.2 Sandbox Group Management +### 2.2 Sandbox Group Management ```python from rock.sdk.sandbox.config import SandboxGroupConfig @@ -96,7 +83,7 @@ for sandbox in sandbox_group.sandbox_list: await sandbox_group.stop() ``` -### 3.4 Configuration Example +### 2.3 Configuration Example ```python config = SandboxConfig( @@ -106,13 +93,6 @@ config = SandboxConfig( ) ``` -## Related Documents - -- [Quick Start Guide](../../Getting%20Started/quickstart.md) - Learn how to quickly get started with the ROCK SDK -- [API Documentation](../api.md) - View the underlying API interfaces encapsulated by the SDK -- [Configuration Guide](../../User%20Guides/configuration.md) - Learn about SDK-related configuration options -- [Installation Guide](../../Getting%20Started/installation.md) - Detailed information about ROCK installation and setup - ## 3. GEM SDK ### 3.1 Python SDK Approach @@ -180,4 +160,11 @@ if __name__ == "__main__": + "\n" ) main() -``` \ No newline at end of file +``` + +## Related Documents + +- [Quick Start Guide](../../Getting%20Started/quickstart.md) - Learn how to quickly get started with the ROCK SDK +- [API Documentation](../api.md) - View the underlying API interfaces encapsulated by the SDK +- [Configuration Guide](../../User%20Guides/configuration.md) - Learn about SDK-related configuration options +- [Installation Guide](../../Getting%20Started/installation.md) - Detailed information about ROCK installation and setup \ No newline at end of file diff --git a/docs/versioned_docs/version-1.0.x/References/api.md b/docs/versioned_docs/version-1.0.x/References/api.md index fc4af951f..d73bf49d6 100644 --- a/docs/versioned_docs/version-1.0.x/References/api.md +++ b/docs/versioned_docs/version-1.0.x/References/api.md @@ -6,28 +6,6 @@ sidebar_position: 1 This guide provides detailed information about the core API services provided by the ROCK platform, including sandbox environment management and GEM environment interaction. -## Table of Contents - -- [API Reference](#api-reference) - - [Table of Contents](#table-of-contents) - - [1. Overview](#1-overview) - - [2. Sandbox API](#2-sandbox-api) - - [Sandbox Management Interfaces](#sandbox-management-interfaces) - - [Command Execution Interfaces](#command-execution-interfaces) - - [File Operation Interfaces](#file-operation-interfaces) - - [3. GEM API](#3-gem-api) - - [4. HTTP API Usage Examples](#4-http-api-usage-examples) - - [4.1 Sandbox API Examples](#41-sandbox-api-examples) - - [Start Sandbox](#start-sandbox) - - [Asynchronously Start Sandbox](#asynchronously-start-sandbox) - - [Execute Command](#execute-command) - - [Create Session](#create-session) - - [Run Command in Session](#run-command-in-session) - - [Upload File](#upload-file) - - [Stop Sandbox](#stop-sandbox) - - [4.2 GEM API Examples](#42-gem-api-examples) - - [Related Documents](#related-documents) - ## 1. Overview The ROCK platform provides two core API services: diff --git a/docs/versioned_docs/version-1.0.x/User Guides/configuration.md b/docs/versioned_docs/version-1.0.x/User Guides/configuration.md index 38c717592..604256878 100644 --- a/docs/versioned_docs/version-1.0.x/User Guides/configuration.md +++ b/docs/versioned_docs/version-1.0.x/User Guides/configuration.md @@ -6,13 +6,6 @@ sidebar_position: 4 This guide provides detailed instructions on how to configure the ROCK environment to meet different usage requirements, including local development, testing, and production deployment. -## Table of Contents - -- [Environment Variable Configuration](#1-environment-variable-configuration) - - [Runtime Environments](#11-runtime-environments) - - [Logging Configuration](#12-logging-configuration) -- [Distributed Deployment Requirements](#2-distributed-deployment-requirements) - ## 1. Environment Variable Configuration ROCK supports configuring key parameters through environment variables. The main environment variables are as follows: diff --git a/docs/versioned_docs/version-1.0.x/overview.md b/docs/versioned_docs/version-1.0.x/overview.md index 845e84e76..0c377e8b2 100644 --- a/docs/versioned_docs/version-1.0.x/overview.md +++ b/docs/versioned_docs/version-1.0.x/overview.md @@ -6,15 +6,6 @@ sidebar_position: 1 ROCK (Reinforcement Open Construction Kit) is an open-source reinforcement learning environment development framework designed to simplify the development, deployment, and management of reinforcement learning environments. -## Table of Contents - -- [Overview](#overview) - - [Table of Contents](#table-of-contents) - - [What is ROCK](#what-is-rock) - - [Core Capabilities of ROCK](#core-capabilities-of-rock) - - [Value of ROCK](#value-of-rock) - - [Learn More](#learn-more) - ## What is ROCK ROCK (Reinforcement Open Construction Kit) is an open-source reinforcement learning environment development framework. By using ROCK, developers can quickly develop reinforcement learning environments and integrate with other reinforcement learning training frameworks to implement efficient reinforcement learning training.