We can target local machines for deploying our models which are created in Azure Machine Learning.
In your case we need to use docker image as it provides isolated, containerized experience.
Below are the steps to deploy as local web service using Docker:
- Connect to the Azure Machine Learning workspace in which your model is registered.
- Create a
Model
object that represents the model.
- Create an
Environment
object that contains the dependencies and defines the software environment in which your code will run.
- Create an
InferenceConfig
object that associates the entry script with the Environment
.
- Create a
DeploymentConfiguration
object of the subclass LocalWebserviceDeploymentConfiguration
.
- Use
Model.deploy()
to create a Webservice
object. This method downloads the Docker image and associates it with the Model
, InferenceConfig
, and DeploymentConfiguration
.
- Activate the
Webservice
by using Webservice.wait_for_deployment()
.
Refer to this documentation as AjayKumarGhose suggested. Also check this MSDoc for training an image model