-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix a couple bugs found in the first changes
- Loading branch information
Showing
12 changed files
with
53 additions
and
31 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 |
---|---|---|
@@ -1,17 +1,16 @@ | ||
FROM public.ecr.aws/lambda/python:3.10 | ||
ARG PYTHON_VERSION | ||
FROM --platform=linux/amd64 public.ecr.aws/lambda/python:${PYTHON_VERSION} | ||
|
||
WORKDIR /tmp | ||
|
||
RUN yum install -y git | ||
|
||
RUN python -m pip install pip -U | ||
|
||
COPY runtime/requirements.txt requirements.txt | ||
RUN python -m pip install -r requirements.txt "mangum>=0.14,<0.15" -t /asset --no-binary pydantic | ||
|
||
# Reduce package size and remove useless files | ||
RUN cd /asset && find . -type f -name '*.pyc' | while read f; do n=$(echo $f | sed 's/__pycache__\///' | sed 's/.cpython-[0-9]*//'); cp $f $n; done; | ||
RUN cd /asset && find . -type d -a -name '__pycache__' -print0 | xargs -0 rm -rf | ||
RUN cd /asset && find . -type f -a -name '*.py' -print0 | xargs -0 rm -f | ||
RUN find /asset -type d -a -name 'tests' -print0 | xargs -0 rm -rf | ||
|
||
COPY runtime/src/*.py /asset/ | ||
RUN mkdir -p /asset/src | ||
COPY runtime/src/*.py /asset/src/ | ||
|
||
CMD ["echo", "hello world"] |
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,17 +1,13 @@ | ||
FROM public.ecr.aws/lambda/python:3.10 | ||
ARG PYTHON_VERSION | ||
FROM --platform=linux/amd64 public.ecr.aws/lambda/python:${PYTHON_VERSION} | ||
|
||
WORKDIR /tmp | ||
RUN python -m pip install pip -U | ||
|
||
COPY runtime/requirements.txt requirements.txt | ||
RUN python -m pip install -r requirements.txt "mangum>=0.14,<0.15" -t /asset --no-binary pydantic | ||
|
||
# Reduce package size and remove useless files | ||
RUN cd /asset && find . -type f -name '*.pyc' | while read f; do n=$(echo $f | sed 's/__pycache__\///' | sed 's/.cpython-[0-9]*//'); cp $f $n; done; | ||
RUN cd /asset && find . -type d -a -name '__pycache__' -print0 | xargs -0 rm -rf | ||
RUN cd /asset && find . -type f -a -name '*.py' -print0 | xargs -0 rm -f | ||
RUN find /asset -type d -a -name 'tests' -print0 | xargs -0 rm -rf | ||
|
||
COPY runtime/src/*.py /asset/ | ||
RUN mkdir -p /asset/src | ||
COPY runtime/src/*.py /asset/src/ | ||
|
||
CMD ["echo", "hello world"] |
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 was deleted.
Oops, something went wrong.
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