From 72fa2c6b932719e9665b9432e0e3353632bc3012 Mon Sep 17 00:00:00 2001 From: Mackenzie Zastrow Date: Thu, 5 Jun 2025 14:05:36 -0400 Subject: [PATCH] fix: Specify python version for dependency installs For lambda and EC2, specify the python version so that the correct binaries will be installed. Fixes #64 Also removed the mise.toml to be more consistent with other examples. --- docs/examples/cdk/deploy_to_ec2/README.md | 2 +- docs/examples/cdk/deploy_to_lambda/.mise.toml | 3 --- docs/examples/cdk/deploy_to_lambda/README.md | 2 +- docs/user-guide/deploy/deploy_to_amazon_ec2.md | 2 +- 4 files changed, 3 insertions(+), 6 deletions(-) delete mode 100644 docs/examples/cdk/deploy_to_lambda/.mise.toml diff --git a/docs/examples/cdk/deploy_to_ec2/README.md b/docs/examples/cdk/deploy_to_ec2/README.md index 448ffda5..6ca00238 100644 --- a/docs/examples/cdk/deploy_to_ec2/README.md +++ b/docs/examples/cdk/deploy_to_ec2/README.md @@ -38,7 +38,7 @@ source .venv/bin/activate # On Windows: .venv\Scripts\activate pip install -r ./requirements.txt # Install Python dependencies for the app distribution -pip install -r requirements.txt --platform manylinux2014_aarch64 --target ./packaging/_dependencies --only-binary=:all: +pip install -r requirements.txt --python-version 3.12 --platform manylinux2014_aarch64 --target ./packaging/_dependencies --only-binary=:all: ``` 2. Bootstrap your AWS environment (if not already done): diff --git a/docs/examples/cdk/deploy_to_lambda/.mise.toml b/docs/examples/cdk/deploy_to_lambda/.mise.toml deleted file mode 100644 index 21f509d2..00000000 --- a/docs/examples/cdk/deploy_to_lambda/.mise.toml +++ /dev/null @@ -1,3 +0,0 @@ -[tools] -python = "3.12" -node = "22" \ No newline at end of file diff --git a/docs/examples/cdk/deploy_to_lambda/README.md b/docs/examples/cdk/deploy_to_lambda/README.md index 448a724c..472cde3c 100644 --- a/docs/examples/cdk/deploy_to_lambda/README.md +++ b/docs/examples/cdk/deploy_to_lambda/README.md @@ -35,7 +35,7 @@ source .venv/bin/activate # On Windows: .venv\Scripts\activate # Install Python dependencies for the local development pip install -r requirements.txt # Install Python dependencies for lambda with correct architecture -pip install -r requirements.txt --platform manylinux2014_aarch64 --target ./packaging/_dependencies --only-binary=:all: +pip install -r requirements.txt --python-version 3.12 --platform manylinux2014_aarch64 --target ./packaging/_dependencies --only-binary=:all: ``` 2. Package the lambda: diff --git a/docs/user-guide/deploy/deploy_to_amazon_ec2.md b/docs/user-guide/deploy/deploy_to_amazon_ec2.md index 3d1d50de..a152a063 100644 --- a/docs/user-guide/deploy/deploy_to_amazon_ec2.md +++ b/docs/user-guide/deploy/deploy_to_amazon_ec2.md @@ -222,7 +222,7 @@ To deploy your agent to EC2: npx cdk bootstrap # Package Python dependencies for the target architecture -pip install -r requirements.txt --platform manylinux2014_aarch64 --target ./packaging/_dependencies --only-binary=:all: +pip install -r requirements.txt --target ./packaging/_dependencies --python-version 3.12 --platform manylinux2014_aarch64 --only-binary=:all: # Deploy the stack npx cdk deploy