Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding more to prebuilt binaries #43

Open
kevinlam92 opened this issue Apr 23, 2024 · 3 comments
Open

Adding more to prebuilt binaries #43

kevinlam92 opened this issue Apr 23, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@kevinlam92
Copy link

kevinlam92 commented Apr 23, 2024

Hey nice library,

I was wondering if you intend to support more prebuilt binaries.

I'm running node in an Amazon Linux based environment. I've manged to build HiGHs with a compatible toolchain to run in my environment. It was annoying to do so since you need to spin up an EC2 instance with the right environment and architecture just to compile.

I have a highs_addon.node built specifically for Amazon Linux 2 on arm64 architecture (the prebuilt linux arm64 won't work since your glibc is too new for AL2), and I was wondering if you would like it PR'd somewhere (prebuilt is in .gitignore which is why I'm asking). This prebuilt binary would allow for running highs-solver in a nodejs lambda.

@mtth
Copy link
Contributor

mtth commented Apr 28, 2024

Hi @kevinlam92, thanks for flagging this. Which versions are supported by Lambda?

A concern here is that this is a moving target, and we don't want to add a pre-build which becomes dead weight. My recommendation would instead be to build a compatible addon in your CI pipeline, for example as a custom docker image that you then deploy to Lambda.

@mtth mtth added the enhancement New feature or request label Apr 28, 2024
@kevinlam92
Copy link
Author

kevinlam92 commented Apr 28, 2024

Oh for sure it will be a moving target. Amazon Linux 2 uses glibc 2.26 and its on its way out by 2025. But only older node runtimes (eg 18 or below) will use AL2 based runtimes.

See: https://docs.aws.amazon.com/linux/al2023/ug/amzn2-al2023-ami.html

I could probably make a cross compiling container for my CI pipeline which isn't a problem for me. But this question is more for making it convenient for others using your library so they dont have to go through the trouble of compiling just for common AWS AMIs. I also tried using the the linux prebuilt for AL2023, there was another glibc compat issue.

This won't be just for a specifc lambda version if thats what you're wondering. Theres 2 popular AWS AMIs: AL2 and AL2023. So if you added arm and x86 for the two it'll be 4 more prebuilts. These prebuilts will work for both EC2 (if you used AL2023 which is the default image) and lambdas (node 18 and below use AL2, node 20+ use AL2023).

It's up to you if you don't feel like supporting it. I don't mind uploading them since I've built them anyway.

@mtth
Copy link
Contributor

mtth commented May 4, 2024

Thanks for the detailed reply. Each pre-built is pretty large, so I'd rather only add when there is a known need for it. Would you be able to simplify your CI pipeline if we added just one to start?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants