- GPU: NVIDIA L4 (23GB VRAM)
- RAM: 16GB (swap required — see step 5b)
- Config:
pi0_libero_low_mem_finetune(LoRA, fits in <24GB) - Framework: JAX (openpi native)
cd /root/cloud_setup/openpi
GIT_LFS_SKIP_SMUDGE=1 uv syncuv run python -c "from openpi.training.config import get_config; c = get_config('pi0_libero_low_mem_finetune'); print(c.name)"Dataset: physical-intelligence/libero (1693 episodes, ~273k frames, ~35GB)
Plan A: Fetch from S3 (faster, no HF token needed)
aws s3 sync s3://chris-purina-playground/openpi/cache/huggingface/lerobot/physical-intelligence/libero/ \
~/.cache/huggingface/lerobot/physical-intelligence/libero/Plan B: Download from HuggingFace (fallback if S3 copy is missing/stale)
This happens automatically when running compute_norm_stats.py, but requires a HF token with access to the gated repo:
huggingface-cli login --token <HF_TOKEN>uv run python scripts/compute_norm_stats.py --config-name pi0_libero_low_mem_finetuneCompleted 2026-03-27. 8545 batches, ~63 min on 2 CPU workers. Output: assets/pi0_libero_low_mem_finetune/physical-intelligence/libero/norm_stats.json
Norm stats also backed up to S3:
# Upload
aws s3 cp assets/pi0_libero_low_mem_finetune/physical-intelligence/libero/norm_stats.json \
s3://chris-purina-playground/openpi/assets/pi0_libero_low_mem_finetune/physical-intelligence/libero/norm_stats.json
# Restore (skip recompute)
aws s3 cp s3://chris-purina-playground/openpi/assets/pi0_libero_low_mem_finetune/physical-intelligence/libero/norm_stats.json \
assets/pi0_libero_low_mem_finetune/physical-intelligence/libero/norm_stats.jsonsudo apt-get install -y gcc build-essential libgl1 libglib2.0-0Required for evdev (C compiler) and opencv (libGL).
The L4 GPU needs a driver installed. Without it, JAX falls back to CPU and training OOMs on 16GB RAM.
sudo apt-get install -y nvidia-driver-550-server
sudo modprobe nvidia
nvidia-smi # verify: should show L4, CUDA 12.8Installed 2026-03-30. Driver 570.211.01 was pulled in (supersedes 550). No reboot needed — modprobe sufficed.
16GB RAM is not enough for dataset loading. Without swap, the OOM killer terminates the training process (and the shell session).
sudo fallocate -l 16G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfileNote: swap does not persist across reboots. Re-run swapon after restart, or add to /etc/fstab.
XLA_PYTHON_CLIENT_MEM_FRACTION=0.9 uv run python scripts/train.py pi0_libero_low_mem_finetune --exp-name=libero_loraOptional: add --overwrite to overwrite existing experiment, or use wandb with WANDB_API_KEY=<key>.
- LoRA fine-tuning config freezes most parameters, trains only LoRA adapters
- EMA is disabled for LoRA fine-tuning
- 30,000 training steps by default (override with
--num-train-steps=N) - Base checkpoint auto-downloaded from
gs://openpi-assets/checkpoints/pi0_base/params - Norm stats saved to project assets directory after computation
- 2026-03-30: First training attempts OOM-killed the shell (no GPU driver → JAX used CPU → 16GB RAM exhausted). Fixed by installing NVIDIA driver and adding 16GB swap.