| name | rlinf-dataset-preparation |
| description | RLinf: Download, preprocess, and stage datasets and model weights for RLinf training on EKS |
Skill 06: Dataset Preparation
Purpose
Download, preprocess, and stage datasets for Physical AI RL training on EKS. The datasets include expert demonstration trajectories used for SFT (Supervised Fine-Tuning) and simulation environment assets needed for RL rollout.
Datasets for RLinf
Overview
| Dataset | Size | Source | Purpose |
|---|
| SFT Model Weights | ~14 GB | HuggingFace Hub | Pre-trained VLA model for RL |
| LIBERO Benchmark | ~5 GB | GitHub + auto-download | 5 task suites, 50 demos/task |
| RoboTwin 2.0 Assets | ~10-20 GB | GitHub script | Robot and object meshes |
| Pre-collected Seeds | ~1 MB | RLinf repo | Feasible seeds for RoboTwin tasks |
SFT Model Weights
RLinf requires a pre-trained SFT model as the starting point for RL. Available from HuggingFace:
| Model | HuggingFace Path | Description |
|---|
| OpenVLA-OFT LIBERO-10 SFT | RLinf/Openvla-oft-SFT-libero10-trajall | All 500 trajectories per task |
| Pi0 Spatial Object Goal SFT | RLinf/RLinf-Pi0-SFT-Spatial-Object-Goal | Pi0 model for spatial tasks |
Full collection: https://huggingface.co/RLinf
Step-by-Step
1. Download SFT Model Weights
Option A: Direct to FSx (from a staging pod)
apiVersion: batch/v1
kind: Job
metadata:
name: download-sft-model
spec:
template:
spec:
restartPolicy: Never
containers:
- name: downloader
image: python:3.10-slim
command:
- bash
- -c
- |
pip install huggingface_hub
huggingface-cli download \
RLinf/Openvla-oft-SFT-libero10-trajall \
--local-dir /fsx/models/sft-base/openvla-oft-sft-libero10 \
--local-dir-use-symlinks False
volumeMounts:
- name: fsx
mountPath: /fsx
volumes:
- name: fsx
persistentVolumeClaim:
claimName: fsx-claim
kubectl apply -f dataset-prep-job.yaml
kubectl logs -f job/download-sft-model
Option B: Download to S3, then sync to FSx
pip install huggingface_hub
huggingface-cli download \
RLinf/Openvla-oft-SFT-libero10-trajall \
--local-dir ./openvla-oft-sft-libero10
aws s3 sync ./openvla-oft-sft-libero10 \
s3://YOUR-DATA-BUCKET/models/sft-base/openvla-oft-sft-libero10/
2. Prepare the VLA Checkpoint Directory
RLinf requires that VLA model code files are present in the checkpoint directory. This is done via the overwrite_vla_ckpt_utils.sh script:
bash examples/overwrite_vla_ckpt_utils.sh /fsx/models/sft-base/openvla-oft-sft-libero10
This step must run before training starts. It can be an init container or a pre-training script in the training Job.
3. LIBERO Environment Setup
LIBERO downloads its environment assets automatically on first use. To pre-stage them:
python -c "
import os, sys
os.environ['LIBERO_DATASET_DIR'] = '/fsx/datasets/libero'
sys.stdin = open('/dev/null') # Prevent interactive prompt
import libero.libero as ll
# This triggers asset download
benchmark = ll.get_benchmark('libero_10')
print(f'Loaded {len(benchmark.get_task_names())} tasks')
"
Warning: LIBERO's __init__.py calls input() at module import time if LIBERO_DATASET_DIR is not set or the directory doesn't exist. In non-interactive environments (Kubernetes pods, CI/CD), this will hang indefinitely with no error message. Always set LIBERO_DATASET_DIR as an environment variable AND redirect stdin before importing LIBERO. This is a general pattern with many robotics simulation libraries -- always test imports in non-interactive containers.
The assets are stored in ~/.libero/ by default. In a container, set LIBERO_DATASET_DIR to point to FSx:
export LIBERO_DATASET_DIR=/fsx/datasets/libero
4. RoboTwin 2.0 Environment Setup
RoboTwin requires explicit asset download and configuration:
git clone https://github.com/RoboTwin-Platform/RoboTwin.git /fsx/repos/RoboTwin
cd /fsx/repos/RoboTwin
bash script/_download_assets.sh
cd /workspace
bash copy_overwrite_robotwin2.sh /workspace /fsx/repos/RoboTwin
System dependencies for RoboTwin (must be in the container image):
apt-get install -y libvulkan1 mesa-vulkan-drivers vulkan-tools
5. Pre-collect Feasible Seeds (RoboTwin Only)
RoboTwin tasks can have infeasible initial configurations. Pre-collecting feasible seeds avoids wasted rollouts:
bash pre_collect_robotwin2_seed.sh
Directory Layout on Shared Storage
/fsx/
├── models/
│ └── sft-base/
│ └── openvla-oft-sft-libero10/ # OpenVLA-OFT LIBERO-10 SFT model
│ ├── config.json
│ ├── model-*.safetensors
│ ├── tokenizer.json
│ ├── modeling_prismatic.py # Copied by overwrite script
│ └── ...
├── datasets/
│ ├── libero/ # LIBERO env assets
│ └── robotwin/ # RoboTwin env assets
├── checkpoints/ # Training outputs
│ └── rlinf/
│ └── <experiment-name>/
│ └── actor/
│ ├── global_step_25/
│ ├── global_step_50/
│ └── ...
└── logs/
└── mlflow/
Data Integrity Verification
python -c "
from transformers import AutoModelForVision2Seq, AutoTokenizer
model = AutoModelForVision2Seq.from_pretrained('/fsx/models/sft-base/openvla-oft-sft-libero10')
print(f'Model loaded: {sum(p.numel() for p in model.parameters()) / 1e9:.1f}B params')
tokenizer = AutoTokenizer.from_pretrained('/fsx/models/sft-base/openvla-oft-sft-libero10')
print(f'Tokenizer vocab size: {tokenizer.vocab_size}')
"
Validation Checklist
Related Skills