Deploying models to Google App Engine Flexible

I’m trying to deploy a Torch/Transformers model on Google App Engine Flexible. During deploy, I get this error:

Updating service [default] (this may take several minutes)...failed.                                                                      
ERROR: ( Error Response: [4] Your deployment has failed to become healthy in the allotted time and therefore was rolled back. If you believe this was an error, try adjusting the 'app_start_timeout_sec' setting in the 'readiness_check' section.

I’ve done the recommended change and also cranked up the instance memory to 10GB but I still get the same error. I’m copying my app.yaml below.

Has anyone successfully deployed a model like this to GAE flex?

I’m able to deploy to AWS but need it on GAE flex…


runtime: python
env: flex

entrypoint: gunicorn -b :$PORT main:app

  python_version: 3

  instances: 2

  cpu: 1
  memory_gb: 10
  disk_size_gb: 10

  name: default

  app_start_timeout_sec: 1800

Increasing the disk size to 20gb fixed this for me. There was actually an error message in the deploy logs but it is easy to miss because of the sheer volume of log messages.

1 Like