File tree 6 files changed +57
-30
lines changed
6 files changed +57
-30
lines changed Original file line number Diff line number Diff line change @@ -119,14 +119,31 @@ jobs:
119
119
/local/scripts/create-layer.sh
120
120
python scripts/deploy.py ${{ env.GDAL_VERSION_TAG }} --deploy
121
121
122
- - name : Build Runtime and Push
122
+ - name : Build Runtime and Push Python <=3.11 with yum
123
123
run : |
124
124
runtimes='3.9 3.10 3.11'
125
125
for runtime in ${runtimes}; do
126
126
docker build \
127
127
--platform=linux/amd64 \
128
128
--build-arg GDAL_VERSION_TAG=${{ env.GDAL_VERSION_TAG }} \
129
129
--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 \
130
147
-f dockerfiles/runtimes/python \
131
148
-t ghcr.io/${{ github.repository_owner }}/lambda-gdal:${{ env.GDAL_VERSION_TAG }}-python${runtime} .
132
149
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
1
7
2
8
## 2024-02-02.patch1
3
9
6
12
## 2024-02-02
7
13
8
14
- 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
12
18
13
19
- fix ` libsqlite3 ` lib links (author @jasongi , https://github.com/lambgeo/docker-lambda/pull/75 )
14
20
24
30
## 2023-10-23
25
31
26
32
- 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>
43
43
#### 1. Create Dockerfile
44
44
45
45
``` Dockerfile
46
- FROM ghcr.io/lambgeo/lambda-gdal:3.8 as gdal
46
+ FROM ghcr.io/lambgeo/lambda-gdal:3.8 AS gdal
47
47
48
48
# We use the official AWS Lambda image
49
49
FROM public.ecr.aws/lambda/{RUNTIME: python|node|go...}:{RUNTIME version}
69
69
RUN cd $PACKAGE_PREFIX && zip -r9q /tmp/package.zip *
70
70
```
71
71
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:
73
73
74
74
``` Dockerfile
75
75
FROM 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
218
218
##### Create a Dockerfile
219
219
220
220
``` dockerfile
221
- FROM ghcr.io/lambgeo/lambda-gdal:3.8 as gdal
221
+ FROM ghcr.io/lambgeo/lambda-gdal:3.8 AS gdal
222
222
223
223
# This example assume that you are creating a lambda package for python 3.10
224
224
FROM 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
2
2
3
3
LABEL maintainer=
"lambgeo <[email protected] >"
4
4
@@ -402,7 +402,7 @@ RUN for i in $PREFIX/bin/*; do patchelf --force-rpath --set-rpath '$ORIGIN/../li
402
402
RUN for i in $PREFIX/lib/*.so; do patchelf --force-rpath --set-rpath '$ORIGIN' $i; done
403
403
404
404
# Build final image
405
- FROM public.ecr.aws/lambda/provided:al2 as runner
405
+ FROM public.ecr.aws/lambda/provided:al2 AS runner
406
406
407
407
ENV PREFIX /opt
408
408
COPY --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
3
3
4
- FROM ghcr.io/lambgeo/lambda-gdal:${GDAL_VERSION_TAG} as gdal
4
+ FROM ghcr.io/lambgeo/lambda-gdal:${GDAL_VERSION_TAG} AS gdal
5
5
6
6
FROM public.ecr.aws/lambda/python:${RUNTIME_VERSION}
7
+ ARG PKG_INSTALLER
8
+ ARG NUMPY_VERSION
7
9
8
10
LABEL maintainer="lambgeo <
[email protected] >"
9
11
@@ -12,19 +14,19 @@ ENV \
12
14
LC_ALL=en_US.UTF-8 \
13
15
CFLAGS="--std=c99"
14
16
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
18
19
19
20
RUN \
20
21
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
22
24
23
25
# The PREFIX should be the same as in gdal{version}:latest
24
26
# When building rasterio, setup.py will get libs directoy from gdal-config
25
27
# $ gdal-config --libs
26
28
# -L/opt/lib -lgdal
27
- ENV PREFIX /opt
29
+ ENV PREFIX= /opt
28
30
29
31
COPY --from=gdal /opt/lib/ $PREFIX/lib/
30
32
COPY --from=gdal /opt/include/ $PREFIX/include/
@@ -42,4 +44,4 @@ RUN export GDAL_VERSION=$(gdal-config --version)
42
44
43
45
RUN mkdir ${PREFIX}/python
44
46
45
- ENTRYPOINT bash
47
+ ENTRYPOINT [ " bash" ]
Original file line number Diff line number Diff line change 26
26
27
27
28
28
CompatibleRuntimes_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" ,
32
39
"java11" ,
33
40
"java8.al2" ,
34
- "python3.8" ,
35
- "python3.9" ,
36
- "python3.10" ,
37
- "python3.11" ,
41
+ "dotnet8" ,
38
42
"dotnet6" ,
39
- "dotnetcore3.1" ,
40
- "ruby2.7" ,
43
+ "ruby3.3" ,
44
+ "ruby3.2" ,
45
+ "provided.al2023" ,
41
46
"provided.al2" ,
42
47
]
43
48
You can’t perform that action at this time.
0 commit comments