File tree Expand file tree Collapse file tree 2 files changed +9
-10
lines changed
tools/pytorchjob-generator/chart/templates Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -76,10 +76,17 @@ resources:
76
76
77
77
78
78
{ {- define " mlbatch.env" } }
79
+ { {- $envFromList := list } }
80
+ { {- if .Values.envFrom } }
81
+ { {- $envFromList = .Values.envFrom } }
82
+ { {- end } }
79
83
{ {- if .Values.ncclGdrEnvConfigMap } }
84
+ { {- $configMapRef := dict " configMapRef" (dict " name" .Values.ncclGdrEnvConfigMap) } }
85
+ { {- $envFromList = append $envFromList $configMapRef } }
86
+ { {- end } }
87
+ { {- if $envFromList } }
80
88
envFrom:
81
- - configMapRef:
82
- name: { { .Values.ncclGdrEnvConfigMap } }
89
+ { {- toYaml $envFromList | nindent 2 } }
83
90
{ {- end } }
84
91
{ {- if or .Values.environmentVariables .Values.sshGitCloneConfig .Values.mountNVMe .Values.topologyFileConfigMap ( eq .Values.schedulerName " sakkara" ) } }
85
92
env:
Original file line number Diff line number Diff line change @@ -116,10 +116,6 @@ spec:
116
116
{{- include "mlbatch.volumes" . | indent 38 }}
117
117
containers :
118
118
- name : pytorch
119
- {{- if .Values.envFrom }}
120
- envFrom :
121
- {{- toYaml .Values.envFrom | nindent 46 }}
122
- {{- end }}
123
119
image : {{ required "Please specify a 'containerImage' in the user file" .Values.containerImage }}
124
120
imagePullPolicy : {{ .Values.imagePullPolicy | default "IfNotPresent" }}
125
121
{{- include "mlbatch.securityContext" . | indent 44 }}
@@ -143,10 +139,6 @@ spec:
143
139
{{- include "mlbatch.volumes" . | indent 38 }}
144
140
containers :
145
141
- name : pytorch
146
- {{- if .Values.envFrom }}
147
- envFrom :
148
- {{- toYaml .Values.envFrom | nindent 46 }}
149
- {{- end }}
150
142
image : {{ required "Please specify a 'containerImage' in the user file" .Values.containerImage }}
151
143
imagePullPolicy : {{ .Values.imagePullPolicy | default "IfNotPresent" }}
152
144
{{- include "mlbatch.securityContext" . | indent 44 }}
You can’t perform that action at this time.
0 commit comments