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

Please share the versions of GPU, PyTorch, CUDA, Python, and Linux. #207

Open
Logic-TARS opened this issue Dec 21, 2024 · 8 comments
Open

Comments

@Logic-TARS
Copy link

Please share the versions of GPU, PyTorch, CUDA, Python, and Linux that allow you to run Genesis properly, so I can use them as a reference.

@Habatakurikei
Copy link

Hi, I have just resolved my case.

My environment:

  • Mac Studio
  • Python 3.10.16 (Anaconda/conda 24.7.1)
  • Sequoia 15.2
  • M2 Ultra
  • torch 2.5.1

Commands:
conda create --name genesis python=3.10 -y
conda activate genesis
python -m pip install genesis-world
python -m pip install torch torchvision torchaudio
python render_on_macos.py -v

Hope if it helps your case. Thanks.

@Xu-Xuanhui
Copy link

Intel 14700, NVIDIA 4070,
Ubuntu 22.04 , NVIDIA535, CUDA 12.2
python 3.10
torch 2.2
It is easy to install genesis. The default version of PyOpenGL is 3.1.7, but it will encounter errors during runtime. I found that version 3.1.4 of PyOpenGL can be used. As the user guider reporting, if you followed 2.A and see “GLIBCXX_3.4.30 not found”.
cd ~/anaconda3/envs/genesis/lib
mv libstdc++.so.6 libstdc++.so.6.old
ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6 libstdc++.so.6

However, LuisaRender has strict requirements for Ubuntu and CUDA versions.

@DuinoDu
Copy link

DuinoDu commented Dec 21, 2024

Hi, I have just resolved my case.

My environment:

  • Mac Studio
  • Python 3.10.16 (Anaconda/conda 24.7.1)
  • Sequoia 15.2
  • M2 Ultra
  • torch 2.5.1

Commands: conda create --name genesis python=3.10 -y conda activate genesis python -m pip install genesis-world python -m pip install torch torchvision torchaudio python render_on_macos.py -v

Hope if it helps your case. Thanks.

