Slow in Docker

Discussion in 'Priority support' started by OkayHuman, Jan 25, 2019.

  1. I've noticed stepping into mujoco_py environments is 2-4x slower when running in a docker container

    Any clues as to why?
     
    Kyokushin likes this.
  2. Emo Todorov

    Emo Todorov Administrator Staff Member

    Is docker a virtual machine essentially? If so, that could explain it.
     
  3. Yes, but Docker usually report near native speeds for most applications...
     
  4. Emo Todorov

    Emo Todorov Administrator Staff Member

    I use neither Python nor Docker, so I am hardly an authority on this... Can you run mujoco alone in docker, without any python wrappers? The executable 'testspeed' in mujoco 2.0 is very convenient for testing simulation speed. Just compare it native vs. docker and see what happens. It could be that mujoco runs slower in docker because of AVX or some other CPU features that become inefficient in virtual machines. Or it could be that mujoco itself is fine but there is some inefficiency in the python-mujoco interface. Also, are you talking about simulation only, or also rendering? If this involves rendering, I would expect any virtual machine to be slow.
     
    Kyokushin and OkayHuman like this.