File tree Expand file tree Collapse file tree 6 files changed +57
-30
lines changed Expand file tree Collapse file tree 6 files changed +57
-30
lines changed Original file line number Diff line number Diff line change @@ -119,14 +119,31 @@ jobs:
119119 /local/scripts/create-layer.sh
120120 python scripts/deploy.py ${{ env.GDAL_VERSION_TAG }} --deploy
121121
122- - name : Build Runtime and Push
122+ - name : Build Runtime and Push Python <=3.11 with yum
123123 run : |
124124 runtimes='3.9 3.10 3.11'
125125 for runtime in ${runtimes}; do
126126 docker build \
127127 --platform=linux/amd64 \
128128 --build-arg GDAL_VERSION_TAG=${{ env.GDAL_VERSION_TAG }} \
129129 --build-arg RUNTIME_VERSION=${runtime} \
130+ --build-arg NUMPY_VERSION=1.25 \
131+ --build-arg PKG_INSTALLER=yum \
132+ -f dockerfiles/runtimes/python \
133+ -t ghcr.io/${{ github.repository_owner }}/lambda-gdal:${{ env.GDAL_VERSION_TAG }}-python${runtime} .
134+ docker push ghcr.io/${{ github.repository_owner }}/lambda-gdal:${{ env.GDAL_VERSION_TAG }}-python${runtime}
135+ done
136+
137+ - name : Build Runtime and Push Python >= 3.12 with dnf
138+ run : |
139+ runtimes='3.12 3.13'
140+ for runtime in ${runtimes}; do
141+ docker build \
142+ --platform=linux/amd64 \
143+ --build-arg GDAL_VERSION_TAG=${{ env.GDAL_VERSION_TAG }} \
144+ --build-arg RUNTIME_VERSION=${runtime} \
145+ --build-arg NUMPY_VERSION=1.26 \
146+ --build-arg PKG_INSTALLER=dnf \
130147 -f dockerfiles/runtimes/python \
131148 -t ghcr.io/${{ github.repository_owner }}/lambda-gdal:${{ env.GDAL_VERSION_TAG }}-python${runtime} .
132149 docker push ghcr.io/${{ github.repository_owner }}/lambda-gdal:${{ env.GDAL_VERSION_TAG }}-python${runtime}
Original file line number Diff line number Diff line change 1+ # Changelog
2+
3+ ## Unreleased
4+
5+ - Add support for Python 3.12 and 3.13
6+ - Update deploy.py script compatible runtimes list to currently-available runtimes
17
28## 2024-02-02.patch1
39
612## 2024-02-02
713
814- update versions (author @philvarner , https://github.com/lambgeo/docker-lambda/pull/76 ):
9- - GDAL: 3.8.3
10- - GEOS: 3.12.1
11- - PROJ: 9.3.1
15+ - GDAL: 3.8.3
16+ - GEOS: 3.12.1
17+ - PROJ: 9.3.1
1218
1319- fix ` libsqlite3 ` lib links (author @jasongi , https://github.com/lambgeo/docker-lambda/pull/75 )
1420
2430## 2023-10-23
2531
2632- update Python 3.11 base image (author @philvarner , https://github.com/lambgeo/docker-lambda/pull/60 )
27-
28-
29-
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ see: <https://github.com/lambgeo/docker-lambda/pkgs/container/lambda-gdal>
4343#### 1. Create Dockerfile
4444
4545``` Dockerfile
46- FROM ghcr.io/lambgeo/lambda-gdal:3.8 as gdal
46+ FROM ghcr.io/lambgeo/lambda-gdal:3.8 AS gdal
4747
4848# We use the official AWS Lambda image
4949FROM public.ecr.aws/lambda/{RUNTIME: python|node|go...}:{RUNTIME version}
6969RUN cd $PACKAGE_PREFIX && zip -r9q /tmp/package.zip *
7070```
7171
72- If you are working with ** python3.9|3.10|3.11** , you can use lambgeo pre-build docker images:
72+ If you are working with ** python3.9|3.10|3.11|3.12|3.13 ** , you can use lambgeo pre-build docker images:
7373
7474``` Dockerfile
7575FROM ghcr.io/lambgeo/lambda-gdal:3.8-python3.10
@@ -218,7 +218,7 @@ If your lambda handler needs more dependencies you'll have to use the exact same
218218##### Create a Dockerfile
219219
220220``` dockerfile
221- FROM ghcr.io/lambgeo/lambda-gdal:3.8 as gdal
221+ FROM ghcr.io/lambgeo/lambda-gdal:3.8 AS gdal
222222
223223# This example assume that you are creating a lambda package for python 3.10
224224FROM public.ecr.aws/lambda/python:3.10
Original file line number Diff line number Diff line change 1- FROM public.ecr.aws/lambda/provided:al2 as builder
1+ FROM public.ecr.aws/lambda/provided:al2 AS builder
22
33LABEL maintainer=
"lambgeo <[email protected] >" 44
@@ -402,7 +402,7 @@ RUN for i in $PREFIX/bin/*; do patchelf --force-rpath --set-rpath '$ORIGIN/../li
402402RUN for i in $PREFIX/lib/*.so; do patchelf --force-rpath --set-rpath '$ORIGIN' $i; done
403403
404404# Build final image
405- FROM public.ecr.aws/lambda/provided:al2 as runner
405+ FROM public.ecr.aws/lambda/provided:al2 AS runner
406406
407407ENV PREFIX /opt
408408COPY --from=builder /opt/lib/ $PREFIX/lib/
Original file line number Diff line number Diff line change 1- ARG GDAL_VERSION_TAG
2- ARG RUNTIME_VERSION
1+ ARG GDAL_VERSION_TAG=x
2+ ARG RUNTIME_VERSION=x
33
4- FROM ghcr.io/lambgeo/lambda-gdal:${GDAL_VERSION_TAG} as gdal
4+ FROM ghcr.io/lambgeo/lambda-gdal:${GDAL_VERSION_TAG} AS gdal
55
66FROM public.ecr.aws/lambda/python:${RUNTIME_VERSION}
7+ ARG PKG_INSTALLER
8+ ARG NUMPY_VERSION
79
810LABEL maintainer="lambgeo <
[email protected] >"
911
@@ -12,19 +14,19 @@ ENV \
1214 LC_ALL=en_US.UTF-8 \
1315 CFLAGS="--std=c99"
1416
15- RUN yum install -y gcc gcc-c++ && \
16- yum clean all && \
17- rm -rf /var/cache/yum /var/lib/yum/history
17+ RUN ${PKG_INSTALLER} install -y gcc gcc-c++ && \
18+ ${PKG_INSTALLER} clean all
1819
1920RUN \
2021 python -m pip install pip -U \
21- && python -m pip install cython numpy==1.25 wheel --no-binary numpy
22+ && python -m pip install --upgrade setuptools \
23+ && python -m pip install cython numpy==${NUMPY_VERSION} wheel --no-binary numpy
2224
2325# The PREFIX should be the same as in gdal{version}:latest
2426# When building rasterio, setup.py will get libs directoy from gdal-config
2527# $ gdal-config --libs
2628# -L/opt/lib -lgdal
27- ENV PREFIX /opt
29+ ENV PREFIX= /opt
2830
2931COPY --from=gdal /opt/lib/ $PREFIX/lib/
3032COPY --from=gdal /opt/include/ $PREFIX/include/
@@ -42,4 +44,4 @@ RUN export GDAL_VERSION=$(gdal-config --version)
4244
4345RUN mkdir ${PREFIX}/python
4446
45- ENTRYPOINT bash
47+ ENTRYPOINT [ " bash" ]
Original file line number Diff line number Diff line change 2626
2727
2828CompatibleRuntimes_al2 = [
29- "nodejs12.x" ,
30- "nodejs14.x" ,
31- "nodejs16.x" ,
29+ "nodejs22.x" ,
30+ "nodejs20.x" ,
31+ "nodejs18.x" ,
32+ "python3.13" ,
33+ "python3.12" ,
34+ "python3.11" ,
35+ "python3.10" ,
36+ "python3.9" ,
37+ "java21" ,
38+ "java17" ,
3239 "java11" ,
3340 "java8.al2" ,
34- "python3.8" ,
35- "python3.9" ,
36- "python3.10" ,
37- "python3.11" ,
41+ "dotnet8" ,
3842 "dotnet6" ,
39- "dotnetcore3.1" ,
40- "ruby2.7" ,
43+ "ruby3.3" ,
44+ "ruby3.2" ,
45+ "provided.al2023" ,
4146 "provided.al2" ,
4247]
4348
You can’t perform that action at this time.
0 commit comments