diff --git a/dimos/robot/unitree_webrtc/mujoco_connection.py b/dimos/robot/unitree_webrtc/mujoco_connection.py index 4a544c53e7..d95c616b13 100644 --- a/dimos/robot/unitree_webrtc/mujoco_connection.py +++ b/dimos/robot/unitree_webrtc/mujoco_connection.py @@ -58,8 +58,13 @@ def __init__(self, global_config: GlobalConfig) -> None: except ImportError: raise ImportError("'mujoco' is not installed. Use `pip install -e .[sim]`") + # Pre-download the mujoco_sim data. get_data("mujoco_sim") + # Trigger the download of the mujoco_menajerie package. This is so it + # doesn't trigger in the mujoco process where it can time out. + import mujoco_playground + self.global_config = global_config self.process: subprocess.Popen[bytes] | None = None self.shm_data: ShmWriter | None = None diff --git a/dimos/utils/data.py b/dimos/utils/data.py index 8b70c2ad27..117269af51 100644 --- a/dimos/utils/data.py +++ b/dimos/utils/data.py @@ -13,6 +13,7 @@ # limitations under the License. from functools import cache +import os from pathlib import Path import subprocess import tarfile @@ -70,11 +71,14 @@ def _lfs_pull(file_path: Path, repo_root: Path) -> None: try: relative_path = file_path.relative_to(repo_root) + env = os.environ.copy() + env["GIT_LFS_FORCE_PROGRESS"] = "1" + subprocess.run( ["git", "lfs", "pull", "--include", str(relative_path)], cwd=repo_root, check=True, - capture_output=True, + env=env, ) except subprocess.CalledProcessError as e: raise RuntimeError(f"Failed to pull LFS file {file_path}: {e}")