-
Notifications
You must be signed in to change notification settings - Fork 159
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
feat: build image by platform #1582
Conversation
Signed-off-by: hang lv <[email protected]>
@n063h Thanks for working on this. Any update for it. we need muti-arch image. I can help for testing |
Signed-off-by: hang lv <[email protected]>
44f3e39
to
d7bc210
Compare
@pingsutw Hi, sorry for the wait, I think this branch is ready for your test now. You can run |
Is it ready to review? BTW the dev env only work for aarch64/amd64, but the non-dev env should work for more platforms. |
Signed-off-by: hang lv <[email protected]>
yes. |
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.
/cc @kemingy
Signed-off-by: hang lv <[email protected]>
LGTM. Please resolve the conflicts. |
Signed-off-by: hang lv <[email protected]>
Signed-off-by: hang lv <[email protected]>
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.
could we also update the platform for NewImageSource
sys := types.SystemContext{}
if platform != nil {
sys.ArchitectureChoice = platform.Architecture
sys.OSChoice = platform.OS
}
src, err := ref.NewImageSource(ctx, &sys)
What is the purpose of these changes,a re there any issues with the current code? @pingsutw |
It will pull the base image. I'm using envd in my macbook. It still tries to pull darwin/amd64 base image, although I set the platform to linux/amd64, so we also need to update the platform for NewImageSource. |
Signed-off-by: hang lv <[email protected]>
I got you, the update has been pushed. |
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.
LGTM, thank you
btw, @kemingy could you help me cut a release after it merges? I need to bump envd version in flytekit. |
https://github.com/tensorchord/envd/releases/tag/v0.3.22 is released |
refer to #1580
Before
Hardcoded linux/amd64 platform into code, so envd builds image on linux/amd64 platform by default.
After
support --platform flag to build image on target platform.