用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/aws-samples/sample-rlinf-on-eks --skill rlinf-open-source-plugins命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | rlinf-open-source-plugins |
| description | RLinf: Integrate Ray, veRL, vLLM, and KubeRay into the RLinf training stack on EKS |
Integrate open-source frameworks -- Ray, RLinf, vLLM, and KubeRay -- into the Physical AI RL training stack on EKS. These provide distributed execution, RL training orchestration, and efficient inference.
| Component | Role | Used By RLinf |
|---|---|---|
| Ray | Distributed execution framework | Yes -- worker orchestration, resource pools |
| RLinf | RL training framework (FSDP + Ray) | Yes -- core training loop |
| vLLM | Fast LLM inference (optional rollout backend) | Optional -- rollout.name=vllm mode |
| KubeRay | Kubernetes operator for Ray clusters | Optional -- alternative to manual Ray setup |
Ray manages distributed workers within the training pipeline:
main_ppo.py
└── ray.init()
└── RayResourcePool (maps GPUs to placement groups)
└── RayWorkerGroup
└── RobActorRolloutRefWorker (per GPU group)
├── Actor (FSDP training)
├── Rollout (env interaction)
└── Ref (reference model)
RLinf initializes Ray locally within the pod. For single-node:
# In main_ppo.py
ray.init(runtime_env=runtime_env) # Local Ray cluster
For multi-node, Ray head starts on pod-0 and workers connect:
# Pod 0 (head)
ray start --head --port=6379
# Pod 1+ (workers)
ray start --address=training-0.training-svc:6379
# Resource pool: maps GPU groups to workers
# Format: {pool_id: [gpus_per_node] * num_nodes}
resource_pool_spec = {
global_pool_id: [num_gpus_per_node] * num_nodes
}
# Example: 2 nodes x 8 GPUs = {pool: [8, 8]}
{
"env_vars": {
"MLFLOW_TRACKING_URI": "http://mlflow.rlinf.svc.cluster.local", // Optional: only if MLflow addon is enabled
"NCCL_DEBUG": "WARN",
"TORCH_NCCL_AVOID_RECORD_STREAMS": "1",
"PYTORCH_CUDA_ALLOC_CONF": "expandable_segments:True",
"FI_PROVIDER": "efa",
"FI_EFA_USE_DEVICE_RDMA": "1"
}
}
RLinf provides the core RL training infrastructure:
RLinf includes VLA-specific components built on its flow transformation architecture:
| RLinf Component | Extension | File |
|---|---|---|
| ActorRolloutRefWorker | RobActorRolloutRefWorker | verl/workers/fsdp_workers.py |
| DataParallelPPOActor | RobDataParallelPPOActor | verl/workers/actor/dp_rob.py |
| HFRollout | RobHFRollout | verl/workers/rollout/rob_rollout.py |
| core_algos.py | Added asymmetric clipping | verl/trainer/ppo/core_algos.py |
| RayTrainer | Added dynamic sampling filter | verl/trainer/ppo/ray_trainer.py |
RLinf v0.3 is installed in the container image (see Skill 07):
git clone https://github.com/RLinf/RLinf.git
cd RLinf && pip install -e .
RLinf's verl/ directory overrides the upstream modules. The PYTHONPATH must prioritize RLinf:
export PYTHONPATH="/workspace:${PYTHONPATH}"
vLLM provides optimized LLM inference for the rollout phase. RLinf supports two rollout backends:
| Backend | Config | Speed | Compatibility |
|---|---|---|---|
| HuggingFace (default) | rollout.name=hf | Slower | Full VLA support |
| vLLM | rollout.name=vllm | Faster | Requires vLLM VLA support |
The HF backend is the default and recommended for VLA models because vLLM's VLA support is still maturing.
actor_rollout_ref.rollout.name: vllm
actor_rollout_ref.rollout.tensor_model_parallel_size: 2
actor_rollout_ref.rollout.gpu_memory_utilization: 0.5
actor_rollout_ref.rollout.max_num_batched_tokens: 8192
actor_rollout_ref.rollout.enforce_eager: True
KubeRay is a Kubernetes operator that manages Ray clusters as native Kubernetes resources. It provides:
| Scenario | Manual Ray (default) | KubeRay |
|---|---|---|
| Single-node training | Simpler, no operator needed | Overhead not justified |
| Multi-node training | Manual head/worker management | Auto-manages Ray cluster |
| Fault tolerance | Manual restart | Auto-recovery of workers |
| Multiple concurrent experiments | Manual coordination | CRD-based management |
KubeRay is installed as a Helm release in Terraform (see Skill 01 helm.tf):
resource "helm_release" "kuberay_operator" {
count = var.enable_kuberay ? 1 : 0
name = "kuberay-operator"
repository = "https://ray-project.github.io/kuberay-helm/"
chart = "kuberay-operator"
namespace = "ray-system"
create_namespace = true
}
For manual installation:
helm repo add kuberay https://ray-project.github.io/kuberay-helm/
helm repo update
helm install kuberay-operator kuberay/kuberay-operator \
--namespace ray-system \
--create-namespace
# raycluster.yaml
apiVersion: ray.io/v1
kind: RayCluster
metadata:
name: rlinf-cluster
spec:
rayVersion: "2.38.0"
headGroupSpec:
rayStartParams:
dashboard-host: "0.0.0.0"
template:
spec:
serviceAccountName: training-sa
nodeSelector:
role: gpu-training
tolerations:
- key: nvidia.com/gpu
operator: Exists
effect: NoSchedule
containers:
- name: ray-head
image: <ACCOUNT_ID>.dkr.ecr.us-east-1.amazonaws.com/rlinf-on-eks/rlinf:latest
resources:
requests:
nvidia.com/gpu: 8
vpc.amazonaws.com/efa: 4
cpu: "90"
memory: "1000Gi"
limits:
nvidia.com/gpu: 8
vpc.amazonaws.com/efa: 4
{}
# Apply the RayCluster
kubectl apply -f raycluster.yaml
# Wait for cluster to be ready
kubectl get raycluster rlinf-cluster
# Submit job via RayJob CRD
kubectl apply -f rayjob.yaml
# rayjob.yaml
apiVersion: ray.io/v1
kind: RayJob
metadata:
name: rlinf-training
spec:
entrypoint: "bash /workspace/scripts/run_training_eks.sh"
runtimeEnvYAML: |
env_vars:
NCCL_DEBUG: WARN
FI_PROVIDER: efa
clusterSelector:
ray.io/cluster: rlinf-cluster
RobActorRolloutRefWorker creates successfully