-
Notifications
You must be signed in to change notification settings - Fork 44
Make OME Deployment Flexible with GPU only option; Improve Build Cache and Docker Build #310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -82,3 +82,6 @@ coverage-*.html | |
| *.a | ||
|
|
||
| hack/python-sdk/openapi-generator-cli-*.jar | ||
|
|
||
| # Go build cache directories | ||
| .cache/ | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,8 +23,15 @@ spec: | |
| serviceAccountName: {{ .Values.modelAgent.serviceAccountName }} | ||
| affinity: | ||
| {{- toYaml .Values.modelAgent.affinity | nindent 8 }} | ||
| {{- if or .Values.modelAgent.gpuNodesOnly .Values.modelAgent.nodeSelector }} | ||
| nodeSelector: | ||
| {{- if .Values.modelAgent.gpuNodesOnly }} | ||
| {{ .Values.modelAgent.gpuNodeLabel.key }}: {{ .Values.modelAgent.gpuNodeLabel.value | quote }} | ||
| {{- end }} | ||
| {{- if .Values.modelAgent.nodeSelector }} | ||
| {{- toYaml .Values.modelAgent.nodeSelector | nindent 8 }} | ||
| {{- end }} | ||
| {{- end }} | ||
| {{- $imagePullSecrets := .Values.modelAgent.imagePullSecrets | default .Values.global.imagePullSecrets }} | ||
| {{- if $imagePullSecrets }} | ||
| imagePullSecrets: | ||
|
|
@@ -40,7 +47,7 @@ spec: | |
| {{- end }} | ||
| containers: | ||
| - name: model-agent | ||
| image: {{ include "ome.imageWithHub" (dict "values" .Values "repository" .Values.modelAgent.image.repository "tag" .Values.modelAgent.image.tag) }} | ||
| image: {{ include "ome.imageWithHub" (dict "values" (merge (dict "global" (dict "hub" (default .Values.global.hub .Values.modelAgent.image.hub))) .Values) "repository" .Values.modelAgent.image.repository "tag" .Values.modelAgent.image.tag) }} | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This logic for overriding the image hub appears to have two issues:
Here is the corrected line: image: {{ include "ome.imageWithHub" (dict "values" (merge .Values (dict "global" (dict "hub" (default .Values.modelAgent.image.hub .Values.global.hub)))) "repository" .Values.modelAgent.image.repository "tag" .Values.modelAgent.image.tag) }} |
||
| imagePullPolicy: {{ .Values.modelAgent.image.pullPolicy }} | ||
| ports: | ||
| - name: metrics | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -288,9 +288,11 @@ func SnapshotDownload(ctx context.Context, config *DownloadConfig) (string, erro | |
| if totalErrors > 0 { | ||
| // Collect error details | ||
| var errorFiles []string | ||
| var errorMessages []string | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You've added |
||
| for _, result := range results { | ||
| if result.err != nil { | ||
| errorFiles = append(errorFiles, filesToDownload[result.index].Path) | ||
| errorMessages = append(errorMessages, fmt.Sprintf("%s: %v", filesToDownload[result.index].Path, result.err)) | ||
| } | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
$(shell mkdir -p ...)command is executed every timemakeis invoked, during the parsing phase. Whilemkdir -pis idempotent, this is generally not a good practice as it can have side effects and is not explicit. It's better to create directories as part of a target's recipe or as a prerequisite for targets that need them. For example, you could create a.PHONYsetup target and add it as a dependency to your build targets.