@Habatakurikei Hi, just curious about genesis on mac. Do you meet OpenGL.error.GLError (#165) when executing python render_on_macos.py -v?

OpenGL.error.GLError: GLError(
	err = 1282,
	description = b'invalid operation',
	baseOperation = glBindFramebuffer,
	cArguments = (GL_DRAW_FRAMEBUFFER, 0)

@Habatakurikei
Copy link

Hi, I have just resolved my case.
My environment:

  • Mac Studio
  • Python 3.10.16 (Anaconda/conda 24.7.1)
  • Sequoia 15.2
  • M2 Ultra
  • torch 2.5.1

Commands: conda create --name genesis python=3.10 -y conda activate genesis python -m pip install genesis-world python -m pip install torch torchvision torchaudio python render_on_macos.py -v
Hope if it helps your case. Thanks.

@Habatakurikei Hi, just curious about genesis on mac. Do you meet OpenGL.error.GLError (#165) when executing python render_on_macos.py -v?

OpenGL.error.GLError: GLError(
	err = 1282,
	description = b'invalid operation',
	baseOperation = glBindFramebuffer,
	cArguments = (GL_DRAW_FRAMEBUFFER, 0)

No, I did not face any error including GLError through that setup.
I attach a video how python render_on_macos.py -v worked on my Mac studio.

Ah4cGpFoqL2CjXe8.mp4

@oscar-lima
Copy link

oscar-lima commented Dec 21, 2024

  • GPU: Quadro RTX 4000
  • PyTorch version: 2.5.1+cu121
  • CUDA Version: 12.2
  • Python version: 3.10.9 (via pyenv)
  • Linux: Ubuntu 20.04

Does not work for me: LuisaRenderPy
Update: now LuisaRender works as well, but was very hard to install !

@analogjedi
Copy link

Hi, I have just resolved my case.

My environment:

  • Mac Studio
  • Python 3.10.16 (Anaconda/conda 24.7.1)
  • Sequoia 15.2
  • M2 Ultra
  • torch 2.5.1

Commands: conda create --name genesis python=3.10 -y conda activate genesis python -m pip install genesis-world python -m pip install torch torchvision torchaudio python render_on_macos.py -v

Hope if it helps your case. Thanks.

@Habatakurikei , thank you for posting this! I have been struggling to make any progress with a Python virtual environment (tried both Python 12 and 11). I did not try Python 10 in the venv so I am not sure if that was the reason..... but I did use your recipe with Miniconda on my Mac M3 and it finally worked! :-)

@bradmcgo
Copy link

bradmcgo commented Dec 22, 2024

Environment Details

Operating System

  • Ubuntu 22.04

Python Environment (inside of a Conda environment)

  • Python 3.9
  • PyTorch 2.5.1

GPU Setup

  • CUDA 12.2
  • NVIDIA Driver 535
  • Hardware: RTX 3080Ti

Nvidia driver/CUDA Installation Steps

CUDA Installation

NVIDIA Driver Installation

✅ Confirmed working with LuisaRender

@NicholasZiglio
Copy link
Contributor

NicholasZiglio commented Jan 1, 2025

OS

Ubuntu 24.04

GPU

RTX 2070 (laptop)
NVIDIA-SMI 550.120
Driver Version: 550.120
CUDA Version: 12.4

Python

Anaconda: 24.9.2

curl -O https://repo.anaconda.com/archive/Anaconda3-2024.10-1-Linux-x86_64.sh
bash ~/Anaconda3-2024.10-1-Linux-x86_64.sh

python 3.9

conda create --name genesis_env python=3.9
conda activate genesis_env

Pytorch

Installed Pytorch 2.5.1 in my conda genesis_env with python=3.9
conda install pytorch torchvision torchaudio pytorch-cuda=12.4 -c pytorch -c nvidia

Genesis

Installed AFTER pytorch in my conda genesis_env with python=3.9
pip install genesis-world

Fix pyglet.gl.ContextException: Could not create GL context

When running:

import genesis as gs
gs.init(backend=gs.cpu)

scene = gs.Scene(show_viewer=True)
plane = scene.add_entity(gs.morphs.Plane())
franka = scene.add_entity(
    gs.morphs.MJCF(file='xml/franka_emika_panda/panda.xml'),
)

scene.build()

for i in range(1000):
    scene.step()

Was getting this error:

(genesis_env) nicholas@nicholas-laptop:~/robotics/genesis$ python init.py
[Genesis] [11:13:26] [INFO] ╭───────────────────────────────────────────────────────────────╮
[Genesis] [11:13:26] [INFO] │┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈ Genesis ┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈│
[Genesis] [11:13:26] [INFO] ╰───────────────────────────────────────────────────────────────╯
[Genesis] [11:13:26] [INFO] Running on [Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz] with backend gs.cpu. Device memory: 31.20 GB.
[Genesis] [11:13:26] [INFO] 🚀 Genesis initialized. 🔖 version: 0.2.0, 🌱 seed: None, 📏 precision: '32', 🐛 debug: False, 🎨 theme: 'dark'.
[Genesis] [11:13:26] [INFO] Scene created.
[Genesis] [11:13:26] [INFO] Adding <gs.RigidEntity>. idx: 0, uid: <3a69964>, morph: <gs.morphs.Plane>, material: <gs.materials.Rigid>.
[Genesis] [11:13:26] [INFO] Adding <gs.RigidEntity>. idx: 1, uid: , morph: <gs.morphs.MJCF(file='/home/nicholas/anaconda3/envs/genesis_env/lib/python3.9/site-packages/genesis/assets/xml/franka_emika_panda/panda.xml')>, material: <gs.materials.Rigid>.
[Genesis] [11:13:27] [INFO] Building scene ...
[Genesis] [11:13:32] [INFO] Compiling simulation kernels...
[Genesis] [11:13:39] [INFO] Building visualizer...
MESA-LOADER: failed to open iris: /usr/lib/dri/iris_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
failed to load driver: iris
MESA-LOADER: failed to open iris: /usr/lib/dri/iris_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
failed to load driver: iris
MESA-LOADER: failed to open swrast: /usr/lib/dri/swrast_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
Exception in thread Thread-2:
Traceback (most recent call last):
File "/home/nicholas/anaconda3/envs/genesis_env/lib/python3.9/threading.py", line 980, in _bootstrap_inner
self.run()
File "/home/nicholas/anaconda3/envs/genesis_env/lib/python3.9/threading.py", line 917, in run
self._target(*self._args, **self._kwargs)
File "/home/nicholas/anaconda3/envs/genesis_env/lib/python3.9/site-packages/genesis/ext/pyrender/viewer.py", line 1126, in _init_and_start_app
super(Viewer, self).init(
File "/home/nicholas/anaconda3/envs/genesis_env/lib/python3.9/site-packages/pyglet/window/xlib/init.py", line 168, in init
super().init(*args, **kwargs)
File "/home/nicholas/anaconda3/envs/genesis_env/lib/python3.9/site-packages/pyglet/window/init.py", line 527, in init
context = config.create_context(gl.current_context)
File "/home/nicholas/anaconda3/envs/genesis_env/lib/python3.9/site-packages/pyglet/gl/xlib.py", line 114, in create_context
return XlibContext(self, share)
File "/home/nicholas/anaconda3/envs/genesis_env/lib/python3.9/site-packages/pyglet/gl/xlib.py", line 149, in init
raise gl.ContextException(msg)
pyglet.gl.ContextException: Could not create GL context
MESA-LOADER: failed to open iris: /usr/lib/dri/iris_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
failed to load driver: iris
MESA-LOADER: failed to open iris: /usr/lib/dri/iris_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
failed to load driver: iris
MESA-LOADER: failed to open swrast: /usr/lib/dri/swrast_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
^C
^CTraceback (most recent call last):
File "/home/nicholas/robotics/genesis/init.py", line 13, in
scene.build()
File "/home/nicholas/anaconda3/envs/genesis_env/lib/python3.9/site-packages/genesis/utils/misc.py", line 38, in wrapper
return method(self, *args, **kwargs)
File "/home/nicholas/anaconda3/envs/genesis_env/lib/python3.9/site-packages/genesis/engine/scene.py", line 556, in build
self._visualizer.build()
File "/home/nicholas/anaconda3/envs/genesis_env/lib/python3.9/site-packages/genesis/vis/visualizer.py", line 104, in build
self._viewer.build(self._scene)
File "/home/nicholas/anaconda3/envs/genesis_env/lib/python3.9/site-packages/genesis/vis/viewer.py", line 69, in build
self._pyrender_viewer = pyrender.Viewer(
File "/home/nicholas/anaconda3/envs/genesis_env/lib/python3.9/site-packages/genesis/ext/pyrender/viewer.py", line 379, in init
self._initialized_event.wait()
File "/home/nicholas/anaconda3/envs/genesis_env/lib/python3.9/threading.py", line 581, in wait
signaled = self._cond.wait(timeout)
File "/home/nicholas/anaconda3/envs/genesis_env/lib/python3.9/threading.py", line 312, in wait
waiter.acquire()
KeyboardInterrupt
[Genesis] [11:22:17] [INFO] 💤 Exiting Genesis and caching compiled kernels...

First I checked I had mesa-utils installed (which I didn't) with the following:
glxinfo | grep "OpenGL"

To install:

sudo apt update
sudo apt install mesa-utils

Then I replaced the libstdc++.so.6 in my anaconda env with a symlink to my system's (thanks chatgpt):

mv $CONDA_PREFIX/lib/libstdc++.so.6 $CONDA_PREFIX/lib/libstdc++.so.6.bak
ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6 $CONDA_PREFIX/lib/libstdc++.so.6

Finally add this before importing genesis in the python file being executed.

import os
os.environ['PYOPENGL_PLATFORM'] = 'glx'

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

8 participants