Skip to main content

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
EnvHub solves these problems by: One-line loading: Load any environment from the Hub instantly ✅ Version control: Pin to specific commits for reproducibility ✅ Community sharing: Discover and contribute environments easily ✅ Zero setup: No manual installation or configuration needed ✅ Trust model: Explicit consent for remote code execution

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

Your env.py must expose a make_env function:

Step 3: Upload to the Hub

Upload your repository to HuggingFace:
Or use the Python API:

Step 4: Test Your Environment

Advanced Features

Configuration Support

Support custom configurations through the cfg 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 set trust_remote_code=True for repositories you trust.

Best Practices

  1. Pin to specific revisions for reproducibility:
  2. Review code before trusting: Check the repository contents first
  3. Use official repositories: Prefer verified authors when possible
  4. Document dependencies: Include clear requirements.txt
  5. 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

Parameters:
  • cfg: Environment config or Hub URL string
  • n_envs: Number of parallel environments per task
  • use_async_envs: Use AsyncVectorEnv for better CPU utilization
  • hub_cache_dir: Custom cache directory for Hub downloads
  • trust_remote_code: Explicit consent to execute remote code
Returns:
  • Dictionary mapping {suite_name: {task_id: vector_env}}

See Also