dlabsai / mlflow-for-gcp

50 stars 30 forks source link

Image build results in Cloud Build execution error: Container failed to start. ... #4

Closed tszumowski closed 1 year ago

tszumowski commented 1 year ago

I'm running on MacOS and ran into the following error after running the make commands and deploying a Cloud Build Service. The error occurs when the service attempts to spin up. The error is:

Container failed to start. Failed to start and then listen on the port defined by the PORT environment variable.

This is covered in the Google Cloud docs Container failed to start.

In order for Cloud Run to work, it needs the container image compiled for 64-bit Linux:

Note: If you build your container image on a ARM based machine, then it might not work as expected when used with Cloud Run. To solve this issue, build your image using Cloud Build.

It suggests using Cloud Build. I tried that with:

IMAGE_NAME=mlflow-gcp
VERSION=0.20
GCP_PROJECT=urbn-data-science
IMAGE_URL="gcr.io/${GCP_PROJECT}/${IMAGE_NAME}:${VERSION}"
gcloud builds submit --tag $IMAGE_URL

When I deploy with an image built from Cloud Build, it works!

I'll provide a PR for you to consider for merging in with these notes.

tszumowski commented 1 year ago

@mateuszKacz just a note that I created a PR #6 for this. Feel free to merge if you find it useful.

kurazu commented 1 year ago

Thanks, closing this as solved after merging PR #6.