- Notifications
You must be signed in to change notification settings - Fork 402
feat: Support custom predictor Docker image builds on non-x86 architectures #2115
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
Merged
abcdefgs0324 merged 11 commits into googleapis:main from TeoZosa:feat/build-local-model-docker-images-on-64-bit-arm Mar 6, 2025
+91 −2
Merged
Changes from all commits
Commits
Show all changes
11 commits Select commit Hold shift + click to select a range
6ea6f4e
Enforce Linux `x86_64` Docker image builds
TeoZosa 185e163
Extract Docker build platform arg to method parameter
TeoZosa c19d7cb
Change platform default arg to `None`
TeoZosa 6fb317b
Make platform configurable from `LocalModel.build_cpr_model()`
TeoZosa 18c8bc0
Fix docstring for `platform` param
TeoZosa b4f6095
Test platform parameter in `test_build_cpr_model_upload_and_deploy()`
TeoZosa 77f725d
Fix tests
TeoZosa 121a60d
Test specifying platform in local model builds
TeoZosa d8a3d2f
Test other platform strings in local model builds
TeoZosa f37af18
Merge branch 'main' into feat/build-local-model-docker-images-on-64-b…
abcdefgs0324 87f90ec
Merge branch 'main' into feat/build-local-model-docker-images-on-64-b…
abcdefgs0324 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 |
---|---|---|
| @@ -49,7 +49,8 @@ class TestPredictionCpr(e2e_base.TestEndToEnd): | |
| ||
_temp_prefix = "temp-vertex-sdk-e2e-prediction-cpr" | ||
| ||
def test_build_cpr_model_upload_and_deploy(self, shared_state, caplog): | ||
@pytest.mark.parametrize("platform", [None, "linux/amd64"]) | ||
def test_build_cpr_model_upload_and_deploy(self, shared_state, caplog, platform): | ||
"""Creates a CPR model from custom predictor, uploads it and deploys.""" | ||
| ||
caplog.set_level(logging.INFO) | ||
| @@ -61,6 +62,7 @@ def test_build_cpr_model_upload_and_deploy(self, shared_state, caplog): | |
_IMAGE_URI, | ||
predictor=SklearnPredictor, | ||
requirements_path=os.path.join(_USER_CODE_DIR, _REQUIREMENTS_FILE), | ||
platform=platform, | ||
) | ||
Comment on lines 62 to 66 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. Passing it into the build options for the local model. | ||
| ||
with local_model.deploy_to_local_endpoint( | ||
|
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
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.
Parametrizing the platform arg in tests with
None
)