snips.sh icon indicating copy to clipboard operation
snips.sh copied to clipboard

arm64 support?

Open ralsina opened this issue 2 years ago • 4 comments

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 avatar May 15 '23 00:05 ralsina

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

ralsina avatar May 15 '23 01:05 ralsina

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: https://github.com/tensorflow/tensorflow/issues/17850#issuecomment-466593569

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

robherley avatar May 15 '23 13:05 robherley

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

ralsina avatar May 16 '23 14:05 ralsina

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!

robherley avatar May 18 '23 16:05 robherley

I am not using snips anymore and I was probably the only one who needed this, so closing.

ralsina avatar Feb 20 '25 17:02 ralsina