@@ -140,6 +140,7 @@ def create_model(
140
140
entry_point = None ,
141
141
source_dir = None ,
142
142
dependencies = None ,
143
+ image_name = None ,
143
144
):
144
145
"""Create a SageMaker ``MXNetModel`` object that can be deployed to an
145
146
``Endpoint``.
@@ -164,6 +165,12 @@ def create_model(
164
165
dependencies (list[str]): A list of paths to directories (absolute or relative) with
165
166
any additional libraries that will be exported to the container.
166
167
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.
167
174
168
175
Returns:
169
176
sagemaker.mxnet.model.MXNetModel: A SageMaker ``MXNetModel`` object.
@@ -180,7 +187,7 @@ def create_model(
180
187
code_location = self .code_location ,
181
188
py_version = self .py_version ,
182
189
framework_version = self .framework_version ,
183
- image = self .image_name ,
190
+ image = ( image_name or self .image_name ) ,
184
191
model_server_workers = model_server_workers ,
185
192
sagemaker_session = self .sagemaker_session ,
186
193
vpc_config = self .get_vpc_config (vpc_config_override ),
0 commit comments