MCPcopy Create free account
hub / github.com/NVIDIA/gpu-operator / createStatusFile

Method createStatusFile

cmd/nvidia-validator/main.go:915–926  ·  view source on GitHub ↗
(driverInfo driverInfo)

Source from the content-addressed store, hash-verified

913}
914
915func (d *Driver) createStatusFile(driverInfo driverInfo) error {
916 statusFileContent := strings.Join([]string{
917 fmt.Sprintf("IS_HOST_DRIVER=%t", driverInfo.isHostDriver),
918 fmt.Sprintf("NVIDIA_DRIVER_ROOT=%s", driverInfo.driverRoot),
919 fmt.Sprintf("DRIVER_ROOT_CTR_PATH=%s", driverInfo.driverRootCtrPath),
920 fmt.Sprintf("NVIDIA_DEV_ROOT=%s", driverInfo.devRoot),
921 fmt.Sprintf("DEV_ROOT_CTR_PATH=%s", driverInfo.devRootCtrPath),
922 }, "\n") + "\n"
923
924 // create driver status file
925 return createStatusFileWithContent(outputDirFlag+"/"+driverStatusFile, statusFileContent)
926}
927
928// isNvidiaModuleLoaded checks if NVIDIA kernel module is already loaded in kernel memory.
929func isNvidiaModuleLoaded() bool {

Callers 1

validateMethod · 0.95

Calls 1

Tested by

no test coverage detected