In this tutorial, we will show how to deploy a model built from language wrapper. Here we provided a pre-built TensorFlow2 MNIST model image as an example.
Prerequisites
Enable Model Deployment in Group Management
Remember to enable model deployment in your group, contact your admin if it is not enabled yet.
Tutorial Steps
Go to User Portal and select Deployments.
Then we are in model deployment list page, now clicking on Create Deployment button.
Fill in the Deployment name field with quickstart-mnist
Fill in the Model Image field with infuseai/model-tensorflow2-mnist:v0.2.0; This image is a pre-built image hosted on Docker Hub by InfuseAI.
In the Resources,
choose the instance type, here we use the one with configuration (CPU: 0.5 / Memory: 1 G / GPU: 0)
leave Replicas as default (1)
Click on Deploy button, then we will be redirected to model deployment list page. Wait for a while and click on Refresh button to check our model is deployed or not.
When the deployment is deployed successfully, we can click on cell to check its detail.
We can view some detailed information in detail page, now let's test our deployed model! Copy the endpoint URL and replace the ${YOUR_ENDPOINT_URL} in the following block.
Then copy the entire block to the terminal for execution. This Curl example is from PrimeHub model deployment example, and we are sending ndarray as request data.
Congratulations! We have deployed a model as an endpoint service that can respond requests anytime from everywhere.
(Advanced) We went through a simple MNIST example by sending ndarray data to the deployed model. Next, we can also try out this example by sending an exact image file to the deployed model.
Follow previous tutorial steps but with following difference,
In the Deployment Details, fill in the Model Image field with infuseai/model-keras-mnist:v0.2.0 and make a deployment.