openai gym 中的渲染错误

openai gym 中的渲染错误

我目前正在 Ubuntu WSL 上运行,并且安装了 nvidia 驱动程序,但仍然遇到错误

2023-04-03 09:45:48.057924: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2023-04-03 09:45:48.463632: E tensorflow/stream_executor/cuda/cuda_blas.cc:2981] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
2023-04-03 09:45:49.790301: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer.so.7'; dlerror: libnvinfer.so.7: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /home/siddharth/miniconda3/lib/python3.8/site-packages/cv2/../../lib64:/opt/ros/humble/opt/rviz_ogre_vendor/lib:/opt/ros/humble/lib/x86_64-linux-gnu:/opt/ros/humble/lib
2023-04-03 09:45:49.790483: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer_plugin.so.7'; dlerror: libnvinfer_plugin.so.7: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /home/siddharth/miniconda3/lib/python3.8/site-packages/cv2/../../lib64:/opt/ros/humble/opt/rviz_ogre_vendor/lib:/opt/ros/humble/lib/x86_64-linux-gnu:/opt/ros/humble/lib
2023-04-03 09:45:49.790494: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly.

除此之外,当我尝试渲染健身房物体时,我遇到了这个错误

libGL error: 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)
libGL error: failed to load driver: swrast

其他 GUI 应用程序(如 x11 应用程序、dolphin 等)运行良好,但这是我目前遇到的唯一错误,我已重新安装了 cuda 驱动程序等,但没有任何帮助。我是这个领域的新手,请耐心等待...

答案1

看来您遇到了 OpenGL 驱动程序问题。WSL 默认不附带 GPU 加速图形。

尝试安装所需的 OpenGL 和 MESA 包:

sudo apt update
sudo apt install libgl1-mesa-glx libegl1-mesa libxrandr2 libxrandr2 libxss1 libxcursor1 libxcomposite1 libasound2 libxi6 libxtst6 libglu1-mesa libgles2-mesa libglew-dev

相关内容