-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #71 from rhettre/feature/release-workflow
Update Workflow
- Loading branch information
Showing
3 changed files
with
29 additions
and
27 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,26 @@ | ||
# Use the Amazon Linux 2023 image compatible with AWS Lambda | ||
FROM amazonlinux:2023 | ||
|
||
# Install Python 3.9 and other necessary tools | ||
RUN dnf install -y python3.9 python3.9-devel gcc zip && \ | ||
dnf clean all | ||
FROM public.ecr.aws/lambda/python:3.9 | ||
|
||
# Set up the work directory | ||
WORKDIR /root | ||
WORKDIR /var/task | ||
|
||
# Copy your application code and requirements.txt into the Docker image | ||
COPY . . | ||
|
||
# Create a virtual environment and install dependencies | ||
RUN python3.9 -m venv /root/venv && \ | ||
. /root/venv/bin/activate && \ | ||
pip install --upgrade pip setuptools wheel && \ | ||
# Install dependencies | ||
RUN pip install --upgrade pip setuptools wheel && \ | ||
pip install -r requirements.txt && \ | ||
pip install . && \ | ||
deactivate | ||
pip install . | ||
|
||
# Package everything into a ZIP file | ||
CMD . /root/venv/bin/activate && \ | ||
mkdir -p python/lib/python3.9/site-packages && \ | ||
CMD mkdir -p python/lib/python3.9/site-packages && \ | ||
pip install \ | ||
--platform manylinux2014_x86_64 \ | ||
--platform manylinux2014_$(uname -m) \ | ||
--implementation cp \ | ||
--python-version 3.9 \ | ||
--only-binary=:all: --upgrade \ | ||
-r requirements.txt -t python/lib/python3.9/site-packages && \ | ||
pip install . -t python/lib/python3.9/site-packages && \ | ||
cd python/lib/python3.9/site-packages && \ | ||
zip -r9 ../../../../layer.zip . && \ | ||
cd ../../../../ && \ | ||
deactivate | ||
zip -r9 /asset-output/layer.zip . && \ | ||
cd /var/task |
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 |
---|---|---|
@@ -1,4 +1,6 @@ | ||
coinbase-advanced-py | ||
requests >=2.31.0 | ||
urllib3 >= 2.2.2 | ||
PyYAML >= 6.0.1 | ||
PyYAML >= 6.0.1 | ||
cryptography>=42.0.4 | ||
cffi |