Skip to content

wsl2 dev container is not working #37

Closed

Description

@JuanCarlos-TiqueRangel

Hello everyone,

I hope you are doing well; I was trying to run crazyflow on my machine by using WSL2 ubuntu 22.04. I changed the name of the .json as you mentioned in the README. However, this is the problem when I tried to run in the dev container

--------------------
ERROR: failed to build: failed to solve: process "/bin/sh -c pip install --no-cache-dir -e \".[test,gpu]\"" did not complete successfully: exit code: 1
[5826 ms] Error: Command failed: docker buildx build --load --build-arg BUILDKIT_INLINE_CACHE=1 -f /tmp/devcontainercli-juan/container-features/0.80.1-1757959982297/Dockerfile-with-features -t vsc-crazyflow-1c15452577c77c0ea746b4184694866a65729e3de97566f4c25ceea5eaba4366 --target dev_containers_target_stage --build-arg _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label /home/juan/mujoco/crazyflow
[5827 ms]     at F6 (/home/juan/.vscode-remote-containers/dist/dev-containers-cli-0.427.0/dist/spec-node/devContainersSpecCLI.js:468:1988)
[5827 ms]     at async pw (/home/juan/.vscode-remote-containers/dist/dev-containers-cli-0.427.0/dist/spec-node/devContainersSpecCLI.js:467:1886)
[5827 ms]     at async ax (/home/juan/.vscode-remote-containers/dist/dev-containers-cli-0.427.0/dist/spec-node/devContainersSpecCLI.js:467:608)
[5827 ms]     at async Y6 (/home/juan/.vscode-remote-containers/dist/dev-containers-cli-0.427.0/dist/spec-node/devContainersSpecCLI.js:484:3842)
[5827 ms]     at async BC (/home/juan/.vscode-remote-containers/dist/dev-containers-cli-0.427.0/dist/spec-node/devContainersSpecCLI.js:484:4957)
[5827 ms]     at async p7 (/home/juan/.vscode-remote-containers/dist/dev-containers-cli-0.427.0/dist/spec-node/devContainersSpecCLI.js:665:202)
[5827 ms]     at async d7 (/home/juan/.vscode-remote-containers/dist/dev-containers-cli-0.427.0/dist/spec-node/devContainersSpecCLI.js:664:14804)
[5827 ms]     at async /home/juan/.vscode-remote-containers/dist/dev-containers-cli-0.427.0/dist/spec-node/devContainersSpecCLI.js:484:1188
[5830 ms] Exit code 1
[5833 ms] Command failed: /home/juan/.vscode-server/bin/6f17636121051a53c88d3e605c491d22af2ba755/node /home/juan/.vscode-remote-containers/dist/dev-containers-cli-0.427.0/dist/spec-node/devContainersSpecCLI.js up --container-session-data-folder /tmp/devcontainers-e33eb3b0-2271-4080-a09c-6a2bbe634f1a1757959979531 --workspace-folder /home/juan/mujoco/crazyflow --workspace-mount-consistency cached --gpu-availability detect --id-label devcontainer.local_folder=\\wsl.localhost\Ubuntu\home\juan\mujoco\crazyflow --id-label devcontainer.config_file=/home/juan/mujoco/crazyflow/.devcontainer/devcontainer.json --log-level debug --log-format json --config /home/juan/mujoco/crazyflow/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --mount type=bind,source=/run/user/1000/wayland-0,target=/tmp/vscode-wayland-0933907b-e5e6-452a-8949-e4ba4865a7f0.sock --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root --include-configuration --include-merged-configuration
[5833 ms] Exit code 1

Does anyone know what can be the issue here?

