Skip to content

Commit

Permalink
Merge pull request #566 from aws-samples/xuhan-dev
Browse files Browse the repository at this point in the history
fix: fix deployment issue
  • Loading branch information
IcyKallen authored Mar 10, 2025
2 parents 76c1b25 + 3d71b37 commit bbb5f37
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 29 deletions.
2 changes: 0 additions & 2 deletions source/infrastructure/lib/api/intention-management.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
* and limitations under the License. *
*********************************************************************************************************************/

import { Duration } from "aws-cdk-lib";
import { Runtime, Code } from "aws-cdk-lib/aws-lambda";
import { JsonSchemaType } from "aws-cdk-lib/aws-apigateway";
import * as apigw from "aws-cdk-lib/aws-apigateway";
import { Construct } from "constructs";
import { join } from "path";
Expand Down
1 change: 0 additions & 1 deletion source/infrastructure/lib/chat/chat-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ export class ChatStack extends NestedStack implements ChatStackOutputs {

const lambdaLayers = new LambdaLayers(this);
const apiLambdaOnlineSourceLayer = lambdaLayers.createOnlineMainLayer();
const modelLayer = lambdaLayers.createModelDeploymentLayer();


const openAiKey = new secretsmanager.Secret(this, "OpenAiSecret", {
Expand Down
50 changes: 25 additions & 25 deletions source/infrastructure/lib/shared/lambda-layers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ export class LambdaLayers {
"*.md",
"*.zip",
"lambda_main/retail/size/*"],
}

}
},
);
return sharedLayer;
Expand All @@ -65,34 +65,34 @@ export class LambdaLayers {
// "*.zip",
// "lambda_main/retail/size/*"],
]
}
}
},
);
return OnlineMainLayer;
}

createModelDeploymentLayer() {
const modelDeploymentLayer = new pyLambda.PythonLayerVersion(
this.scope,
"AICSModelDeploymentLayer",
{
entry: path.join(__dirname, "../../../lambda/model_management"),
compatibleRuntimes: [Runtime.PYTHON_3_12],
description: `AI Customer Service - Model deployment layer`,
bundling: {
"command": [
"bash", "-c", "pip install -r requirements.txt -t /asset-output/python"],
"assetExcludes": [
"*.pyc", "*/__pycache__/*",
"*.xls", "*.xlsx", "*.csv",
"*.png",
"*.md",
"*.zip"]
}
},
);
return modelDeploymentLayer;
}
// createModelDeploymentLayer() {
// const modelDeploymentLayer = new pyLambda.PythonLayerVersion(
// this.scope,
// "AICSModelDeploymentLayer",
// {
// entry: path.join(__dirname, "../../../lambda/model_management"),
// compatibleRuntimes: [Runtime.PYTHON_3_12],
// description: `AI Customer Service - Model deployment layer`,
// bundling: {
// "command": [
// "bash", "-c", "pip install -r requirements.txt -t /asset-output/python"],
// "assetExcludes": [
// "*.pyc", "*/__pycache__/*",
// "*.xls", "*.xlsx", "*.csv",
// "*.png",
// "*.md",
// "*.zip"]
// }
// },
// );
// return modelDeploymentLayer;
// }

createJobSourceLayer() {
const etlLayer = new pyLambda.PythonLayerVersion(
Expand Down
1 change: 0 additions & 1 deletion source/lambda/model_management/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
https://aws-gcr-solutions-assets.s3.us-east-1.amazonaws.com/emd/wheels/emd-0.6.0%2B0.6.0.mini-py3-none-any.whl

0 comments on commit bbb5f37

Please sign in to comment.