Skip to content

Commit

Permalink
no overwrite when run launcher as worker
Browse files Browse the repository at this point in the history
Signed-off-by: kuizhiqing <kuizhiqing@msn.com>
  • Loading branch information
kuizhiqing committed Feb 29, 2024
1 parent f92b9c7 commit c7b032c
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions pkg/controller/mpi_job_controller.go
Expand Up @@ -1534,12 +1534,13 @@ func (c *MPIJobController) newLauncherPodTemplate(mpiJob *kubeflow.MPIJob) corev
case kubeflow.MPIImplementationMPICH:
container.Env = append(container.Env, mpichEnvVars...)
}

container.Env = append(container.Env,
// We overwrite these environment variables so that users will not
// be mistakenly using GPU resources for launcher due to potential
// issues with scheduler/container technologies.
nvidiaDisableEnvVars...)
if !ptr.Deref(mpiJob.Spec.RunLauncherAsWorker, false) {
container.Env = append(container.Env,
// We overwrite these environment variables so that users will not
// be mistakenly using GPU resources for launcher due to potential
// issues with scheduler/container technologies.
nvidiaDisableEnvVars...)
}
c.setupSSHOnPod(&podTemplate.Spec, mpiJob)

// Submit a warning event if the user specifies restart policy for
Expand Down

0 comments on commit c7b032c

Please sign in to comment.