Giter VIP home page Giter VIP logo

Comments (6)

ehfd avatar ehfd commented on May 31, 2024

Yeah. llvmpipe means you are not using the GPU. You need the /dev/dri DRM devices and it is supposed to be available if your Kernel Modesetting is set up correctly during NVIDIA driver install.
Probably reinstall NVIDIA driver & blacklist the Nouveau open source driver or install the NVIDIA driver with your OS's own package manager, then enable the Direct Rendering Manager. Not a container issue. Will keep it open for more questions.
NOTE: https://download.nvidia.com/XFree86/Linux-x86_64/470.42.01/README/kms.html

from docker-nvidia-egl-desktop.

LiangHuangBC avatar LiangHuangBC commented on May 31, 2024

Thanks for quick reply. Your another image ehfd/docker-nvidia-glx-desktop is working well, so we are on it now. Thanks for your work.

from docker-nvidia-egl-desktop.

ehfd avatar ehfd commented on May 31, 2024

The ehfd/docker-nvidia-egl-desktop container is guaranteed to work on multiple desktops over ehfd/docker-nvidia-glx-desktop (which uses quite hacky configurations to use Xorg inside containers) and is the recommended container to use. But ehfd/docker-nvidia-egl-desktop doesn't support Vulkan. If you need Vulkan use https://github.com/mviereck/x11docker, but you need to use docker on one single node with full root control and cannot be used on other container orchestration platforms. The ehfd/docker-nvidia-glx-desktop container is a limited functionality container designed for multi-node clusters with container orchestration or when root access is not available until Xwayland support for NVIDIA proprietary drivers are available.

TROUBLESHOOTING: this problem you likely did not disable Nouveau properly or the kernel modules for your NVIDIA drivers are set up incorrectly. It is recommended to use the package managers to install the drivers instead of installing with .run files.

Uninstall NVIDIA drivers completely and reinstall (if you don't know how to uninstall, install the whole OS again), preferably with the package manager of the Linux distribution with sudo or with root and then reboot. Check if the NVIDIA DRM module is enabled with lsmod | grep nvidia.drm. The below instruction is for newer cards and there may be a different package version (e.g. 390.xx) that needs to be set for discontinued GPUs.

For Ubuntu use ubuntu-drivers autoinstall to install recommended drivers automatically or apt-get install nvidia-driver-460 (this package) for example if you want to specify a specific NVIDIA driver version. Similar for Debian (https://wiki.debian.org/NvidiaGraphicsDrivers#Installation).

For Arch Linux use pacman -S nvidia lib32-nvidia-utils or pacman -S nvidia-lts lib32-nvidia-utils for linux-lts kernels. For Manjaro mhwd -a pci nonfree 0300. Enable DRM if you checked lsmod | grep nvidia.drm after reboot and it was not already enabled https://wiki.archlinux.org/index.php/NVIDIA#DRM_kernel_mode_setting.

For OpenSUSE or SLES go to "Software Repositories" in YaST2. Click "ADD" on the bottom left and "Next" after selecting "Community Repositories". Select "NVIDIA" and click "OK". Trust the repository and go to "Online Update". click on "Extras" and select "Install All Matching Recommended Packages". This pulls the recommended NVIDIA drivers automatically. Check https://en.opensuse.org/SDB:NVIDIA_drivers for command-line installation.

For RHEL, CentOS, or Fedora, use https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#driver-installation. You don't need to install CUDA if you don't want to as the CUDA library will not be used by containers and you need nvidia/cuda or containers based on it instead.

If you really need to install drivers using the .run file (and you are prepared to reinstall your operating system very frequently), consult https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#runfile, except you just have to follow the steps after downloading NVIDIA-Linux-x86_64-<version>.run instead of cuda_<version>_linux.run as you don't have to install CUDA.

On any distribution, select "yes" ESPECIALLY when you see something similar to the below and you should also select "yes" or "default" for other options you don't know during driver installation:

Would you like to register the kernel module sources with DKMS? This will allow DKMS to automatically build a new module, if you install a different kernel later.

You should have the DRM devices available after reboot if you selected yes for this.

If the above options was not applied or you have installed the NVIDIA drivers with the .run file, you might need this (NOT RECOMMENDED because you must rebuild initramfs every time when the kernel is updated, https://wiki.archlinux.org/index.php/NVIDIA#DRM_kernel_mode_setting):

nvidia 364.16 adds support for DRM (Direct Rendering Manager) kernel mode setting. To enable this feature, add the nvidia-drm.modeset=1 kernel parameter. For basic functionality that should suffice, if you want to ensure it's loaded at the earliest possible occasion, or are noticing startup issues (such as the nvidia kernel module being loaded after the Display manager) you can add nvidia, nvidia_modeset, nvidia_uvm and nvidia_drm to the initramfs according to Mkinitcpio#MODULES. If added to the initramfs do not forget to run mkinitcpio every time there is a nvidia driver update.

mkinitcpio in Arch and Manjaro is equivalent to update-initramfs in Ubuntu.

NOTE: https://download.nvidia.com/XFree86/Linux-x86_64/470.42.01/README/kms.html

Note you also require the NVIDIA container toolkit to successfully use containers using NVIDIA GPUs.

from docker-nvidia-egl-desktop.

LiangHuangBC avatar LiangHuangBC commented on May 31, 2024

Thanks a lot for your help, I tried your glx image, which is good but only one people can use it. The thing is after run that glx image, /dev/dri appears on host machine (side effect of --privileged?? ), now we can use this egl image. Now we are running gazebo and ros on it, lucky~~. Another thing is now I need vulkan for lgsvl simulator, then we ordered new machines for it. Hopefully Nvidia will release new driver soon, we can go back to containers' world.

from docker-nvidia-egl-desktop.

LeehanLee avatar LeehanLee commented on May 31, 2024

Thanks a lot for your help, I tried your glx image, which is good but only one people can use it. The thing is after run that glx image, /dev/dri appears on host machine (side effect of --privileged?? ), now we can use this egl image. Now we are running gazebo and ros on it, lucky~~. Another thing is now I need vulkan for lgsvl simulator, then we ordered new machines for it. Hopefully Nvidia will release new driver soon, we can go back to containers' world.

hi @LiangHuangBC , you mentioned you have ran gazebo on this docker-nvidia-egl-desktop container, did you see the render area of gazebo keeps flickering?

flickering.mp4

from docker-nvidia-egl-desktop.

ehfd avatar ehfd commented on May 31, 2024

/dev/dri is no longer required for NVIDIA GPUs. Use VGL_DISPLAY=egl[n] or default.

from docker-nvidia-egl-desktop.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.