File tree Expand file tree Collapse file tree
tools/pytorchjob-generator/chart/templates Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -76,10 +76,17 @@ resources:
7676
7777
7878{{- define " mlbatch.env" }}
79+ {{- $envFromList := list }}
80+ {{- if .Values.envFrom }}
81+ {{- $envFromList = .Values.envFrom }}
82+ {{- end }}
7983{{- if .Values.ncclGdrEnvConfigMap }}
84+ {{- $configMapRef := dict " configMapRef" (dict " name" .Values.ncclGdrEnvConfigMap ) }}
85+ {{- $envFromList = append $envFromList $configMapRef }}
86+ {{- end }}
87+ {{- if $envFromList }}
8088envFrom:
81- - configMapRef:
82- name: {{ .Values.ncclGdrEnvConfigMap }}
89+ {{- toYaml $envFromList | nindent 2 }}
8390{{- end }}
8491{{- if or .Values.environmentVariables .Values.sshGitCloneConfig .Values.mountNVMe .Values.topologyFileConfigMap ( eq .Values.schedulerName " sakkara" ) }}
8592env:
Original file line number Diff line number Diff line change @@ -116,10 +116,6 @@ spec:
116116 {{- include "mlbatch.volumes" . | indent 38 }}
117117 containers :
118118 - name : pytorch
119- {{- if .Values.envFrom }}
120- envFrom :
121- {{- toYaml .Values.envFrom | nindent 46 }}
122- {{- end }}
123119 image : {{ required "Please specify a 'containerImage' in the user file" .Values.containerImage }}
124120 imagePullPolicy : {{ .Values.imagePullPolicy | default "IfNotPresent" }}
125121 {{- include "mlbatch.securityContext" . | indent 44 }}
@@ -143,10 +139,6 @@ spec:
143139 {{- include "mlbatch.volumes" . | indent 38 }}
144140 containers :
145141 - name : pytorch
146- {{- if .Values.envFrom }}
147- envFrom :
148- {{- toYaml .Values.envFrom | nindent 46 }}
149- {{- end }}
150142 image : {{ required "Please specify a 'containerImage' in the user file" .Values.containerImage }}
151143 imagePullPolicy : {{ .Values.imagePullPolicy | default "IfNotPresent" }}
152144 {{- include "mlbatch.securityContext" . | indent 44 }}
You can’t perform that action at this time.
0 commit comments