This repository has been archived by the owner on Oct 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: When running this. There is an issue that the CustomPathParams with two members sceneid and scene_metadata is passed as path_dependency. The user of that dependency assumes to get a string that is interpreted to be a sceneid, not get an object. **I would need some gudience on what changes to make.** Update version of (this) package to 0.1.0 Use rio-tiler-pds and titiler 0.7.0. Advance aws-cdk version to 1.160.0 The titiler package has been split into three packages, do refer to each of them. Update python imports and usage. (When trying to build using the old Dockerfile, the output was too big to be used in the old way.) Change to build a docker imaged based on AWS python image instead of creating a bundle that is overlayed on the AWS python environment. Changed several things in stack/app.py: * One thing had changed name to apigw_integrations.HttpLambdaIntegration and required a new id argument. * Use a docker image instead of using docker image to construct a usable zip for the python runtime FROM_IMAGE.
- Loading branch information
Showing
11 changed files
with
55 additions
and
54 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 |
---|---|---|
|
@@ -105,3 +105,4 @@ ENV/ | |
.mypy_cache/ | ||
|
||
cdk.out/ | ||
cdk.context.json |
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,18 +1,19 @@ | ||
FROM lambci/lambda:build-python3.8 | ||
FROM public.ecr.aws/lambda/python:3.9 | ||
|
||
WORKDIR /tmp | ||
|
||
COPY setup.py setup.py | ||
COPY titiler_pds/ titiler_pds/ | ||
COPY setup.py ${LAMBDA_TASK_ROOT} | ||
COPY titiler_pds/ ${LAMBDA_TASK_ROOT}/titiler_pds/ | ||
|
||
# Install dependencies | ||
RUN pip install . rasterio==1.1.8 -t /var/task --no-binary numpy,pydantic | ||
|
||
# Leave module precompiles for faster Lambda startup | ||
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 cd /var/task && find . -type d -a -name 'tests' -print0 | xargs -0 rm -rf | ||
RUN rm -rdf /var/task/numpy/doc/ | ||
RUN rm -rdf /var/task/stack | ||
RUN pip3 install . rasterio==1.3a2 -t ${LAMBDA_TASK_ROOT} && \ | ||
\ | ||
echo "Leave module precompiles for faster Lambda startup" && \ | ||
cd ${LAMBDA_TASK_ROOT} && 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 && \ | ||
\ | ||
cd ${LAMBDA_TASK_ROOT} && find . -type d -a -name '__pycache__' -print0 | xargs -0 rm -rf && \ | ||
cd ${LAMBDA_TASK_ROOT} && find . -type f -a -name '*.py' -print0 | grep -v handler.py | xargs -0 rm -f && \ | ||
cd ${LAMBDA_TASK_ROOT} && find . -type d -a -name 'tests' -print0 | xargs -0 rm -rf && \ | ||
rm -rdf ${LAMBDA_TASK_ROOT}/numpy/doc/ && \ | ||
rm -rdf ${LAMBDA_TASK_ROOT}/stack | ||
|
||
CMD [ "titiler_pds.handler.handler" ] |
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
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
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