EnvHub: Share Simulation Environments
EnvHub is LeRobot’s reproducible environment hub — a HuggingFace-based platform for sharing, discovering, and loading simulation environments with a single line of code.Why EnvHub?
Sharing simulation environments has traditionally been challenging:- Complex dependencies and version conflicts
- Difficult to reproduce exact environment configurations
- No standardized distribution mechanism
- Hard to discover community-contributed tasks
Quick Start
Load an Environment from the Hub
Hub URL Formats
EnvHub supports flexible URL patterns:Creating Your Own EnvHub Repository
Step 1: Create Repository Structure
Your EnvHub repository needs:Step 2: Implement make_env Function
Yourenv.py must expose a make_env function:
Step 3: Upload to the Hub
Upload your repository to HuggingFace:Step 4: Test Your Environment
Advanced Features
Configuration Support
Support custom configurations through thecfg parameter:
Multi-Suite Environments
Return multiple suites and tasks:Asset Management
Include assets in your repository:Security and Trust
Remote Code Execution
EnvHub executes Python code from remote repositories. This is powerful but requires careful consideration: ⚠️ Important: Only settrust_remote_code=True for repositories you trust.
Best Practices
-
Pin to specific revisions for reproducibility:
- Review code before trusting: Check the repository contents first
- Use official repositories: Prefer verified authors when possible
-
Document dependencies: Include clear
requirements.txt - Version your releases: Tag stable versions with semantic versioning
Example Repositories
Learn from existing EnvHub repositories:LeIsaac Environment
- Repository: LightwheelAI/leisaac_env
- Features: IsaacLab integration, multiple tasks, teleoperation support
- Usage:
NVIDIA IsaacLab Arena
- Repository: nvidia/isaaclab-arena-envs
- Features: GPU-accelerated humanoid simulation, RTX rendering
- Usage:
Lightwheel BenchHub
- Repository: LightwheelAI/lw_benchhub_env
- Features: LIBERO and RoboCasa tasks with 268 environments
- Usage:
Troubleshooting
ModuleNotFoundError
If loading fails due to missing dependencies:Import Errors
Ensure all dependencies are installed locally:- EnvHub downloads the code but doesn’t install dependencies automatically
- Check the repository README for installation instructions
Version Conflicts
If you encounter version conflicts:API Reference
make_env
cfg: Environment config or Hub URL stringn_envs: Number of parallel environments per taskuse_async_envs: Use AsyncVectorEnv for better CPU utilizationhub_cache_dir: Custom cache directory for Hub downloadstrust_remote_code: Explicit consent to execute remote code
- Dictionary mapping
{suite_name: {task_id: vector_env}}
See Also
- LeIsaac Environment: IsaacLab-based SO101 tasks
- IsaacLab Arena: NVIDIA humanoid environments
- Simulation Overview: All simulation environments