File tree 1 file changed +7
-6
lines changed
1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -1534,12 +1534,13 @@ func (c *MPIJobController) newLauncherPodTemplate(mpiJob *kubeflow.MPIJob) corev
1534
1534
case kubeflow .MPIImplementationMPICH :
1535
1535
container .Env = append (container .Env , mpichEnvVars ... )
1536
1536
}
1537
-
1538
- container .Env = append (container .Env ,
1539
- // We overwrite these environment variables so that users will not
1540
- // be mistakenly using GPU resources for launcher due to potential
1541
- // issues with scheduler/container technologies.
1542
- nvidiaDisableEnvVars ... )
1537
+ if ! ptr .Deref (mpiJob .Spec .RunLauncherAsWorker , false ) {
1538
+ container .Env = append (container .Env ,
1539
+ // We overwrite these environment variables so that users will not
1540
+ // be mistakenly using GPU resources for launcher due to potential
1541
+ // issues with scheduler/container technologies.
1542
+ nvidiaDisableEnvVars ... )
1543
+ }
1543
1544
c .setupSSHOnPod (& podTemplate .Spec , mpiJob )
1544
1545
1545
1546
// Submit a warning event if the user specifies restart policy for
You can’t perform that action at this time.
0 commit comments