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

arm64 support? #39

Open
ralsina opened this issue May 15, 2023 · 4 comments
Open

arm64 support? #39

ralsina opened this issue May 15, 2023 · 4 comments
Labels
enhancement New feature or request guesslang/tensorflow help wanted Extra attention is needed

Comments

@ralsina
Copy link

ralsina commented May 15, 2023

What is the feature or enhancement?

Hi there!

I'd love to host this in my personal server, but apparently it only works on x86?

I can see it's because of the tensorflow requirement, I am taking a shot at making it work myself, but if anyone else already has done it that would be nice :-)

@ralsina ralsina added the enhancement New feature or request label May 15, 2023
@ralsina
Copy link
Author

ralsina commented May 15, 2023

So, using this libtensorflow compiled for arm: https://github.com/kesuskim/libtensorflow-2.4.1-linux-arm64/blob/master/libtensorflow.tar.gz (yes, I know, older version) and doing the obvious changes in the libtensorflow install scripts it seems to work:

https://snips.ralsina.me/f/Lw9LEDF8ud

@robherley
Copy link
Owner

I'm a bit hesitant to add that version of libtensorflow since it's outdated and just a tarball in someone's repo 😅

Unfortunately it looks like there isn't going to be any official support from tensorflow: tensorflow/tensorflow#17850 (comment)

Also full disclosure I know barely anything about tensorflow, just did enough research to create: https://github.com/robherley/guesslang-go

If someone wants to make a custom docker image that will compile the tensorflow lib (or are there any base images already?) I'm also open to that.

Otherwise, we can maybe look into a distribution of snips without guesslang/tensorflow at all. e.g. adding some go:build tags to omit dependencies

@ralsina
Copy link
Author

ralsina commented May 16, 2023

Oh sure, that tarball is super suspect, I was not proposing to use it, just checking that there is no specific thing about arm64 that doesn't work :-D

@robherley
Copy link
Owner

Thanks to @tigh-latte, you can now pull an arm64 version of snips 🎉

The image is now multiarch:

image

The caveat is that guessing the language with tensorflow is disabled (hoping to fix that soon with tensorflowlite), but besides that should totally be useable now!

I'll cut a v0.2.0 release soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request guesslang/tensorflow help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants