fix gpus flag not getting passed to docker
parent
7f5fbf98fe
commit
311630cea9
|
@ -1449,7 +1449,7 @@ func validateEnableNvidiaGPUs(gpusEnabled bool, drvName, rtime string) error {
|
|||
if !gpusEnabled {
|
||||
return nil
|
||||
}
|
||||
if drvName == constants.Docker && rtime == constants.Docker {
|
||||
if drvName == constants.Docker && (rtime == constants.Docker || rtime == constants.DefaultContainerRuntime) {
|
||||
return nil
|
||||
}
|
||||
return errors.Errorf("The enable-nvidia-gpus flag can only be run with the docker driver and docker container-runtime")
|
||||
|
|
|
@ -453,7 +453,7 @@ func (d *Driver) Stop() error {
|
|||
}
|
||||
}
|
||||
|
||||
runtime, err := cruntime.New(cruntime.Config{Type: d.NodeConfig.ContainerRuntime, Runner: d.exec, EnableNvidiaGPUs: d.NodeConfig.EnableNvidiaGPUs})
|
||||
runtime, err := cruntime.New(cruntime.Config{Type: d.NodeConfig.ContainerRuntime, Runner: d.exec})
|
||||
if err != nil { // won't return error because:
|
||||
// even though we can't stop the cotainers inside, we still wanna stop the minikube container itself
|
||||
klog.Errorf("unable to get container runtime: %v", err)
|
||||
|
|
|
@ -394,6 +394,7 @@ func configureRuntimes(runner cruntime.CommandRunner, cc config.ClusterConfig, k
|
|||
ImageRepository: cc.KubernetesConfig.ImageRepository,
|
||||
KubernetesVersion: kv,
|
||||
InsecureRegistry: cc.InsecureRegistry,
|
||||
EnableNvidiaGPUs: cc.EnableNvidiaGPUs,
|
||||
}
|
||||
cr, err := cruntime.New(co)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue