I have a python script generate_trends.py
stored with the instance name python-20201013-153823
as a notebook inside the AI Platform. What would be the best way to run that script directly from a cloud run using Flask?
Cloud Run can serve stateless container that answers to HTTP request.
If you create a Flask server, with an entry point which trigger your script (call the processing function in your generate_trends.py
file), package this in a container and deploy.
Take care of this:
/tmp
, but it's not persistent and in memory. Use databases or cloud Storage to persist states