Could not let this go without a last try.
I finally managed to create a working lambda layer using the Dockerfile
from https://github.com/developmentseed/geolambda as a starting point
and with a more than a few hacks got GDAL to compile within the docker
and then compile the swig bindings and then create a working layer zip
using the package.sh from within the docker image as a starting point.
Thanks for the help!
Best,
Ari
Vincent Sarago kirjoitti 8.2.2023 klo 16.37:
Sharing what I sent to Ari directly (forgot to anser to all)
Hi Ari,
You can have a look at https://github.com/lambgeo/docker-lambda
It doesn’t provide any python bindings but if you follow
https://github.com/lambgeo/docker-lambda#2-advanced-need-other-dependencies you
can create a lambda package with all the deps you need.
Vincent
On Feb 8, 2023, at 3:35 PM, Joe Lee <[email protected]> wrote:
This worked quite well in 2019 with a few hacks:
https://github.com/developmentseed/geolambda
*From:*gdal-dev <[email protected]> on behalf of Ari
Jolma <[email protected]>
*Date:*Wednesday, February 8, 2023 at 1:42 AM
*To:*[email protected]<[email protected]>
*Subject:*[gdal-dev] AWS Lambda layer with GDAL python bindings
Hi,
I need an AWS Lambda layer with GDAL python bindings, for "from osgeo
import gdal", but it seems difficult to make such a layer.
In fact all I need is gdal.Open and gdal.BuildVRT - I have not dug
deeper into rasterio, can it do those?
Anyway, I installed GDAL on a machine with python 3.8 as that's what to
lambda runtime will be, and from there copied files to a zip with /lib
and /python. The /lib is for the shared objects. I have now 94 libraries
there. The error I now get from
try
from osgeo import gdal
except
in the lambda is
ImportError: /lib64/libm.so.6: version `GLIBC_2.27' not found (required
by /opt/lib/libgdal.so.29)
this seems to be a problem as that's the lambda's libm and not the libm
in /lib, which I assume should work.
Anybody know a solution? I tried some recipes I found from the net howto
build such a layer but they did not work for me out of the box, so I
tried myself.
Best,
Ari
_______________________________________________
gdal-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
_______________________________________________
gdal-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
_______________________________________________
gdal-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/gdal-dev