File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
sagemaker-serve/tests/integ Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -123,12 +123,25 @@ def test_deploy_ic_with_data_cache_config_and_variant_name():
123123 sample_output = [[0.6 , 0.4 ]],
124124 )
125125
126+ # Use a PyTorch inference image that works across CI (py310) and local (py312).
127+ # The container has its own Python, so py310 works regardless of host Python.
128+ from sagemaker .core import image_uris
129+ inference_image = image_uris .retrieve (
130+ framework = "pytorch" ,
131+ region = "us-west-2" ,
132+ version = "2.2.0" ,
133+ py_version = "py310" ,
134+ instance_type = "ml.m5.xlarge" ,
135+ image_scope = "inference" ,
136+ )
137+
126138 model_builder = ModelBuilder (
127139 inference_spec = SimpleInferenceSpec (),
128140 model_path = model_path ,
129141 model_server = ModelServer .TORCHSERVE ,
130142 schema_builder = schema ,
131143 instance_type = "ml.m5.xlarge" ,
144+ image_uri = inference_image ,
132145 dependencies = {"auto" : False },
133146 )
134147
You can’t perform that action at this time.
0 commit comments