Activity

  1. added
    bugSomething isn't working
    WSLRelated to Windows Subsystem for Linux
    on Sep 16, 2025
  2. added theissue type on Sep 16, 2025
  3. amacati commented on Sep 16, 2025

    @amacati
    Collaborator
  4. OliEfr commented on Sep 16, 2025

    @OliEfr
    Contributor

    This line fails when building the container. Can you remove the "gpu" flag from the installs? I am assuming you want to run the CPU version, which should actually be the default but isnt at the moment. Also make sure the nvidia and gpu flags are commented out in the devcontainer.json. For the GPU version you'd need the additional requirements as mentioned in the README.

    Also from your logs I can see that you most likely run wayland. Switch to X11 - its saver for rendering. See README.

    Let me know if that works.

  5. JuanCarlos-TiqueRangel commented on Sep 21, 2025

    @JuanCarlos-TiqueRangel
    Author

    @OliEfr Hello, thank you for your reply and support. I was testing on a different machine with native Ubuntu 24.04 and I am facing the same problem. I need to make it work with GPU version. So in that case what can be the issue ? because you mentioned to install the nvidia cuda toolkit. But this installations must be in local ? it is getting conflicts with my nvidia drivers.

  6. OliEfr commented on Sep 21, 2025

    @OliEfr
    Contributor

    Yes the container toolkit must be installed on the host.

  7. OliEfr commented on Sep 21, 2025

    @OliEfr
    Contributor

    @amacati btw installing crazyflow as a dependency also didn't work for me. I needed to pin versions and add some dependencies:

    dependencies = [
    "crazyflow==0.0.2",
    "warp",
    "array_api_compat",
    "munch",
    "scikit-learn==1.6.1",
    "scikit-optimize==0.10.2",
    "wandb==0.19.7",
    "matplotlib",
    "termcolor",
    "gpytorch==1.14",
    "ipython==8.22.0",
    "nbconvert",
    "pygame",
    "pandas",
    "ruff"]

    [project.optional-dependencies]
    gpu = [
    "jax[cuda]==0.7.0",
    "torch==2.8.0+cu126",
    ]
    test = [
    "pytest>=8.0.0",
    "pytest-cov",
    "pytest-timeout"
    ]
    cpu = [
    "torch==2.6.0+cpu",
    ]
    pin = [
    "jax==0.7.0",
    "mujoco-mjx==3.3.0",
    "mujoco==3.3.0"
    ]

  8. amacati commented on Sep 21, 2025

    @amacati
    Collaborator

    What errors do you get installing it from scratch? Can I easily reproduce that somehow?

    Most of the pinned stuff are dependencies that we don't touch in crazyflow.

  9. OliEfr commented on Sep 21, 2025

    @OliEfr
    Contributor

    I recall that I needed to pin jax, and add array_compat_api and warp. More details I can check Tuesday!

  10. JuanCarlos-TiqueRangel commented on Oct 1, 2025

    @JuanCarlos-TiqueRangel
    Author

    Any updates regarding this issue? @OliEfr, how to use your dependencies to avoid the mentioned problems?

  11. OliEfr commented on Oct 1, 2025

    @OliEfr
    Contributor

    I created a PR that fixes the problem. Its only two lines of code. @amacati can you merge?

    @JuanCarlos-TiqueRangel

  12. amacati commented on Oct 1, 2025

    @amacati
    Collaborator

    Merged. If the problem persists, feel free to reopen this issue.

  13. JuanCarlos-TiqueRangel commented on Oct 2, 2025

    @JuanCarlos-TiqueRangel
    Author

    @OliEfr Could you please let me know how did you run the simulation. I was following the next steps, and I am facing some issues.

    Image

    After this step, I open a terminal in VScode and got this:

    Image

    Nevertheless, I continue and try to run the hover.py code, but this issue happened:

    Image

    As I mentioned before, I am using a native Ubuntu version 24.04. Do you think those errors are because of my ubuntu version?

  14. amacati commented on Oct 2, 2025

    @amacati
    Collaborator

    No, this is very likely related to the jax version. Is it pinned @OliEfr ?

  15. reopened this on Oct 2, 2025
  16. OliEfr commented on Oct 2, 2025

    @OliEfr
    Contributor

    @JuanCarlos-TiqueRangel Your first issue is becasue sh is used isntead of bash. Just run bash. I pushed a small update for the contaienr @amacati . The second issue: i have the same problem as you. I just install the projects default pyproject.toml in the container. pip show jax v0.7.2. When I install pip install jax==0.7.0 it works, but I get some version mismatch errors @amacati not sure which versions you want.

    Thanks for stickign around @JuanCarlos-TiqueRangel !

  17. amacati commented on Oct 2, 2025

    @amacati
    Collaborator

    Likely caused by a breaking change in jax > 0.7.0 which does not allow vmap to consume python ranges. The latest commits should have fixed it. As before, feel free to reopen if the issue persists.

  18. JuanCarlos-TiqueRangel commented on Oct 9, 2025

    @JuanCarlos-TiqueRangel
    Author

    @OliEfr Hello, I was following your instructions, but the simulation suddenly closed after running python3 hover.py

    Failed to import warp: No module named 'warp'
    Failed to import mujoco.mjx.third_party.mujoco_warp as mujoco_warp: No module named 'warp'
    libGL error: glx: failed to create dri3 screen
    libGL error: failed to load driver: nouveau
    

    I checked the pip show jax and still the 0.7.2. What can I do in this case? Thank you in advance for your help and support.

  19. OliEfr commented on Oct 9, 2025

    @OliEfr
    Contributor

    its a rendering issue.

    Can you run xhost +local:docker on the host and restart the docker daemon and try again?

    Let me know if it works so that I could update the docs.

  20. JuanCarlos-TiqueRangel commented on Oct 9, 2025

    @JuanCarlos-TiqueRangel
    Author

    I was thinking the same, and it is not working.

  21. OliEfr commented on Oct 9, 2025

    @OliEfr
    Contributor

    I still think its a rendering Issue. can you comment out the line that renders, eg sth like sim.render() / env.render()? Then it should run through.

    I will have time to look into this later, but unfortunately not in the coming days. Maybe some library or file mounting is missing.

  22. JuanCarlos-TiqueRangel commented on Oct 9, 2025

    @JuanCarlos-TiqueRangel
    Author

    @OliEfr Okay, I will analyze these days and check. Finally, is it normal for the motors not to move? Thank you for being so helpful. I really appreciate it.

  23. OliEfr commented on Oct 9, 2025

    @OliEfr
    Contributor

    Yes the motors are not animated.

    Rendering might be platform dependend. Try glfw rendering, for you it looks like libgl.

  24. added a commit that references this issue on Nov 11, 2025
    a4eaad5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

WSLRelated to Windows Subsystem for LinuxbugSomething isn't working

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions