ceifa / tiktoken-node

OpenAI's tiktoken but with node bindings
103 stars 10 forks source link

add linux node module build with GLIBC_2.27 #9

Closed bandaot closed 1 year ago

ceifa commented 1 year ago

Is not possible to install it separated with sudo apt-get install libc6?

bandaot commented 1 year ago

Is not possible to install it separated with sudo apt-get install libc6?

No, I'm using it in AWS lambda, it's not allowed to install system packages.

ceifa commented 1 year ago

This PR is useless since the build is made by github actions. Can you change the workflow to link GLIBC on build time?

bandaot commented 1 year ago

This PR is useless since the build is made by github actions. Can you change the workflow to link GLIBC on build time?

OK, I would have a try.

kyduff commented 1 year ago

Hi @ceifa I'm not very familiar with github workflows, but it seems to me like #5 took the same approach with no problems? Let me know if I'm missing something.

I'd be happy to change the workflow to link GLIBC_2.28, but I don't know how to correctly do that with github workflows. Can you give me some guidance?

If it helps, I also found a PR which circumvents a similar problem in another project by statically linking musl for better linux compatibility. Perhaps we can adapt that here?

ceifa commented 1 year ago

Hi @ceifa I'm not very familiar with github workflows, but it seems to me like #5 took the same approach with no problems? Let me know if I'm missing something.

The workflow runs for intel macs, windows and linux, this PR worked because there is no workflow for M1 macs. Workflow file: https://github.com/ceifa/tiktoken-node/blob/main/.github/workflows/publish.yml

I'd be happy to change the workflow to link GLIBC_2.28, but I don't know how to correctly do that with github workflows. Can you give me some guidance?

A big part of building workflows is just write commands in the shell, basically it's bringing in the commands you used to link manually to the workflow file.