The robot simulation platform on AnalyticDB Ray integrates Gym and Isaac Sim for distributed reinforcement learning across multiple machines and GPUs, accelerating policy iteration. Create the platform in the AnalyticDB for MySQL console and submit training jobs.
Prerequisites
An AnalyticDB for MySQL Enterprise Edition, Basic Edition, or Data Lakehouse Edition cluster is created.
Billing
A Ray Cluster resource group incurs the following charges:
-
Head node disk space and Worker Disk Storage are billed based on configured storage capacity.
-
If Head Node Resource Type and Worker Resource Type are set to CPU, you are billed for ACU-based elastic resource groups.
-
If Head Node Resource Type and Worker Resource Type are set to GPU, you are billed based on GPU specifications and quantity.
Procedure
(Optional) Step 1: Create a storage volume
Create a storage volume for exporting trained models or accessing private data, then mount it to the AI application.
Log on to the AnalyticDB for MySQL console. In the upper-left corner of the console, select a region. In the left-side navigation pane, click Clusters. Find the cluster that you want to manage and click the cluster ID.
-
In the navigation pane on the left, click AI Applications.
-
On the Storage Management tab, click Create Storage Volume.
-
In the Create Storage Volume panel, configure the following parameters.
Only the name and default mount path can be modified after creation.
Parameter
Description
Storage type
Supported types:
-
OSS
-
NAS
Storage name
A custom name for the storage volume.
Bucket path
If the storage type is OSS, select the path of your OSS bucket.
Storage path
If the storage type is NAS, select the path of your NAS file system.
Default mount path
Path for data reads and writes in the AI application.
Permissions
Access permissions for the storage volume.
-
Read-only
-
Read/Write
Fluid cache acceleration
Accelerates storage reads with Fluid.
-
Cache Type: Memory or Cloud Disk.
-
Cache Capacity: Size in GB. Billed based on configured capacity.
-
-
After you configure the parameters, click OK.
Step 2: Create the simulation platform
Log on to the AnalyticDB for MySQL console. In the upper-left corner of the console, select a region. In the left-side navigation pane, click Clusters. Find the cluster that you want to manage and click the cluster ID.
-
In the navigation pane on the left, click AI Applications.
-
On the Storage Management tab, click Creating Simulation Platform (Isaac Sim & Lab).
-
In the Creating Simulation Platform (Isaac Sim & Lab) panel, configure the following parameters:
-
Basic Settings:
Parameter
Description
Application name
A custom name for the AI application.
Image
Select lab2.10.0-ray2.43.0.
-
Resource Configuration:
-
To use an existing Ray Cluster resource group, click Use Existing Resource Group and select the target resource group from the Resource Group Name drop-down list.
-
To create a new Ray Cluster resource group, click Create Resource Group.
Configure worker parameters here. Adjust other settings on the Resource Group Management page after the resource group is created.
Parameter
Description
Resource specifications
Worker resource specifications. Default: ADB.MLLarge.24.
GPU model availability varies. For sizing assistance, submit a ticket.
Number of resources
Number of workers in the worker group. Default: 1.
Allocation unit
Number of GPUs per worker node. Default: 1.
-
-
Storage Configuration (Optional):
Parameter
Description
Storage type
Supported types:
-
OSS
-
NAS
Storage name
Select an existing storage volume. If none are available, click Create Now to create a storage volume.
Mount path
The mount path for the AI application data.
NoteTo mount multiple storage volumes, click Add Storage and configure each volume.
-
-
Network Settings (Optional):
Parameter
Description
Mount elastic network interface (ENI)
Enable this switch to ensure access to mounted storage volumes.
-
-
After you configure the parameters, click OK.
Step 3: Access the simulation platform
SSH CLI access
-
Add the IP address of the server where you run the SSH command-line tool to the IP address whitelist of your AnalyticDB for MySQL cluster.
-
Get the AI application connection address.
-
On the AI Applications page, click the Application Management tab.
-
In the Service Call column of the target application, click Invocation Information to view the Endpoint URL.
-
-
Log on to the Ray Cluster head node:
ssh root@<ssh-service-host><ssh-service-host>: the connection address obtained in Step 2. -
Run the model training job:
cd /workspace/isaaclab isaaclab -p scripts/reinforcement_learning/rl_games/train.py --task Isaac-Ant-v0 --headless
XPRA GUI access
-
Add the IP address of the server where you run the SSH command-line tool to the IP address whitelist of your AnalyticDB for MySQL cluster.
-
Get the AI application connection address.
-
On the AI Applications page, click the Application Management tab.
-
In the Service Call column of the target application, click Invocation Information to view the Endpoint URL.
-
-
Access the GUI:
# Forward local port 20001 to server port 20000. You can customize the port numbers. Replace <ssh-service-host> with the connection address obtained in Step 2. ssh -L 20001:localhost:20000 root@<ssh-service-host> # Start the Xpra server and bind it to port 20000 on localhost. xpra start --bind-tcp=localhost:20000 # Use the first display on your local machine. export DISPLAY=:0Open
http://localhost:20001in a browser to access the GUI. -
Run the model training job:
cd /workspace/isaaclab isaaclab -p scripts/reinforcement_learning/rl_games/train.py --task Isaac-Ant-v0
Ray API access
-
Add the IP address of the server where you run the SSH command-line tool to the IP address whitelist of your AnalyticDB for MySQL cluster.
-
Get the AI application connection address.
-
On the AI Applications page, click the Application Management tab.
-
In the Service Call column of the target application, click Invocation Information to view the Endpoint URL.
-
-
Install Ray:
pip3 install ray -
Configure the Ray cluster address.
Create a
cluster_configfile with the AI application address.name: isaacray address: http://<isaaclab_host>:8265<isaaclab_host>: the connection address obtained in Step 2. -
Specify job resource requirements (such as GPU count).
Create a
tasks.yamlfile. Parameters are documented in task_runner.py. -
Create a
task_runner.pyscript. Parameters are documented in task_runner.py.#pip: [] #py_modules: [] tasks: - name: "task1" py_args: "-m torch.distributed.run --nnodes=1 --nproc_per_node=2 --rdzv_endpoint=localhost:29501 /workspace/isaaclab/scripts/reinforcement_learning/rsl_rl/train.py --task=Isaac-Cartpole-v0 --max_iterations 200 --headless --distributed" num_gpus: 2 num_cpus: 10 memory: 10737418240 # - name: "task2" # py_args: "script.py --option arg" # num_gpus: 0 # num_cpus: 1 # memory: 10*1024*1024*1024 -
Submit the training job.
python3 submit_job.py --config_file=cluster_config --aggregate_jobs task_runner.py --task_cfg tasks.yamlCommand parameters:
-
submit_job.py: Job submission script from Ray Job Dispatch and Tuning. -
config_file:cluster_configfile created in Step 4. -
aggregate_jobs:task_runner.pyscript created in Step 6. -
task_cfg:tasks.yamlfile created in Step 5.
-
-
Check job status.
-
On the AI Applications page, click the Application Management tab.
-
In the Actions column of the target application, click Details to view the Dashboard address.
-
Open the Dashboard address in a browser to view the job status on the visualization page.
-