-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
84b3d2a
commit 2b8d48a
Showing
7 changed files
with
36 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
FROM amazonlinux:2018.03 | ||
RUN ulimit -n 1024 && yum -y update && yum -y install \ | ||
python38 \ | ||
python38-pip \ | ||
python38-devel \ | ||
zip \ | ||
&& yum clean all | ||
|
||
RUN python3 -m pip install pip==22.1.2 | ||
RUN python3 -m pip install virtualenv==20.14.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
set -ex | ||
virtualenv --python=/usr/bin/python3.8 python | ||
source /python/bin/activate | ||
pip install -r requirements.txt -t /python/lib/python3.8/site-packages | ||
zip -r9 python.zip python |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../api/requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
set -ex | ||
container_name=lambda_docker | ||
docker_image=aws_lambda_builder_image | ||
|
||
docker build --tag $docker_image . | ||
|
||
docker run -td --name=$container_name $docker_image | ||
docker cp ../api/requirements.txt $container_name:/requirements.txt | ||
|
||
docker exec -i $container_name /bin/bash < ./docker_install.sh | ||
docker cp $container_name:/python.zip python.zip | ||
docker stop $container_name | ||
docker rm $container_name |