From 3315a3a0d0d4f9253437eee2143ff4250ae46488 Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Sat, 28 Aug 2021 02:42:42 +0530 Subject: [PATCH] more changes Signed-off-by: Yuvraj --- go/tasks/plugins/k8s/kfoperators/mpi/mpi.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/go/tasks/plugins/k8s/kfoperators/mpi/mpi.go b/go/tasks/plugins/k8s/kfoperators/mpi/mpi.go index 7bb099762..2c9f23d57 100644 --- a/go/tasks/plugins/k8s/kfoperators/mpi/mpi.go +++ b/go/tasks/plugins/k8s/kfoperators/mpi/mpi.go @@ -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, @@ -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, },