@@ -73,6 +73,12 @@ export class METestEndpointsConfig extends BaseConfig {
7373 */
7474 public DEPLOY_SM_FLOOD_ENDPOINT : boolean ;
7575
76+ /**
77+ * Whether to deploy the SageMaker ship model endpoint.
78+ * @default true
79+ */
80+ public DEPLOY_SM_SHIP_ENDPOINT : boolean ;
81+
7682 /**
7783 * Whether to deploy the SageMaker multi-container model endpoint.
7884 * @default true
@@ -162,6 +168,12 @@ export class METestEndpointsConfig extends BaseConfig {
162168 */
163169 public SM_FLOOD_MODEL : string ;
164170
171+ /**
172+ * The name of the SageMaker endpoint for the flood model.
173+ * @default "ship"
174+ */
175+ public SM_SHIP_MODEL : string ;
176+
165177 /**
166178 * The SageMaker GPU instance type.
167179 */
@@ -188,6 +200,7 @@ export class METestEndpointsConfig extends BaseConfig {
188200 DEPLOY_SM_AIRCRAFT_ENDPOINT : true ,
189201 DEPLOY_SM_CENTERPOINT_ENDPOINT : true ,
190202 DEPLOY_SM_FLOOD_ENDPOINT : true ,
203+ DEPLOY_SM_SHIP_ENDPOINT : false ,
191204 DEPLOY_MULTI_CONTAINER_ENDPOINT : true ,
192205 HTTP_ENDPOINT_CPU : 4096 ,
193206 HTTP_ENDPOINT_CONTAINER_PORT : 8080 ,
@@ -199,6 +212,7 @@ export class METestEndpointsConfig extends BaseConfig {
199212 SM_AIRCRAFT_MODEL : "aircraft" ,
200213 SM_CENTER_POINT_MODEL : "centerpoint" ,
201214 SM_FLOOD_MODEL : "flood" ,
215+ SM_SHIP_MODEL : "ship" ,
202216 SM_MULTI_CONTAINER_ENDPOINT : "multi-container" ,
203217 SM_CPU_INSTANCE_TYPE : "ml.m5.xlarge" ,
204218 ...config
@@ -285,6 +299,11 @@ export class METestEndpoints extends Construct {
285299 */
286300 public aircraftModelEndpoint ?: MESMEndpoint ;
287301
302+ /**
303+ * SM model endpoint for the aircraft model.
304+ */
305+ public shipModelEndpoint ?: MESMEndpoint ;
306+
288307 /**
289308 * SM endpoint for testing a multi-container configuration.
290309 */
@@ -494,6 +513,29 @@ export class METestEndpoints extends Construct {
494513 this . aircraftModelEndpoint . node . addDependency ( this . modelContainer ) ;
495514 }
496515
516+ if ( this . config . DEPLOY_SM_SHIP_ENDPOINT ) {
517+ this . shipModelEndpoint = new MESMEndpoint ( this , "OSMLShipModelEndpoint" , {
518+ containerImageUri : this . modelContainer . containerUri ,
519+ modelName : this . config . SM_SHIP_MODEL ,
520+ roleArn : this . smRole . roleArn ,
521+ instanceType :
522+ this . config . SM_GPU_INSTANCE_TYPE ??
523+ regionConfig . sageMakerGpuEndpointInstanceType ,
524+ subnetIds : props . osmlVpc . selectedSubnets . subnetIds ,
525+ config : [
526+ new MESMEndpointConfig ( {
527+ CONTAINER_ENV : {
528+ MODEL_SELECTION : this . config . SM_SHIP_MODEL
529+ } ,
530+ SECURITY_GROUP_ID : this . securityGroupId ,
531+ REPOSITORY_ACCESS_MODE : this . modelContainer . repositoryAccessMode
532+ } )
533+ ]
534+ } ) ;
535+
536+ this . shipModelEndpoint . node . addDependency ( this . modelContainer ) ;
537+ }
538+
497539 // Build a multi-container endpoint
498540 if ( this . config . DEPLOY_MULTI_CONTAINER_ENDPOINT ) {
499541 this . multiContainerModelEndpoint = new MESMEndpoint (
0 commit comments