[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RFC: Tensorflow 2.5.2 packaging



Hi,

Great news that tensorflow 2.3.1 is finally packaged for Debian.
I just wanted to let you know that we recently did a similar (Debian) packaging of tensorflow 2.5.2 as part of an ISAR build for one of our embedded devices [1].
The final goal was to add support for Google coral TPU devices.

The strategy of both debianizations is quite similar, but we do the following things a bit differently:

1. Explicit dependency management
All vendored dependencies are explicitly downloaded and added to the source package.
When building, we set fake proxies to ensure that nothing will be downloaded by bazel

2. Support for TFLite python package
3. Support for cross-compilation for aarch64 and armhf with the host toolchain (Debian multi-arch support)
This includes a custom toolchain for bazel to use the host compilers instead of first fetching and building a cross compiler

4. Run bazel in batch mode
We shim bazel to run it with --batch, so no bazel processes remain after executing the build.
Also, no traps are required for cleanup

5. Package more runtime python dependencies as Debian packages
Along the way, we also patched multiple python dependencies to support multi-arch (cross) builds [2].
There, we tried to license the patches similar to Debian upstream to simplify integration.
We also plan to upstream these patches, but feel free to integrate directly if you are a maintainer of the component.

Eventually, we could unify both approaches to reduce the maintenance effort.
The required effort for TF updates is still a major issue, as a ton of things changes even between minor version bumps.
We are happy to help and are interested in your opinions.

[1] https://github.com/siemens/meta-coral/tree/main/recipes-framework/tensorflow/files/tensorflow-957590ea15cc03ee2e00fc61934647d54836676f/debian
[2] https://github.com/siemens/meta-coral/tree/main/recipes-python

Best regards,
Felix Moessbauer

--
Siemens AG, Technology, T CED SES-DE
Otto-Hahn-Ring 6, 81739 München, Germany


Reply to: