Microservices
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.
Functions
compiler.build.productionServerArchive | Create an archive for deployment to MATLAB Production Server or Docker (Since R2020b) |
compiler.build.ProductionServerArchiveOptions | Options for building deployable archives (Since R2020b) |
compiler.package.microserviceDockerImage | Create a microservice Docker image using files generated by MATLAB Compiler SDK (Since R2022a) |
compiler.package.MicroserviceDockerImageOptions | Create a microservice Docker options object (Since R2022a) |
compiler.build.Results | Compiler build results object (Since R2020b) |
compiler.runtime.createInstallerDockerImage | Create a MATLAB Runtime installer Docker image on offline machines (Since R2022b) |
compiler.runtime.createDockerImage | Create a Docker image that contains MATLAB Runtime (Since R2023b) |
Topics
- 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