Documentation ¶
Overview ¶
Package installer provides functionality to install GPU drivers.
Index ¶
- Constants
- Variables
- func ConfigureCachedInstallation(gpuInstallDirHost string, needSigned, test, kernelOpen, noVerify bool, ...) error
- func ConfigureDriverInstallationDirs(gpuInstallDirHost string, kernelRelease string) (chan<- int, error)
- func DownloadDriverInstallerV2(ctx context.Context, downloader cos.ExtensionsDownloader, driverVersion string) (string, error)
- func DownloadGPUDriverVersionArtifacts(ctx context.Context, downloader cos.ArtifactsDownloader) (map[string]string, error)
- func DownloadGPUDriverVersionsProto(ctx context.Context, downloader cos.ArtifactsDownloader, gpuInstallDir string) ([]byte, error)
- func DownloadGenericDriverInstaller(ctx context.Context, downloader *cos.GCSDownloader, driverVersion string) (string, error)
- func DownloadToInstallDir(url, infoStr string) (string, error)
- func GetGPUDriverVersion(ctx context.Context, downloader cos.ArtifactsDownloader, alias string) (string, error)
- func PrebuiltModulesAvailable(ctx context.Context, downloader *cos.GCSDownloader, driverVersion string, ...) (bool, error)
- func RunDriverInstaller(toolchainDir, installerFilename, driverVersion string, ...) error
- func RunDriverInstallerPrebuiltModules(ctx context.Context, downloader *cos.GCSDownloader, ...) error
- func VerifyDriverInstallation(noVerify, debug bool) error
- type Cacher
Constants ¶
const ( DefaultVersion = "default" LatestVersion = "latest" MajorGPUDriverArtifactPrefix = "gpu_" MajorGPUDriverArtifactSuffix = "_version" )
Variables ¶
var ( // ErrDriverLoad indicates that installed GPU drivers could not be loaded into // the kernel. ErrDriverLoad = stderrors.New("failed to load GPU drivers") )
Functions ¶
func ConfigureCachedInstallation ¶
func ConfigureCachedInstallation(gpuInstallDirHost string, needSigned, test, kernelOpen, noVerify bool, moduleParameters modules.ModuleParameters) error
ConfigureCachedInstallation updates ldconfig and installs the cached GPU driver kernel modules.
func ConfigureDriverInstallationDirs ¶
func ConfigureDriverInstallationDirs(gpuInstallDirHost string, kernelRelease string) (chan<- int, error)
ConfigureDriverInstallationDirs configures GPU driver installation directories by creating mounts.
func DownloadDriverInstallerV2 ¶
func DownloadDriverInstallerV2(ctx context.Context, downloader cos.ExtensionsDownloader, driverVersion string) (string, error)
DownloadDriverInstallerV2 downloads GPU driver installer given driver version from COS build artifacts.
func DownloadGPUDriverVersionArtifacts ¶
func DownloadGPUDriverVersionArtifacts(ctx context.Context, downloader cos.ArtifactsDownloader) (map[string]string, error)
DownloadGPUDriverVersionArtifacts fetch all the gpu_xx_version files and the key is the file name and the value is the content. E.g. gpu_default_version -> 535.129.03, gpu_R470_version -> 470.223.02, gpu_R535_version -> 535.129.03,
func DownloadGPUDriverVersionsProto ¶
func DownloadGPUDriverVersionsProto(ctx context.Context, downloader cos.ArtifactsDownloader, gpuInstallDir string) ([]byte, error)
DownloadGPUDriverVersionsProto will download gpuDriverProtoBin from GCS bucket to /var/lib/nvidia if it does not exist.
func DownloadGenericDriverInstaller ¶
func DownloadGenericDriverInstaller(ctx context.Context, downloader *cos.GCSDownloader, driverVersion string) (string, error)
DownloadGenericDriverInstaller downloads the generic GPU driver installer given driver version.
func DownloadToInstallDir ¶
DownloadToInstallDir downloads data from the provided URL to the GPU installation directory. It returns the basename of the locally written file.
func GetGPUDriverVersion ¶
func GetGPUDriverVersion(ctx context.Context, downloader cos.ArtifactsDownloader, alias string) (string, error)
GeGGPUDriverVersion gets the supplied GPU driver version. Supports "default", "latest", "R470", "R525" aliases
func RunDriverInstaller ¶
func RunDriverInstaller(toolchainDir, installerFilename, driverVersion string, needSigned, test, legacyLink, noVerify bool, moduleParameters modules.ModuleParameters) error
RunDriverInstaller runs GPU driver installer. Only works if the provided installer includes precompiled drivers.
func RunDriverInstallerPrebuiltModules ¶
func RunDriverInstallerPrebuiltModules(ctx context.Context, downloader *cos.GCSDownloader, installerFilename, driverVersion string, noVerify bool, moduleParameters modules.ModuleParameters) error
func VerifyDriverInstallation ¶
VerifyDriverInstallation runs some commands to verify the driver installation.