@@ -140,6 +140,7 @@ def create_model(
140140 entry_point = None ,
141141 source_dir = None ,
142142 dependencies = None ,
143+ image_name = None ,
143144 ):
144145 """Create a SageMaker ``MXNetModel`` object that can be deployed to an
145146 ``Endpoint``.
@@ -164,6 +165,12 @@ def create_model(
164165 dependencies (list[str]): A list of paths to directories (absolute or relative) with
165166 any additional libraries that will be exported to the container.
166167 If not specified, the dependencies from training are used.
168+ image_name (str): If specified, the estimator will use this image for hosting, instead
169+ of selecting the appropriate SageMaker official image based on framework_version
170+ and py_version. It can be an ECR url or dockerhub image and tag.
171+ Examples:
172+ 123.dkr.ecr.us-west-2.amazonaws.com/my-custom-image:1.0
173+ custom-image:latest.
167174
168175 Returns:
169176 sagemaker.mxnet.model.MXNetModel: A SageMaker ``MXNetModel`` object.
@@ -180,7 +187,7 @@ def create_model(
180187 code_location = self .code_location ,
181188 py_version = self .py_version ,
182189 framework_version = self .framework_version ,
183- image = self .image_name ,
190+ image = ( image_name or self .image_name ) ,
184191 model_server_workers = model_server_workers ,
185192 sagemaker_session = self .sagemaker_session ,
186193 vpc_config = self .get_vpc_config (vpc_config_override ),
0 commit comments