-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Enable setting a
toleration
for GPU tests (#152)
Enable setting `toleration` for workload pods created by gpu tests. This is achieved by creating a poddefault that adds the toleration from the user's input to pods with the label `enable-gpu: "true"` . More details on spec KF113. To complement the feature, the following changes are done as well: * Refactor the README.md a bit in order to not introduce duplicate instructions * Modify the retry since tests may wait for a GPU node to be scaled up Fix #151
- Loading branch information
Showing
8 changed files
with
191 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
apiVersion: kubeflow.org/v1alpha1 | ||
kind: PodDefault | ||
metadata: | ||
name: gpu-toleration | ||
spec: | ||
desc: Add toleration to pods with label enable-gpu = 'true' in order to enable GPU access. | ||
tolerations: | ||
- | ||
{% if key %} | ||
key: {{ key }} | ||
{% endif %} | ||
{% if operator %} | ||
operator: {{ operator }} | ||
{% endif %} | ||
{% if value %} | ||
value: {{ value }} | ||
{% endif %} | ||
{% if effect %} | ||
effect: {{ effect }} | ||
{% endif %} | ||
{% if seconds %} | ||
tolerationSeconds: {{ seconds }} | ||
{% endif %} | ||
_example_toleration: | ||
################################ | ||
# # | ||
# EXAMPLE CONFIGURATION # | ||
# # | ||
################################ | ||
# This just serves as an example for how to configure the values of a toleration | ||
# In order to ensure the toleration is valid, please consult Kubernetes documentation | ||
# https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#scheduling | ||
- key: "MyKey" | ||
operator: "Exists" | ||
effect: "NoSchedule" | ||
selector: | ||
matchLabels: | ||
enable-gpu: "true" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
kfp>=2.4,<3.0 | ||
tenacity | ||
kfp-kubernetes |
Oops, something went wrong.