Repository navigation
wsl2 dev container is not working #37
Copy link
Copy link
Closed
Labels
WSLRelated to Windows Subsystem for LinuxRelated to Windows Subsystem for LinuxbugSomething isn't workingSomething isn't working
Description
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?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
WSLRelated to Windows Subsystem for LinuxRelated to Windows Subsystem for LinuxbugSomething isn't workingSomething isn't working
Activity
amacati commentedon Sep 16, 2025
@OliEfr
OliEfr commentedon Sep 16, 2025
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.
JuanCarlos-TiqueRangel commentedon Sep 21, 2025
@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.
OliEfr commentedon Sep 21, 2025
Yes the container toolkit must be installed on the host.
OliEfr commentedon Sep 21, 2025
@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"
]
amacati commentedon Sep 21, 2025
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.
OliEfr commentedon Sep 21, 2025
I recall that I needed to pin jax, and add array_compat_api and warp. More details I can check Tuesday!
JuanCarlos-TiqueRangel commentedon Oct 1, 2025
Any updates regarding this issue? @OliEfr, how to use your dependencies to avoid the mentioned problems?
OliEfr commentedon Oct 1, 2025
I created a PR that fixes the problem. Its only two lines of code. @amacati can you merge?
@JuanCarlos-TiqueRangel
amacati commentedon Oct 1, 2025
Merged. If the problem persists, feel free to reopen this issue.
JuanCarlos-TiqueRangel commentedon Oct 2, 2025
@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.
After this step, I open a terminal in VScode and got this:
Nevertheless, I continue and try to run the hover.py code, but this issue happened:
As I mentioned before, I am using a native Ubuntu version 24.04. Do you think those errors are because of my ubuntu version?
amacati commentedon Oct 2, 2025
No, this is very likely related to the jax version. Is it pinned @OliEfr ?
OliEfr commentedon Oct 2, 2025
@JuanCarlos-TiqueRangel Your first issue is becasue
shis used isntead ofbash. Just runbash. I pushed a small update for the contaienr @amacati . The second issue: i have the same problem as you. I just install the projects defaultpyproject.tomlin the container.pip show jaxv0.7.2. When I installpip install jax==0.7.0it works, but I get some version mismatch errors @amacati not sure which versions you want.Thanks for stickign around @JuanCarlos-TiqueRangel !
amacati commentedon Oct 2, 2025
Likely caused by a breaking change in
jax > 0.7.0which does not allowvmapto consume python ranges. The latest commits should have fixed it. As before, feel free to reopen if the issue persists.JuanCarlos-TiqueRangel commentedon Oct 9, 2025
@OliEfr Hello, I was following your instructions, but the simulation suddenly closed after running
python3 hover.pyI checked the
pip show jaxand still the 0.7.2. What can I do in this case? Thank you in advance for your help and support.OliEfr commentedon Oct 9, 2025
its a rendering issue.
Can you run
xhost +local:dockeron the host and restart the docker daemon and try again?Let me know if it works so that I could update the docs.
JuanCarlos-TiqueRangel commentedon Oct 9, 2025
I was thinking the same, and it is not working.
OliEfr commentedon Oct 9, 2025
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.
JuanCarlos-TiqueRangel commentedon Oct 9, 2025
@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.
OliEfr commentedon Oct 9, 2025
Yes the motors are not animated.
Rendering might be platform dependend. Try glfw rendering, for you it looks like libgl.
Replace range in vmap for jax > 0.7.0. Fix learnsyslab#37.