Main Content

mrm.execution.compiler.packageModel

Create Docker image of Modelscape model

Since R2023a

    Description

    imageName = mrm.execution.compiler.packageModel(model) creates a Docker® image of the model model. This function requires the Modelscape™ for MATLAB® support package.

    example

    imageName = mrm.execution.compiler.packageModel(model,Name=Value) specifies options using one or more name-value arguments in addition to the input argument in the previous syntax.

    example

    Examples

    collapse all

    Create a Modelscape model.

    Specify the model name and the location and tag of the image.

    Create a Docker image of the model, specifying the model name and version.

    imageName = mrm.execution.compiler.packageModel(modelInstance, 
        Name="weighted-sum",
        Tag="v1");

    Input Arguments

    collapse all

    Modelscape model, specified as a subclass of the mrm.execution.Model class. This model must also implement three methods for specifying the inputs and the outputs of the model: getInputs, getParameters, and getOutputs. For more details, see Model Implementation for Modelscape Deploy.

    Name-Value Arguments

    Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

    Example: mrm.execution.compiler.packageModel(model,Name="weighted-sum")

    Registry of the Docker image name, specified as a character vector or string scalar. The function creates a Docker image with a name in the format Registry/Repository/Name:Tag.

    Data Types: char | string

    Repository of the Docker image name, specified as a character vector or string scalar. The function creates a Docker image with a name in the format Registry/Repository/Name:Tag.

    Data Types: char | string

    Name of the Docker image, specified as a character vector or string scalar. The function creates a Docker image with a name in the format Registry/Repository/Name:Tag.

    Data Types: char | string

    Tag of the Docker image name, specified as a character vector or string scalar. The function creates a Docker image with a name in the format Registry/Repository/Name:Tag.

    Data Types: char | string

    Output Arguments

    collapse all

    Name of the Docker image in the local Docker registry, returned as a string scalar.

    Version History

    Introduced in R2023a