Skip to content
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

Not able to deploy on Google Cloud RUn #354

Open
rebecca1001 opened this issue Jan 26, 2024 · 6 comments
Open

Not able to deploy on Google Cloud RUn #354

rebecca1001 opened this issue Jan 26, 2024 · 6 comments

Comments

@rebecca1001
Copy link

I want to host my own version of unstructured on goole cloud run but not able to do so. I pulled the container and uploaded to google cloud build. Then I tried using it on google cloud run to start the service but it always said that server failed to listen to the port. I made sure that the port is 8000 but still does not work.

@awalker4
Copy link
Collaborator

Hi there! Do you have access to the container logs? The first thing I would check for is the message below, implying the server is fully up and accepting traffic.
2024-01-26 17:23:09,945 unstructured_api INFO Started Unstructured API

@reachusama
Copy link

reachusama commented Jan 26, 2024

Hi, I tried the same. This is the error that I am getting in the logs:

(terminated: Application failed to start: failed to load /home/notebook-user/scripts/app-start.sh: exec format error)

@awalker4
Copy link
Collaborator

awalker4 commented Jan 26, 2024

Ah, this error is consistent with the docker image being built for the wrong platform. Does this fix the issue?

docker pull --platform=linux/arm64 quay.io/unstructured-io/unstructured-api:latest

@reachusama
Copy link

It still doesn't work. I get this error:
terminated: Application failed to start: failed to load /home/notebook-user/scripts/app-start.sh: exec format error

@kenzik
Copy link

kenzik commented Feb 2, 2024

The image doesn't listen on the PORT environment variable, which Cloud Run uses.

You have two choices:

  • when deploying, explitly set the port to 8000 (Unstructured image's default); or
  • set the UVICORN_PORT environment on the revision to port 8080 (Cloud Run's default.)

Example of the latter:

SCR-20240202-jqyn

@awalker4
Copy link
Collaborator

awalker4 commented Feb 3, 2024

@reachusama Apologies - what about docker pull --platform=linux/amd64 quay.io/unstructured-io/unstructured-api:latest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants