H. ROBOT LAB / RUNPOD
← BACK TO ROBOT LAB

Real XGO-Duck PPO training

Start training on a cloud GPU from your phone, using the real open-source MuJoCo Warp / mjlab robot model and policy tasks. Your Robot Lab Train tab selects tasks and checks their Railway plan. This page is the hands-on RunPod setup.

REAL TRAINING RECIPENO GPU STARTED BY THIS PAGE
RunPod GPU Pods incur hourly charges while running, even if you close this page. Set a spending ceiling and automatic stop if available; manually verify the Pod is stopped afterward. The script never creates or pays for a GPU.

01 · Open a GPU Pod

On your phone open RunPod Pods ↗. Use a compatible NVIDIA CUDA/PyTorch image, a single GPU, and a persistent /workspace volume. For this $5 pilot choose no more than 60 minutes and a GPU quoted at $1.50/hour or less. If launching with RunPod CLI, use --stop-after 1h and independently check the stop; monitor storage costs after stopping.

Hardware requirements vary with environment count. Begin with 256 simulation instances, then scale once you've measured VRAM usage and throughput.

02 · Get the real training code

From the Pod's authenticated web terminal, check that nvidia-smi, git, and uv are available. If uv is missing, use its official installer.

cd /workspace
curl --fail --location --output robot-lab-bootstrap.sh https://hagop.io/robot-lab/runpod/bootstrap.txt
less robot-lab-bootstrap.sh
bash robot-lab-bootstrap.sh setup

Review the script before running it. It clones the upstream LuwuDynamics XgoDuck RL repo and installs its locked dependencies. It does not install drivers or change RunPod billing.

03 · Launch a training session

Run real PPO training on a walking-flat task with 256 parallel environments. Training logs and checkpoints are saved to the Pod volume.

bash /workspace/robot-lab-bootstrap.sh train flat 256

Other tasks: rough, stand, pick, kick, roll. Environments: 128, 256, 512, 1024, 2048, 4096. Customize the exact command from Robot Lab Train.

04 · Watch actual learning and rollouts

Open a second terminal, run TensorBoard and reach it through an authenticated SSH tunnel or private gateway. Never publish bare TensorBoard or Isaac Sim WebRTC to the public Internet.

bash /workspace/robot-lab-bootstrap.sh tensorboard

Watch reward curves, losses and steps in TensorBoard. To see the robot actually moving, use upstream uv run play Mjlab-Velocity-Flat-XgoDuck with a compatible GPU display/streaming setup. 3D real-time viewing requires additional configuration; batch PPO itself is typically headless.

Real phone telemetry through Railway

To show actual PPO reward/loss curves directly in Robot Lab's Cloud tab, store the ROBOT_LAB_TELEMETRY_TOKEN secret on both Railway and your RunPod Pod. Run this reporter in a second authenticated Pod terminal while PPO training is active:

cd /workspace/robot-lab/xgoduck_rl
curl --fail --location --output /workspace/robot-lab-reporter.py https://hagop.io/robot-lab/runpod/telemetry.txt
uv run --with tensorboard python /workspace/robot-lab-reporter.py

The reporter reads the upstream TensorBoard event files and sends scalar samples over HTTPS with a separate worker token. It never creates GPU workloads or transmits hardware control commands. Inspect the source before running.

Once your private viewer exists, save its URL in Robot Lab’s Watch tab on your phone. For photorealistic Isaac Sim, see NVIDIA's browser streaming instructions.

05 · Securely connect RunPod to Railway

  1. In RunPod, create a dedicated API key with only the required Pod permissions, if scoped keys are offered.
  2. Open the Railway robot-lab-control project, select robot-lab-api → production → Variables, and add these three secret names: RUNPOD_API_KEY, ROBOT_LAB_OWNER_TOKEN, and ROBOT_LAB_TELEMETRY_TOKEN. Generate distinct random values of 32+ characters for the two Robot Lab tokens.
  3. On the RunPod Pod, set only ROBOT_LAB_TELEMETRY_TOKEN to match Railway's telemetry token. Never put the more powerful RUNPOD_API_KEY on the Pod.
  4. In Robot Lab's Cloud tab, enter the owner token in the private field and select FETCH MANAGED PODS or REFRESH METRICS. The token is not saved by the page.

Only Pods with names beginning robotlab- can be listed or stopped by this controller. No Pod-creation API is enabled. Never send secrets through chat, GitHub commits or public URLs.

06 · Validate and transfer to hardware

  1. Evaluate and compare checkpoints before choosing a policy.
  2. Export a matching ONNX policy using the upstream repository's documented scripts/export.py.
  3. Use the XGO-Duck BOM, STL files, PCB revisions and build guide.
  4. Use the Arduino UNO Q runtime for calibration, actuator checks, and matching ONNX playback.
  5. Test with motors unloaded, torque limits and an independent physical cutoff. Stop your RunPod Pod when finished.

A custom URDF generated in Robot Lab does not become a safe motor-control policy automatically; it needs validated masses, actuators, observation/action mapping and its own training environment.