googleapis / googleapis/python-aiplatform

Building and deploying custom predictors fails on arm64 archs

Open
#2,056 0 comments 4 reactions 0 assignees View on GitHub
api: vertex-ai
Dominant language
Python
Stars
905
Forks
465
Avg merge
1d 13h
Merged PRs (30d)
44

Description

Hello,

I came across this issue so I put it here, in case someone has the same problem with the aiplatform.

**Is your feature request related to a problem? Please describe.**
building and deploying a custom predictor docker image on a arm64 architecture (M1/M2 macs) succeeds on a local endpoint, but fails in a remote endpoint.
**Describe the solution you'd like**
adding an option to build the docker image with (--platform linux/amd64) in the fonction
```python
LocalModel.build_cpr_model()
```
**Describe alternatives you've considered**
A quick fix: modify the build_image() in ../google/cloud/aiplatform/docker_utils/build.py:
```python
plateform = ["--platform", "linux/amd64"]
tag_options = ["-t", output_image_name]
cache_args = ["--no-cache"] if no_cache else []

command = (
["docker", "build"] + cache_args + plateform + tag_options + ["--rm", "-f-", host_workdir]
)

```

Contributor guide

Open the contributing guide

Research direction

Start by tracing LocalModel.build_cpr_model() into google/cloud/aiplatform/docker_utils/build.py and inspect how the Docker build command is assembled. Compare the local and remote custom-predictor paths on arm64, then verify that the resulting image builds for linux/amd64 and can be deployed to a remote endpoint.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
cloud, machine-learning
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.