This repository contains models that have been trained and are ready to be deployed. We use TensorFlow serving to deploy our model and docker to create the container from that TensorFlow serving.
Download the TensorFlow Serving Docker image and repo
docker pull tensorflow/serving
git clone https://github.com/Tandur-Team/tandur-ml-deployment.git
docker run -d --name serving_base tensorflow/serving
docker cp /plant-model serving_base:/models/plant-model
docker commit --change "ENV MODEL_NAME plant-model" serving_base plant-model
docker kill serving_base
Docker will create a container from the plant-model image and run it at localhost:8501
docker run -p 8500:8500 -p 8501:8501 -t plant-model --model_config_file=/models/plant-model/models.config
POST {URL}
/v1/models/{plant-name}
:predict : This endpoint allow user to register to the app and save user data to MySQL
URL
: Use localhost:8501 if run the applicaation on localplant-name
: Use the same plant name as the folder name in the plant-model folder (e.g model-Padi)
docker run -p 8500:8500 -p 8501:8501 -t plant-model --model_config_file=/models/plant-model/models.config
{
"instances": [
[
temperature,
humidity,
rainfall
]
]
}