in linux/cuda_installer/os_installers/__init__.py [0:0]
def get_installer(cls) -> "LinuxInstaller":
"""
Retrieve an Installer instance appropriate for the hosting operating system.
"""
system, version = cls._detect_linux_distro()
from os_installers.debian import DebianInstaller
from os_installers.ubuntu import UbuntuInstaller
from os_installers.rhel import RHELInstaller
from os_installers.rocky import RockyInstaller
if system == System.Debian:
return DebianInstaller()
elif system == System.Ubuntu:
return UbuntuInstaller()
elif system == System.RHEL:
return RHELInstaller()
elif system == System.Rocky:
return RockyInstaller()
else:
raise NotImplementedError(
"Sorry, don't know how to install for this system."
)