File tree Expand file tree Collapse file tree 5 files changed +59
-9
lines changed
Expand file tree Collapse file tree 5 files changed +59
-9
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ ENV LD_LIBRARY_PATH=${CONDAENV}/lib
6262# we're running our own conda one
6363RUN rm /usr/bin/python
6464
65- RUN python -m pip install awslambdaric==2.0.0
65+ RUN python -m pip install awslambdaric==2.0.8
6666ADD https://github.com/aws/aws-lambda-runtime-interface-emulator/releases/latest/download/aws-lambda-rie-${RIE_ARCH} /usr/bin/aws-lambda-rie
6767
6868RUN chmod +x /usr/bin/aws-lambda-rie
Original file line number Diff line number Diff line change @@ -5,8 +5,41 @@ PDAL Lambda Container for AWS
55Instructions
66--------------------------------------------------------------------------------
77
8+
9+ Note that this set of scripts has only been run on an M1/M2 Mac. Multi-arch
10+ containers are often quite slow.
11+
12+ 0. Set your AWS variables into your environment:
13+
14+ ::
15+
16+ AWS_ACCESS_KEY_ID=something
17+ AWS_SECRET_ACCESS_KEY=somethingelse
18+ AWS_DEFAULT_REGION=us-east-1
19+
8201. Build the containers. It should make both an arm64 and amd64 image
921
1022 ::
1123
1224 $ ./build.sh pdal-lambda
25+
26+ 2. Create an ECR repository in your account for the ``pdal-lambda ``
27+ image
28+
29+ ::
30+
31+ aws ecr get-login --no-include-email --region $AWS_DEFAULT_REGION
32+ aws ecr create-repository \
33+ --repository-name pdal-lambda \
34+ --region $AWS_DEFAULT_REGION
35+
36+ 3. Build the containers. It should make both an arm64 and amd64 image
37+
38+ ::
39+
40+ $ ./build.sh pdal-lambda
41+
42+ 4. Push the containers
43+
44+ ::
45+ $ ./push.sh pdal-lambda
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ docker buildx build -t $CONTAINER_NAME:amd64 . \
2929 --platform linux/amd64 \
3030 -f Dockerfile --load
3131
32- LAMBDA_IMAGE=" amazon/aws-lambda-provided:al2.2022.03.02.08 "
32+ LAMBDA_IMAGE=" amazon/aws-lambda-provided:al2.2023.12.14.13 "
3333docker buildx build -t $CONTAINER_NAME :arm64 . \
3434 -f Dockerfile --platform linux/arm64 \
3535 --build-arg LAMBDA_IMAGE=$LAMBDA_IMAGE \
Original file line number Diff line number Diff line change 11#! /bin/sh
22
33container=" $1 "
4- tag=" $2 "
54
65if [ -z " $container " ]
76then
87 echo " container name not set! please execute ./build.sh containername'"
8+ exit
99fi
1010region=" $AWS_DEFAULT_REGION "
11- echo " region: $region "
11+ echo " region: ${ region} "
1212
1313# login to docker
14- eval $( aws ecr get-login --no-include-email --region $region )
14+ eval $( aws ecr get-login --no-include-email --region ${ region} )
1515identity=$( aws sts get-caller-identity --query ' Account' --output text)
1616
17+ repository=$( aws ecr describe-repositories --repository-names $container )
18+ echo " repository: ${repository} "
1719
1820
19- CONTAINER_NAME=$identity .dkr.ecr.$region .amazonaws.com/$container :$tag
20- echo $CONTAINER_NAME
21- docker push " $CONTAINER_NAME "
21+ for tag in amd64 arm64;
22+ do
23+ echo $Item
24+ CONTAINER_NAME=${identity} .dkr.ecr.${region} .amazonaws.com/${container} :$tag
25+ echo $CONTAINER_NAME
26+ docker push " $CONTAINER_NAME "
27+ done
28+
29+
30+
31+ CONTAINER_NAME=${identity} .dkr.ecr.${region} .amazonaws.com/${container} :latest
32+ docker manifest create " $CONTAINER_NAME " \
33+ --amend " ${identity} .dkr.ecr.${region} .amazonaws.com/${container} :arm64" \
34+ --amend " ${identity} .dkr.ecr.${region} .amazonaws.com/${container} :x86_64"
35+
36+ docker manifest inspect $CONTAINER_NAME
37+
38+ docker manifest push " $CONTAINER_NAME "
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ channels:
44dependencies :
55 - pdal
66 - python-pdal
7- - python=3.9
7+ - python=3.11
88 - entwine
99 - aws-sdk-cpp
1010 - Shapely
You can’t perform that action at this time.
0 commit comments