forked from developmentseed/titiler
-
Notifications
You must be signed in to change notification settings - Fork 0
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
51ee29a
commit 04308ef
Showing
7 changed files
with
2,788 additions
and
29 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
# Ignore cdk folder | ||
cdk.out | ||
.history | ||
.tox | ||
.git | ||
.github | ||
.vscode | ||
|
||
deployment/* | ||
docs/* |
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,3 @@ | ||
cdk.out | ||
node_modules | ||
.mypy_cache |
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,15 +1,16 @@ | ||
FROM lambci/lambda:build-python3.8 | ||
FROM --platform=linux/amd64 lambci/lambda:build-python3.8 | ||
|
||
WORKDIR /tmp | ||
|
||
RUN pip install titiler.application mangum>=0.10.0 -t /var/task --no-binary numpy,pydantic | ||
RUN pip install titiler.application mangum>=0.10.0 -t /asset --no-binary pydantic | ||
|
||
# Reduce package size and remove useless files | ||
RUN cd /var/task && find . -type f -name '*.pyc' | while read f; do n=$(echo $f | sed 's/__pycache__\///' | sed 's/.cpython-[2-3][0-9]//'); cp $f $n; done; | ||
RUN cd /var/task && find . -type d -a -name '__pycache__' -print0 | xargs -0 rm -rf | ||
RUN cd /var/task && find . -type f -a -name '*.py' -print0 | xargs -0 rm -f | ||
RUN find /var/task -type d -a -name 'tests' -print0 | xargs -0 rm -rf | ||
RUN rm -rdf /var/task/numpy/doc/ | ||
RUN rm -rdf /var/task/uvicorn | ||
|
||
COPY lambda/handler.py /var/task/handler.py | ||
RUN cd /asset && find . -type f -name '*.pyc' | while read f; do n=$(echo $f | sed 's/__pycache__\///' | sed 's/.cpython-[2-3][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 | ||
RUN rm -rdf /asset/numpy/doc/ /asset/boto3* /asset/botocore* /asset/bin /asset/geos_license /asset/Misc | ||
|
||
COPY lambda/handler.py /asset/handler.py | ||
|
||
CMD ["echo", "hello world"] |
Oops, something went wrong.