Reputation: 31
I know that cloud run will call a docker run command. What i want to do is call cloud run (docker run) and pass it an argument (image/video). My scenario is make a cloud run call from a flutter app, and pass an argument containing an image/video that the docker run will perform an analysis on. So ideally it would be something like
docker run analysis.py mediafile.jpeg
where analysis.py
is the entrypoint and mediafile.jpeg
is the argument.
Currently, I do not know how to create the cloud run function that can take an argument like described above. If anyone knows, please explain how.
Would a better alternative be to upload the media file to a database (firebase), then just call cloud run on the file in the database?
Any other suggestions welcome, thanks
Upvotes: -1
Views: 1277
Reputation: 6290
For this use case, I would recommend you to split your design in 2 parts :
It's a good practice. Your design will be scalable, and keep simple to maintain.
Note that a Firebase Cloud Function can be triggered after a new file is uploaded on Cloud Storage.
Upvotes: 1