We use Flask + TensorFlow, working at work. Our setup may not be the best way to service models, but it does its job, and it has worked perfectly for us so far.
The setting is as follows:
- Since tfserving takes the build forever, we built the docker image (not GPU support or anything else, but it only works to serve the model, and itβs faster and better than servicing directly from the huge Python / Flask monolith). An image of the model server can be found here: https://hub.docker.com/r/epigramai/model-server/
- Flask is then used to configure the API. To send requests to the model server, we need the grcp forecast client, so we built it in Python, which we can import directly into the flags API, https://github.com/epigramai/tfserving_predict_client/ .
Itβs good that the model is not served by the Flask API. The docker image model server can be easily replaced with a model server running on a GPU compiled for the hardware of the machines, and not in the docker container.
source share