-
Notifications
You must be signed in to change notification settings - Fork 543
add aws support to ai-inference in pkb #6201
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: master
Are you sure you want to change the base?
Changes from 3 commits
7ed5fef
013cb43
b2c0067
c2f11fc
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 |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| apiVersion: karpenter.sh/v1 | ||
| kind: NodePool | ||
| metadata: | ||
| name: {{ gpu_nodepool_name | default('gpu') }} | ||
| spec: | ||
| disruption: | ||
| consolidateAfter: {{ gpu_consolidate_after | default('1h') }} | ||
| consolidationPolicy: {{ gpu_consolidation_policy | default('WhenEmpty') }} | ||
| template: | ||
| spec: | ||
| nodeClassRef: | ||
| group: eks.amazonaws.com | ||
| kind: NodeClass | ||
| name: {{ karpenter_nodeclass_name | default('default') }} | ||
| requirements: | ||
| - key: karpenter.sh/capacity-type | ||
| operator: In | ||
| values: {{ gpu_capacity_types | default(['on-demand']) }} | ||
| - key: kubernetes.io/arch | ||
| operator: In | ||
| values: {{ gpu_arch | default(['amd64']) }} | ||
| - key: eks.amazonaws.com/instance-family | ||
| operator: In | ||
| values: {{ gpu_instance_families | default(['g6','g6e']) }} | ||
| taints: | ||
| - key: {{ gpu_taint_key | default('nvidia.com/gpu') }} | ||
| effect: NoSchedule |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -569,6 +569,19 @@ def _InjectDefaultHuggingfaceToken(self) -> None: | |
|
|
||
| def _GetInferenceServerManifest(self) -> str: | ||
| """Generates and retrieves the inference server manifest content.""" | ||
| # Ensure GPU capacity exists before scheduling GPU workloads | ||
|
Collaborator
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. On my end this looks merged in: Ooh ok actually perhaps this has made it in but been superceded by follow up PRs? https://screenshot.googleplex.com/BNVuvNLwNKckBF5 is the current state of wg_serving_inference_server.py & it does have a cloud == 'AWS' section. |
||
| if FLAGS.cloud == 'AWS': | ||
| self.cluster.ApplyManifest( | ||
| 'container/kubernetes_ai_inference/aws-gpu-nodepool.yaml.j2', | ||
| gpu_nodepool_name='gpu', | ||
| gpu_consolidate_after='1h', | ||
| gpu_consolidation_policy='WhenEmpty', | ||
| karpenter_nodeclass_name='default', # must exist already | ||
| gpu_capacity_types=['on-demand'], | ||
| gpu_arch=['amd64'], | ||
| gpu_instance_families=['g6','g6e'], | ||
| gpu_taint_key='nvidia.com/gpu', | ||
| ) | ||
| generate_args = { | ||
| 'kind': 'core/deployment', | ||
| 'model-server': self.spec.model_server, | ||
|
|
@@ -581,6 +594,8 @@ def _GetInferenceServerManifest(self) -> str: | |
| self.cluster.ApplyManifest( | ||
| 'container/kubernetes_ai_inference/serving_catalog_cli.yaml.j2', | ||
| image_repo=FLAG_IMAGE_REPO.value, | ||
| wg_serving_repo_url=FLAGS.wg_serving_repo_url, | ||
|
||
| wg_serving_repo_branch=FLAGS.wg_serving_repo_branch, | ||
| generate_args=' '.join( | ||
| [f'--{k} {v}' for k, v in generate_args.items()] | ||
| ), | ||
|
|
||
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.
Nice. I was wondering if you'd have to leave off values altogether with like a jinja if, but this totally makes sense as defaults.