You can deploy MATLAB functions as a microservice by packaging them into a Docker® container. The microservice Docker container provides an HTTP or HTTPS endpoint to the MATLAB function and accepts RESTful requests.
To deploy a MATLAB function as a microservice, you package a MATLAB function into a deployable archive, and then create a Docker image that contains the archive and a minimal MATLAB Runtime package. You can then run the microservice Docker image and make RESTful requests to the service using any programming language that has HTTP libraries, including MATLAB Production Server™ client APIs.
|Create an archive for deployment to MATLAB Production Server or Docker (Since R2020b)|
|Options for building deployable archives (Since R2020b)|
|Create a microservice Docker image using files generated by MATLAB Compiler SDK (Since R2022a)|
|Create a microservice Docker options object (Since R2022a)|
|Compiler build results object (Since R2020b)|
|Create a MATLAB Runtime installer Docker image on offline machines (Since R2022b)|
|Create a Docker image that contains MATLAB Runtime (Since R2023b)|
- Create Microservice Docker Image
Package MATLAB code into a microservice Docker image.
- Microservice Command Arguments
Reference table of Microservice options, listed alphabetically.
- Deploy Object Detection Model as Microservice
This example shows how to create a microservice Docker image from a MATLAB object detection model.
- Run Microservice Created Using MATLAB Compiler SDK on AWS
This example shows how to deploy a microservice Docker image on AWS.
- Deploy Wafer Map Defect Classifier as Microservice using Docker
This example shows how to create a microservice Docker® image from a wafer map defect classifier.
- Run Microservice Created Using MATLAB Compiler SDK on Google Cloud
This example shows how to deploy a microservice Docker image on Google® Cloud.
- Run Microservice Created Using MATLAB Compiler SDK on Microsoft Azure
This example shows how to deploy a microservice using Microsoft Azure