googleapis / googleapis/python-aiplatform

Building and deploying custom predictors fails on arm64 archs

Đang mở
#2,056 0 bình luận 4 reaction 0 người được giao Xem trên GitHub
api: vertex-ai
Ngôn ngữ chính
Python
Star
905
Fork
465
Merge trung bình
1 ngày 13 giờ
Pull request đã merge (30 ngày)
44

Mô tả

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

```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu bằng cách lần theo LocalModel.build_cpr_model() đến google/cloud/aiplatform/docker_utils/build.py và kiểm tra cách lệnh build Docker được tạo. So sánh các đường dẫn custom-predictor cục bộ và từ xa trên arm64, sau đó xác minh rằng image kết quả được build cho linux/amd64 và có thể được triển khai lên một endpoint từ xa.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
docker, python
Lĩnh vực
cloud, machine-learning
Loại issue
Tính năng
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
48/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.