Open jackylee1 opened 3 months ago
Hello @jackylee1, Really sorry but we didnt understand your message! Please edit your issue or we might close it in a few days :/ Best regards
ptr = ctx.call(mujoco.MjrContext, model.ptr, font_scale) File "/root/anaconda3/envs/lerobot/lib/python3.10/site-packages/dm_control/_render/executor/render_executor.py", line 138, in call return func(*args, **kwargs) mujoco.FatalError: an OpenGL platform library has not been loaded into this process, this most likely means that a valid OpenGL context has not been created before mjr_makeContext was called
Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.
@jackylee1 We provide pointers to the library that you need to install with apt-get
(on Linux/Ubuntu) to make mujoco work with OpenGL.
https://github.com/huggingface/lerobot/blob/main/docker/lerobot-gpu-dev/Dockerfile#L8-L40
Run:
apt-get update && apt-get install -y --no-install-recommends \
build-essential cmake \
git git-lfs openssh-client \
nano vim less util-linux \
htop atop nvtop \
sed gawk grep curl wget \
tcpdump sysstat screen tmux \
libglib2.0-0 libgl1-mesa-glx libegl1-mesa ffmpeg
Add this to your bashrc
export MUJOCO_GL="egl"
Let me know if it was useful.
@aliberts Should we add this in the README?
I only see sudo apt-get install cmake build-essential
raise ImportError('Cannot initialize a headless EGL display.') ImportError: Cannot initialize a headless EGL display. still shows error
please,how to run the docker images ,
Hi, yes you need to export MUJOCO_GL=egl
(no quotes) or simply prepend your python command with MUJOCO_GL=egl
We were thinking of a better way of handling in #55 this but I haven't found a way to ensure it's working on any platform for now. Leaving this to the user is probably best for now.
Found the latest cached dataset configuration 'default' at /root/.cache/huggingface/datasets/lerobot_aloha_sim_insertionhuman/default/0.0.0/3cdeec058acd3e3583e9c22c24e6c3338b8cd712 (last modified on Sat Jun 1 22:24:10 2024). WARNING 2024-06-07 14:09:17 che/cache.py:95 Found the latest cached dataset configuration 'default' at /root/.cache/huggingface/datasets/lerobotaloha_sim_insertion_human/default/0.0.0/3cdeec058acd3e3583e9c22c24e6c3338b8cd712 (last modified on Sat Jun 1 22:24:10 2024).
INFO 2024-06-07 14:31:02 ts/train.py:294 make_env
INFO 2024-06-07 14:31:02 /init.py:84 MUJOCO_GL=%s, attempting to import specified OpenGL backend.
INFO 2024-06-07 14:31:02 pesloader.py:70 Failed to load library ( %r ): %s
INFO 2024-06-07 14:31:02 pesloader.py:70 Failed to load library ( %r ): %s
INFO 2024-06-07 14:31:02 tesupport.py:23 No OpenGL_accelerate module loaded: %s
Error executing job with overrides: ['policy=act', 'env=aloha', 'env.task=AlohaInsertion-v0', 'dataset_repo_id=lerobot/aloha_sim_insertion_human']
Traceback (most recent call last):
File "/opt/lerobot/lerobot/scripts/train.py", line 415, in train_cli
train(
File "/opt/lerobot/lerobot/scripts/train.py", line 295, in train
eval_env = make_env(cfg)
File "/root/anaconda3/envs/lerobot/lib/python3.10/site-packages/lerobot/common/envs/factory.py", line 48, in make_env
env = env_cls(
File "/root/anaconda3/envs/lerobot/lib/python3.10/site-packages/gymnasium/vector/sync_vector_env.py", line 53, in init
self.envs = [env_fn() for env_fn in env_fns]
File "/root/anaconda3/envs/lerobot/lib/python3.10/site-packages/gymnasium/vector/sync_vector_env.py", line 53, in
Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.
still shows error
Can you please provide me with more context?
What's your system? (OS, hardware, etc.) You can use this script for that:
python lerobot/scripts/display_sys_info.py
Are you using a docker image, and if so which one? Also can you tell what command are you trying to run?
i am on wsl
(lerobot) root@MS-TGCPQOCCPPUG:/opt/lerobot# python lerobot/scripts/display_sys_info.py
Copy-and-paste the text below in your GitHub issue and FILL OUT the two last points.
lerobot
version: 0.1.0(lerobot) root@MS-TGCPQOCCPPUG:/opt/lerobot#
Can you run try to the gpu docker image?
docker run -ti --gpus all --shm-size "16gb" huggingface/lerobot-gpu:latest
Then inside it:
DATA_DIR=tests/data pytest -v tests/
PS D:> cd D:\Ubuntu_WSL PS D:\Ubuntu_WSL> cd lerobotdocker PS D:\Ubuntu_WSL\lerobotdocker> docker run -ti --gpus all --shm-size "16gb" huggingface/lerobot-gpu:latest docker: error during connect: in the default daemon configuration on Windows, the docker client must be run with elevated privileges to connect: Head "http://%2F%2F.%2Fpipe%2Fdocker_engine/_ping": open //./pipe/docker_engine: The system cannot find the file specified. See 'docker run --help'. PS D:\Ubuntu_WSL\lerobotdocker> PS D:\Ubuntu_WSL\lerobotdocker> docker run -ti --gpus all --shm-size "16gb" huggingface/lerobot-gpu:latest Unable to find image 'huggingface/lerobot-gpu:latest' locally latest: Pulling from huggingface/lerobot-gpu 3c645031de29: Already exists 0d6448aff889: Already exists 0a7674e3e8fe: Already exists b71b637b97c5: Already exists 56dc85502937: Already exists 4d51d73ad7c8: Pull complete b9348706a1f3: Pull complete ed20b7cce72b: Pull complete 0a8fab373494: Pull complete a2fa069f3555: Pull complete 4f4fb700ef54: Pull complete 20f46d2e78b1: Pull complete f569dc9eb6fe: Pull complete Digest: sha256:08f6064c5b7d188de409bf82755be99d51b8062de60c8a0d88cf050bad744698 Status: Downloaded newer image for huggingface/lerobot-gpu:latest docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running hook #0: error running hook: exit status 1, stdout: , stderr: Auto-detected mode as 'legacy' nvidia-container-cli: requirement error: unsatisfied condition: cuda>=12.4, please update your driver to a newer version, or use an earlier cuda container: unknown. PS D:\Ubuntu_WSL\lerobotdocker>
Can you build the Dockerfile with your cuda version?
- FROM nvidia/cuda:12.4.1-base-ubuntu22.04
+ FROM nvidia/cuda:12.1.0-base-ubuntu22.04
[9/9] RUN pip install --no-cache-dir ".[test, aloha, xarm, pusht]": 0.532 ERROR: Directory '.[test, aloha, xarm, pusht]' is not installable. Neither 'setup.py' nor 'pyproject.toml' found.
Dockerfile:26
24 | WORKDIR /lerobot 25 | RUN pip install --upgrade --no-cache-dir pip 26 | >>> RUN pip install --no-cache-dir ".[test, aloha, xarm, pusht]" 27 | 28 | # Set EGL as the rendering backend for MuJoCo
ERROR: failed to solve: process "/bin/sh -c pip install --no-cache-dir \".[test, aloha, xarm, pusht]\"" did not complete successfully: exit code: 1
View build details: docker-desktop://dashboard/build/default/default/hynlno8fd4yum8kwrg4168u7c
Directory '.[test, aloha, xarm, pusht]' is not installable. Neither 'setup.py' nor 'pyproject.toml' found.
Yes, you need to build from the root directory of this repo
(because of COPY . /lerobot
)
still shows error
how to use on wslcan not visulize