# 环境配置与资产准备
Notebook创建成功后，需要进入内置算法目录、激活conda环境、配置访问密钥，并下载所需的具身模型资产和数据资产，为后续的模型二次开发训练做好准备。
#### 进入内置算法目录并激活环境
1. 通过JupyterLab或SSH工具接入Notebook实例，打开Terminal终端。
2. 进入内置算法目录。 
   ```
   cd /opt/cloud/lerobot_ascend_notebook/lerobot
   ```
   
   
3. 激活名为"lerobot"的conda虚拟环境。 
   ```
   conda activate lerobot
   ```
   激活成功后，终端命令行前缀会显示"(lerobot)"，表示已进入LeRobot算法的Python虚拟环境。
   
   
 
 #### 配置访问密钥
为了使Notebook内的cloudrobo CLI工具能够访问CloudRobo平台的资产服务，需要配置华为云访问密钥（AK/SK）。
1. 获取华为云访问密钥（AK和SK）。请参考"[准备环境](https://support.huaweicloud.com/utiltg-obs/obs_11_0004.html)"章节获取访问密钥。
2. 在Terminal中执行以下命令，设置环境变量。 
   ```
   cloudrobo config set ak <your-ak> sk <your-sk>
   cloudrobo config list
   ```
   请将"your-ak"和"your-sk"替换为您实际的访问密钥。
   
   
 
#### 下载具身模型和数据资产
通过cloudrobo CLI工具的asset export-asset命令，从CloudRobo平台下载所需的具身模型资产和数据资产到本地。
1. 获取准备下载的具身模型资产和数据资产的asset-id。可通过以下方式获取： 
   - 登录CloudRobo控制台，在"具身广场"或"空间资产"中找到目标资产。
   
   - 在资产详情页面，通过浏览器开发者工具（F12）或资产详情接口获取asset-id。
   
   
   
   
2. 执行以下命令下载资产到本地目录。
   
   cloudrobo asset export-asset --asset-id \<id\> --local-path \<local-folder\>
   [表1]为下载预置资产的参考示例：
    表1**预置资产下载示例** 
   | **资产来源** | **资产类型** | **模型名称**             | **asset_id**                             | **训练方式**  | **示例命令**                                                                                                         |
   |:---|:---|:---|:---|:---|:---|
   | 具身广场    | model      | LeRobot_PI0-Base     | 73ead36e-f6f7-4658-8951-da87eed5318c  | FFT / LORA    | cloudrobo asset export-asset --asset-id 73ead36e-f6f7-4658-8951-da87eed5318c --local-path ./LeRobot_PI0-Base       |
   | 具身广场     | model      | LeRobot_PI05-Base     | 8e5b96be-9a22-47eb-8e3f-d69b3f5045e7   | FFT / LORA | cloudrobo asset export-asset --asset-id 8e5b96be-9a22-47eb-8e3f-d69b3f5045e7 --local-path ./LeRobot_PI05-Base      |
   | 具身广场   | model     | LeRobot_PI0FAST-Base  | 64533780-e043-4b50-aedf-9fd13ffb9da5    | FFT          | cloudrobo asset export-asset --asset-id 64533780-e043-4b50-aedf-9fd13ffb9da5 --local-path ./LeRobot_PI0FAST-Base   |
   | 具身广场     | model       | LeRobot_SmolVLA-Base  | 6c6c26ca-cc00-4749-be5b-f0e787dc56d5  | FFT / LORA  | cloudrobo asset export-asset --asset-id 6c6c26ca-cc00-4749-be5b-f0e787dc56d5 --local-path ./LeRobot_SmolVLA-Base  |
   | 具身广场   | model     | LeRobot_WALL-OSS-Base | 63bb8ee3-47bb-4b57-b0c5-e05fc0fbaaf4 | FFT        | cloudrobo asset export-asset --asset-id 63bb8ee3-47bb-4b57-b0c5-e05fc0fbaaf4 --local-path ./LeRobot_WALL-OSS-Base |
   | 具身广场     | model      | LeRobot_XVLA-Base      | dbed838d-13c9-4307-8b96-18fce3fbca6a  | FFT        | cloudrobo asset export-asset --asset-id dbed838d-13c9-4307-8b96-18fce3fbca6a --local-path ./LeRobot_XVLA-Base       |
      
   图1资产下载成功示例   
   ![](https://support.huaweicloud.com/bestpractice-cloudrobo/figure/zh-cn_image_0000002736135455.png "点击放大")
   
   
3. 下载完成后，在本地目录查看下载的模型文件和数据集文件，确认资产完整。
 
