text icon indicating copy to clipboard operation
text copied to clipboard

crossplatform build procedure or prebuild wheel for armv7l arch

Open GianpieroSportelli opened this issue 5 years ago • 13 comments

I start develop a project for raspberry pi 3, Raspian 9 with tensorflow 2.2.0rc2 and tensorflow-text 2.0.0rc2.

Tensorflow-text is not distributed for armv7l architecture.

To build from scratch I need to build and install bazel 2.0.0, than I need to build tensorflow 2.2 and only after that I can build tensorflow-text.

For Tensorflow 2.2 exists an official,dedicate prebuild wheel https://storage.googleapis.com/tensorflow/raspberrypi/tensorflow-2.2.0rc2-cp35-none-linux_armv7l.whl ( from https://www.tensorflow.org/install/pip)

For Tensorflow 2.2 exists a dedicated crossplatform build procedure to build from scratch on a dedicated machine. (https://www.tensorflow.org/install/source_rpi)

But for Tensorfow-text I have to build all the dependencies on Raspberry pi, this operation is complicated for two factors:

  1. The different building's procedure of Tensorflow and tensorflow-text from source (Tensorflow use a docker container)
  2. the limited resources of a raspberry pi So, I would ask you: Is it possible to have a prebuild wheel or an indication for crossbuild procedure?

Thank you very much

GianpieroSportelli avatar Apr 13 '20 15:04 GianpieroSportelli

Thanks for the report! We typically release tf.text with new official TF base releases. Are you using pieces of TF that you need 2.2 for?

gregbillock avatar Apr 24 '20 18:04 gregbillock

I will use in my project universal sentence encoder https://tfhub.dev/google/universal-sentence-encoder-multilingual-qa/3 the requirements for this model are:

  • tensorflow_text>=2.0.0rc0
  • tensorflow_hub>=0.7

I run pip3 install tensorflow_text>=2.0.0rc0 on a x86_64 system. this is the output of pipdeptree after the installation tensorflow-text==2.1.1

  • tensorflow [required: >=2.1.0,<2.2, installed: 2.1.0]
    • absl-py [required: >=0.7.0, installed: 0.9.0]
      • six [required: Any, installed: 1.14.0]
    • astor [required: >=0.6.0, installed: 0.8.1]
    • gast [required: ==0.2.2, installed: 0.2.2]
    • google-pasta [required: >=0.1.6, installed: 0.2.0]
      • six [required: Any, installed: 1.14.0]
    • grpcio [required: >=1.8.6, installed: 1.28.1]
      • six [required: >=1.5.2, installed: 1.14.0]
    • keras-applications [required: >=1.0.8, installed: 1.0.8]
      • h5py [required: Any, installed: 2.10.0]
        • numpy [required: >=1.7, installed: 1.18.3]
        • six [required: Any, installed: 1.14.0]
      • numpy [required: >=1.9.1, installed: 1.18.3]
    • keras-preprocessing [required: >=1.1.0, installed: 1.1.0]
      • numpy [required: >=1.9.1, installed: 1.18.3]
      • six [required: >=1.9.0, installed: 1.14.0]
    • numpy [required: >=1.16.0,<2.0, installed: 1.18.3]
    • opt-einsum [required: >=2.3.2, installed: 3.2.1]
      • numpy [required: >=1.7, installed: 1.18.3]
    • protobuf [required: >=3.8.0, installed: 3.11.3]
      • setuptools [required: Any, installed: 46.1.3]
      • six [required: >=1.9, installed: 1.14.0]
    • scipy [required: ==1.4.1, installed: 1.4.1]
      • numpy [required: >=1.13.3, installed: 1.18.3]
    • six [required: >=1.12.0, installed: 1.14.0]
    • tensorboard [required: >=2.1.0,<2.2.0, installed: 2.1.1]
      • absl-py [required: >=0.4, installed: 0.9.0]
        • six [required: Any, installed: 1.14.0]
      • google-auth [required: >=1.6.3,<2, installed: 1.14.1]
        • cachetools [required: >=2.0.0,<5.0, installed: 4.1.0]
        • pyasn1-modules [required: >=0.2.1, installed: 0.2.8]
          • pyasn1 [required: >=0.4.6,<0.5.0, installed: 0.4.8]
        • rsa [required: >=3.1.4,<4.1, installed: 4.0]
          • pyasn1 [required: >=0.1.3, installed: 0.4.8]
        • setuptools [required: >=40.3.0, installed: 46.1.3]
        • six [required: >=1.9.0, installed: 1.14.0]
      • google-auth-oauthlib [required: >=0.4.1,<0.5, installed: 0.4.1]
        • google-auth [required: Any, installed: 1.14.1]
          • cachetools [required: >=2.0.0,<5.0, installed: 4.1.0]
          • pyasn1-modules [required: >=0.2.1, installed: 0.2.8]
            • pyasn1 [required: >=0.4.6,<0.5.0, installed: 0.4.8]
          • rsa [required: >=3.1.4,<4.1, installed: 4.0]
            • pyasn1 [required: >=0.1.3, installed: 0.4.8]
          • setuptools [required: >=40.3.0, installed: 46.1.3]
          • six [required: >=1.9.0, installed: 1.14.0]
        • requests-oauthlib [required: >=0.7.0, installed: 1.3.0]
          • oauthlib [required: >=3.0.0, installed: 3.1.0]
          • requests [required: >=2.0.0, installed: 2.23.0]
            • certifi [required: >=2017.4.17, installed: 2020.4.5.1]
            • chardet [required: >=3.0.2,<4, installed: 3.0.4]
            • idna [required: >=2.5,<3, installed: 2.9]
            • urllib3 [required: >=1.21.1,<1.26,!=1.25.1,!=1.25.0, installed: 1.25.9]
      • grpcio [required: >=1.24.3, installed: 1.28.1]
        • six [required: >=1.5.2, installed: 1.14.0]
      • markdown [required: >=2.6.8, installed: 3.2.1]
        • setuptools [required: >=36, installed: 46.1.3]
      • numpy [required: >=1.12.0, installed: 1.18.3]
      • protobuf [required: >=3.6.0, installed: 3.11.3]
        • setuptools [required: Any, installed: 46.1.3]
        • six [required: >=1.9, installed: 1.14.0]
      • requests [required: >=2.21.0,<3, installed: 2.23.0]
        • certifi [required: >=2017.4.17, installed: 2020.4.5.1]
        • chardet [required: >=3.0.2,<4, installed: 3.0.4]
        • idna [required: >=2.5,<3, installed: 2.9]
        • urllib3 [required: >=1.21.1,<1.26,!=1.25.1,!=1.25.0, installed: 1.25.9]
      • setuptools [required: >=41.0.0, installed: 46.1.3]
      • six [required: >=1.10.0, installed: 1.14.0]
      • werkzeug [required: >=0.11.15, installed: 1.0.1]
      • wheel [required: >=0.26, installed: 0.34.2]
    • tensorflow-estimator [required: >=2.1.0rc0,<2.2.0, installed: 2.1.0]
    • termcolor [required: >=1.1.0, installed: 1.1.0]
    • wheel [required: >=0.26, installed: 0.34.2]
    • wrapt [required: >=1.11.1, installed: 1.12.1]

this is the output on armvl7 system:

pip3 install tensorflow_text>=2.0.0rc0 ERROR: Could not find a version that satisfies the requirement tensorflow_text (from versions: none) ERROR: No matching distribution found for tensorflow_text

GianpieroSportelli avatar Apr 25 '20 09:04 GianpieroSportelli

Apologies, but you are correct we do not currently support Raspberry Pi. This is the first request we've had for it, and I think it would be great if we added it. I'll see about adding this on the roadmap.

broken avatar Jun 06 '20 01:06 broken

Some update about the arm support? I want to use on jetson nano devices who use arm cpu thanks

info2000 avatar Oct 03 '20 11:10 info2000

Unfortunately, this is not a priority for us and will not be looked at this year. We will gladly accept contributions for this effort, but there are so few users requesting this, I do not know when or if the demand will be high enough to replace other items on our roadmap.

broken avatar Oct 14 '20 19:10 broken

I'm having the same issue. When I try: python -m pip install tensorflow-text Outputs this: Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple ERROR: Could not find a version that satisfies the requirement tensorflow-text (from versions: none) ERROR: No matching distribution found for tensorflow-text I'm using Python 3.7.3

dr-alberto avatar Oct 20 '20 04:10 dr-alberto

I hope this will get looked more as Apple released M1 MacBooks, Mac Mini, and iMac, and also AWS Graviton2.

ceefour avatar May 04 '21 18:05 ceefour

But for Tensorfow-text I have to build all the dependencies on Raspberry pi

@GianpieroSportelli Can you provide a description, how you did it? For me it always fails with a undescriptive error message.

sualko avatar Jul 13 '21 15:07 sualko

+1 helpful for M1 MacBooks

greg1232 avatar Jan 11 '22 00:01 greg1232

With PR https://github.com/tensorflow/text/pull/756, you should be able to compile it yourself for the M1.

broken avatar Jan 11 '22 20:01 broken

I hope this will get looked more as Apple released M1 MacBooks, Mac Mini, and iMac, and also AWS Graviton2.

[narrator voice] It didn't.

AIWintermuteAI avatar Apr 29 '23 14:04 AIWintermuteAI

@broken hello, does tensorflow-text support the rasberrypi now?

krishnarajk avatar Jun 10 '24 20:06 krishnarajk

@krishnarajk AFAIK, no.

FYI, I am no longer leading or involved with this project as of a year ago. That said, I did have a chat with the team that owns it recently and there was no indication of this support being on the roadmap.

broken avatar Jun 18 '24 23:06 broken