gvisorgvisor.dev/gvisor/tools/gpu/drivers Index | Files

package drivers

import "gvisor.dev/gvisor/tools/gpu/drivers"

Package drivers contains methods to download and install drivers.

Index

Functions

func DownloadDriver

func DownloadDriver(ctx context.Context, driverVersion, arch string) (io.ReadCloser, error)

DownloadDriver downloads the requested driver and returns the binary as a []byte so it can be checked before written to disk.

func ListSupportedDrivers

func ListSupportedDrivers(outfile string) error

ListSupportedDrivers prints the driver to stderr in a format that can be consumed by the Makefile to iterate tests across drivers.

func ValidateChecksum

func ValidateChecksum(ctx context.Context, version string, checksums nvproxy.Checksums) error

ValidateChecksum validates the checksum of the driver.

Types

type Installer

type Installer struct {
	// contains filtered or unexported fields
}

Installer handles the logic to install drivers.

func NewInstaller

func NewInstaller(requestedVersion string, latest bool) (*Installer, error)

NewInstaller returns a driver installer instance.

func (*Installer) ChecksumDriver

func (i *Installer) ChecksumDriver(ctx context.Context, arch string) (string, error)

ChecksumDriver downloads and returns the SHA265 checksum of the driver.

func (*Installer) MaybeInstall

func (i *Installer) MaybeInstall(ctx context.Context) error

MaybeInstall installs a driver if 1) no driver is present on the system already or 2) the driver currently installed does not match the requested version.

Source Files

install_driver.go

Version
v0.0.0-20250802011938-fc9c972fa636 (latest)
Published
Aug 2, 2025
Platform
linux/amd64
Imports
13 packages
Last checked
1 hour ago

Tools for package owners.