(silent bool)
| 1748 | } |
| 1749 | |
| 1750 | func (v *VGPUManager) runValidation(silent bool) (hostDriver bool, err error) { |
| 1751 | // invoke validation command |
| 1752 | command := "chroot" |
| 1753 | args := []string{"/run/nvidia/driver", "nvidia-smi"} |
| 1754 | |
| 1755 | // check if driver is pre-installed on the host and use host path for validation |
| 1756 | if _, err := os.Lstat("/host/usr/bin/nvidia-smi"); err == nil { |
| 1757 | args = []string{"/host", "nvidia-smi"} |
| 1758 | hostDriver = true |
| 1759 | } |
| 1760 | |
| 1761 | if withWaitFlag { |
| 1762 | return hostDriver, runCommandWithWait(command, args, sleepIntervalSecondsFlag, silent) |
| 1763 | } |
| 1764 | |
| 1765 | return hostDriver, runCommand(command, args, silent) |
| 1766 | } |
| 1767 | |
| 1768 | // waitForVFs waits for Virtual Functions to be created on all NVIDIA GPUs. |
| 1769 | // It polls sriov_numvfs until all GPUs have their full VF count enabled. |
no test coverage detected