Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Commit

Permalink
more changes
Browse files Browse the repository at this point in the history
Signed-off-by: Yuvraj <[email protected]>
  • Loading branch information
yindia committed Aug 27, 2021
1 parent c6746ff commit 3315a3a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions go/tasks/plugins/k8s/kfoperators/mpi/mpi.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,14 @@ func (mpiOperatorResourceHandler) BuildResource(ctx context.Context, taskCtx plu
launcherReplicas := mpiTaskExtraArgs.GetNumLauncherReplicas()
slots := mpiTaskExtraArgs.GetSlots()

workersPodSpec := podSpec.DeepCopy()
for _,container := range workersPodSpec.Containers {
container.Args = []string{}
container.Command = []string{}
}

jobSpec := mpi.MPIJobSpec{
SlotsPerWorker: &slots,
//MainContainer: "",
MPIReplicaSpecs: map[mpi.MPIReplicaType]*commonKf.ReplicaSpec{
mpi.MPIReplicaTypeLauncher: &commonKf.ReplicaSpec{
Replicas: &launcherReplicas,
Expand All @@ -79,7 +84,7 @@ func (mpiOperatorResourceHandler) BuildResource(ctx context.Context, taskCtx plu
mpi.MPIReplicaTypeWorker: &commonKf.ReplicaSpec{
Replicas: &workers,
Template: v1.PodTemplateSpec{
Spec: *podSpec,
Spec: *workersPodSpec,
},
RestartPolicy: commonKf.RestartPolicyNever,
},
Expand Down

0 comments on commit 3315a3a

Please sign in to comment.