Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question for Docker #46

Open
zgmaguoqing opened this issue Dec 6, 2023 · 2 comments
Open

Question for Docker #46

zgmaguoqing opened this issue Dec 6, 2023 · 2 comments

Comments

@zgmaguoqing
Copy link

Hi,NM512,im trying to use docker to run dreamerv3 but face some question below, it seems caused by mujoco,how could I fix it?Hope to your reply.

root@cb0af21e2e22:/workspace/dreamerv3-torch# python3 dreamer.py --configs dmc_vision --task dmc_walker_walk --logdir ./logdir/dmc_walker_walk
Logdir logdir/dmc_walker_walk
Create envs.
/opt/conda/lib/python3.10/site-packages/scipy/__init__.py:132: UserWarning: A NumPy version >=1.21.6 and <1.28.0 is required for this version of SciPy (detected version 1.21.0)
  warnings.warn(f"A NumPy version >={np_minversion} and <{np_maxversion}"
Traceback (most recent call last):
  File "/workspace/dreamerv3-torch/dreamer.py", line 392, in <module>
    main(parser.parse_args(remaining))
  File "/workspace/dreamerv3-torch/dreamer.py", line 266, in main
    train_envs = [make("train") for _ in range(config.envs)]
  File "/workspace/dreamerv3-torch/dreamer.py", line 266, in <listcomp>
    train_envs = [make("train") for _ in range(config.envs)]
  File "/workspace/dreamerv3-torch/dreamer.py", line 265, in <lambda>
    make = lambda mode: make_env(config, mode)
  File "/workspace/dreamerv3-torch/dreamer.py", line 179, in make_env
    env = dmc.DeepMindControl(
  File "/workspace/dreamerv3-torch/envs/dmc.py", line 15, in __init__
    self._env = suite.load(
  File "/opt/conda/lib/python3.10/site-packages/dm_control/suite/__init__.py", line 113, in load
    return build_environment(domain_name, task_name, task_kwargs,
  File "/opt/conda/lib/python3.10/site-packages/dm_control/suite/__init__.py", line 148, in build_environment
    env = domain.SUITE[task_name](**task_kwargs)
  File "/opt/conda/lib/python3.10/site-packages/dm_control/suite/walker.py", line 62, in walk
    physics = Physics.from_xml_string(*get_model_and_assets())
  File "/opt/conda/lib/python3.10/site-packages/dm_control/mujoco/engine.py", line 436, in from_xml_string
    return cls.from_model(model)
  File "/opt/conda/lib/python3.10/site-packages/dm_control/mujoco/engine.py", line 419, in from_model
    return cls(data)
  File "/opt/conda/lib/python3.10/site-packages/dm_control/mujoco/engine.py", line 123, in __init__
    self._reload_from_data(data)
  File "/opt/conda/lib/python3.10/site-packages/dm_control/mujoco/engine.py", line 400, in _reload_from_data
    model=index.struct_indexer(self.model, 'mjmodel', axis_indexers),
  File "/opt/conda/lib/python3.10/site-packages/dm_control/mujoco/index.py", line 628, in struct_indexer
    attr = getattr(struct, field_name)
AttributeError: 'MjModel' object has no attribute 'eq_active'. Did you mean: 'eq_active0'?
@Raffaelbdl
Copy link

In my case, it seems like upgrading dm_control did the trick, but I have not thoroughly tested if it breaks something else.

pip3 install --upgrade dm_control

@NM512
Copy link
Owner

NM512 commented Jan 8, 2024

Hello,

Thank you for reaching out and sharing the issue you're encountering with Docker while trying to run DreamerV3. The problem you're experiencing is indeed related to the recent major update of Mujoco to versions beyond 3.0.0.

To resolve this, I have updated our project to fix the Mujoco version. This fix is included in the latest commit.

If you continue to face any challenges or have further questions, please don't hesitate to reach out again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants