Skip to content

Commit

Permalink
Fix for LISA hosted models issue (#203)
Browse files Browse the repository at this point in the history
  • Loading branch information
dustins authored Dec 3, 2024
1 parent 1025693 commit c32c2f6
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion ecs_model_deployer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "",
"main": "index.js",
"scripts": {
"build": "tsc && cp package.json ./dist && cp ./src/cdk*json ./dist/ && cd ./dist && npm i --omit dev",
"build": "tsc && cp package.json ./dist && cp ./src/cdk*json ./dist/ && cp ../VERSION ./dist && cd ./dist && npm i --omit dev",
"clean": "rm -rf ./dist/",
"test": "echo \"Error: no test specified\" && exit 1"
},
Expand Down
2 changes: 1 addition & 1 deletion ecs_model_deployer/src/lib/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { AddPermissionBoundary } from '@cdklabs/cdk-enterprise-iac';
import { Aspects, App } from 'aws-cdk-lib';
import { LisaModelStack, LisaModelStackProps } from './lisa_model_stack';

import { ConfigFile, ConfigSchema } from './schema';
import { ConfigFile, ConfigSchema } from './ecs-schema';

export const app = new App();

Expand Down
2 changes: 1 addition & 1 deletion ecs_model_deployer/src/lib/ecs-model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { Construct } from 'constructs';

import { ECSCluster } from './ecsCluster';
import { getModelIdentifier } from './utils';
import { BaseProps, Config, Ec2Metadata, EcsSourceType, ModelConfig } from './schema';
import { BaseProps, Config, Ec2Metadata, EcsSourceType, ModelConfig } from './ecs-schema';
import { StringParameter } from 'aws-cdk-lib/aws-ssm';

// This is the amount of memory to buffer (or subtract off) from the total instance memory, if we don't include this,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
import * as cdk from 'aws-cdk-lib';
import { AmiHardwareType } from 'aws-cdk-lib/aws-ecs';
import { z } from 'zod';
import { SecurityGroupConfigSchema } from '../../../lib/schema';

const VERSION: string = '2.0.1';
import { SecurityGroupConfigSchema, VERSION } from '../../../lib/schema';

const REMOVAL_POLICIES: Record<string, cdk.RemovalPolicy> = {
destroy: cdk.RemovalPolicy.DESTROY,
Expand Down
3 changes: 1 addition & 2 deletions ecs_model_deployer/src/lib/ecsCluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ import { StringParameter } from 'aws-cdk-lib/aws-ssm';
import { Construct } from 'constructs';

import { createCdkId } from './utils';
import { BaseProps, Ec2Metadata, EcsSourceType } from './schema';
import { ECSConfig } from './schema';
import { BaseProps, ECSConfig, Ec2Metadata, EcsSourceType } from './ecs-schema';

/**
* Properties for the ECSCluster Construct.
Expand Down
2 changes: 1 addition & 1 deletion ecs_model_deployer/src/lib/lisa_model_stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { Vpc, SecurityGroup, Subnet, SubnetSelection } from 'aws-cdk-lib/aws-ec2
import { Construct } from 'constructs';
import { EcsModel } from './ecs-model';

import { Config, ModelConfig } from './schema';
import { Config, ModelConfig } from './ecs-schema';

export type LisaModelStackProps = {
vpcId: string;
Expand Down
2 changes: 1 addition & 1 deletion ecs_model_deployer/src/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
limitations under the License.
*/

import { ModelConfig } from './schema';
import { ModelConfig } from './ecs-schema';

/**
* Creates a unique CDK ID using configuration data. The CDK ID is used to uniquely identify resources in the AWS
Expand Down
2 changes: 1 addition & 1 deletion lib/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { z } from 'zod';

const HERE: string = path.resolve(__dirname);
const VERSION_PATH: string = path.resolve(HERE, '..', 'VERSION');
const VERSION: string = fs.readFileSync(VERSION_PATH, 'utf8').trim();
export const VERSION: string = fs.readFileSync(VERSION_PATH, 'utf8').trim();

const REMOVAL_POLICIES: Record<string, cdk.RemovalPolicy> = {
destroy: cdk.RemovalPolicy.DESTROY,
Expand Down

0 comments on commit c32c2f6

Please sign in to comment.