googleapis / googleapis/python-aiplatform

Building and deploying custom predictors fails on arm64 archs

Aperta
#2,056 0 commenti 4 reazioni 0 assegnatari Vedi su GitHub
api: vertex-ai
Lingua principale
Python
Stelle
905
Fork
465
Merge medio
1g 13h
PR unite (30g)
44

Descrizione

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]
)

```

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.