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 ChecksumDriver

func ChecksumDriver(ctx context.Context, driverVersion string) (string, error)

ChecksumDriver downloads and returns the SHA265 checksum of the driver.

func DownloadDriver

func DownloadDriver(ctx context.Context, driverVersion 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.

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) 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-20250605235530-a6711d1e1dc6 (latest)
Published
Jun 5, 2025
Platform
linux/amd64
Imports
12 packages
Last checked
5 hours ago

Tools for package owners.