Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions tools/pytorchjob-generator/chart/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,17 @@ resources:


{{- define "mlbatch.env" }}
{{- $envFromList := list }}
{{- if .Values.envFrom }}
{{- $envFromList = .Values.envFrom }}
{{- end }}
{{- if .Values.ncclGdrEnvConfigMap }}
{{- $configMapRef := dict "configMapRef" (dict "name" .Values.ncclGdrEnvConfigMap) }}
{{- $envFromList = append $envFromList $configMapRef }}
{{- end }}
{{- if $envFromList }}
envFrom:
- configMapRef:
name: {{ .Values.ncclGdrEnvConfigMap }}
{{- toYaml $envFromList | nindent 2 }}
{{- end }}
{{- if or .Values.environmentVariables .Values.sshGitCloneConfig .Values.mountNVMe .Values.topologyFileConfigMap ( eq .Values.schedulerName "sakkara" ) }}
env:
Expand Down
8 changes: 0 additions & 8 deletions tools/pytorchjob-generator/chart/templates/appwrapper.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,6 @@ spec:
{{- include "mlbatch.volumes" . | indent 38 }}
containers:
- name: pytorch
{{- if .Values.envFrom }}
envFrom:
{{- toYaml .Values.envFrom | nindent 46 }}
{{- end }}
image: {{ required "Please specify a 'containerImage' in the user file" .Values.containerImage }}
imagePullPolicy: {{ .Values.imagePullPolicy | default "IfNotPresent" }}
{{- include "mlbatch.securityContext" . | indent 44 }}
Expand All @@ -143,10 +139,6 @@ spec:
{{- include "mlbatch.volumes" . | indent 38 }}
containers:
- name: pytorch
{{- if .Values.envFrom }}
envFrom:
{{- toYaml .Values.envFrom | nindent 46 }}
{{- end }}
image: {{ required "Please specify a 'containerImage' in the user file" .Values.containerImage }}
imagePullPolicy: {{ .Values.imagePullPolicy | default "IfNotPresent" }}
{{- include "mlbatch.securityContext" . | indent 44 }}
Expand Down