Skip to content
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

Support ARM 64 bit architecture #371

Merged
merged 1 commit into from
May 13, 2023
Merged

Conversation

ckadner
Copy link
Member

@ckadner ckadner commented May 12, 2023

Issue Addressed by this PR

Quickstart deployment of an InferenceService fails on Macs with M1 chip. The modelmesh-serving-mlserver-0.x pod does not deploy because of an affinity restriction to amd64.

Events:
  Type     Reason            Age   From               Message
  ----     ------            ----  ----               -------
  Warning  FailedScheduling  17s   default-scheduler  0/1 nodes are available: 1 node(s) didn't match Pod's node affinity/selector. preemption: 0/1 nodes are available: 1 Preemption is not helpful for scheduling.
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
            - matchExpressions:
              - key: kubernetes.io/arch
                operator: In
                values:
                - amd64

Source:

archNodeSelector := corev1.NodeSelectorTerm{
MatchExpressions: []corev1.NodeSelectorRequirement{
{
Key: "kubernetes.io/arch",
Operator: corev1.NodeSelectorOpIn,
Values: []string{"amd64"},
},
},
}

Proposed Fix

Support arm64 arch for Node affinity. The modelmesh-runtime-adapter supports amd64 and arm64 as pointed out here.

Modifications

	archNodeSelector := corev1.NodeSelectorTerm{
		MatchExpressions: []corev1.NodeSelectorRequirement{
			{
				Key:      "kubernetes.io/arch",
				Operator: corev1.NodeSelectorOpIn,
				Values:   []string{"amd64", "arm64"},
			},
		},
	}

Result

Successful deployment on arm64 architecture nodes.

Related Issues

Signed-off-by: Christian Kadner <[email protected]>
@ckadner ckadner requested a review from tjohnson31415 May 12, 2023 18:09
@kserve-oss-bot kserve-oss-bot requested a review from joerunde May 12, 2023 18:09
@ckadner
Copy link
Member Author

ckadner commented May 12, 2023

Goes with modelmesh PR kserve/modelmesh#92

Copy link
Contributor

@tjohnson31415 tjohnson31415 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if it is best practice to always have a NodeSelector for architecture, but that's a separate question from the improvement in this PR.
LGTM!
(the FVT failure looks to be unrelated)

@kserve-oss-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ckadner, tjohnson31415

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ckadner ckadner merged commit 0bd750e into kserve:main May 13, 2023
@ckadner ckadner linked an issue Jun 2, 2023 that may be closed by this pull request
lgdeloss pushed a commit to lgdeloss/modelmesh-serving that referenced this pull request Jun 6, 2023
Add `arm64` to list of supported architectures for Node affinity
to enable Quickstart deployments on MacBooks with M1 chips.
Currently only `amd64` and `arm64` are supported by the
ModelMesh runtime adapter.

Signed-off-by: Christian Kadner <[email protected]>
Signed-off-by: Luis Delossantos <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Quick start not working for Mac M1 laptops
3 participants