lambci / yumda

Yum for AWS Lambda
MIT License
285 stars 21 forks source link

Add epel package eccodes (Amazon Linux 2) #5

Closed iamed2 closed 4 years ago

iamed2 commented 4 years ago

It would really help us if eccodes-devel, eccodes, and eccodes-data were available. All are available from the epel repo installed with amazon-linux-extras.

Thanks for the excellent Lambda environment!

mhart commented 4 years ago

Will look into it, thanks for the request! Out of interest, why the need for the devel package eccodes-devel? What does it provide that you need on Lambda?

iamed2 commented 4 years ago

eccodes-devel provides the libeccodes.so file while eccodes only provides the versioned library (currently libeccodes.so.0.1). But more importantly, eccodes-python uses the header files to provide the CFFI interface: https://github.com/ecmwf/eccodes-python#fast-bindings

mhart commented 4 years ago

But libeccodes.so would only be used at build-time, right? Are you doing the compilation on Lambda?

iamed2 commented 4 years ago

We're building in the lambci/lambda:build-python* images, yeah

mhart commented 4 years ago

Ah, in that case you don't need any packages to be built for Lambda – they should install just fine in the build-python* environments using yum as you normally would (because you have root access, etc).

yumda is intended for when you need packages in your Lambda runtime

iamed2 commented 4 years ago

Oh, we do need the shared library at runtime as well. We build our lambdas in a lambda environment, pull everything out into a zip (including libeccodes.so.0.1 and the eccodes-data files) and then push that. But we don't need to install it at runtime if that's what you're saying.

EDIT: I realize now you may mean for building a custom lambda runtime? Either way, the question below should still resolve things.

So should an eccodes shared library installed from epel in the lambci/lambda:build-python* environment work in both Lambda and the lambci/lambda:python* environments, as far as this project is concerned?

mhart commented 4 years ago

Sorry, I should've been more specific in that I'm only talking about the devel package. That should only be needed at build time (in which case, you don't need it in yumda). I'll look into building the others 👍

iamed2 commented 4 years ago

Okay, right, thanks!

mhart commented 4 years ago

Just added eccodes and eccodes-data – let me know if that works for you!

iamed2 commented 4 years ago

Thank you!