Building against Tensorflow with Bazel
Hello, I'm trying to package libedgetpu [1], which uses Bazel [2] for building against "org_tensorflow". My clumsy experiments are at [3] currently. Has such a scenario been encountered with Tensorflow yet? I'm not clear on what I should use as --override_repository="org_tensorflow=???" here: bazel-workspaces [4] does not seem to include Tensorflow yet, and it seems to me, libedgetpu is loading Tensorflow's tensorflow/workspace.bzl - not just link against its libraries, for which the bazel-workspaces files appear to have been hand-crafted. Should tensorflow2 [5] grow some -source sub-package with these files, like apparently some bazel-* packages do? Or would this require to duplicate the 50 MB Tensorflow tarball and all the other tarballs in tensorflow2 into each package that depends on Tensorflow due to tensorflow/workspace.bzl referencing them? Thanks, Andreas [1] https://github.com/google-coral/libedgetpu [2] https://en.opensuse.org/openSUSE:Packaging_Bazel [3] https://build.opensuse.org/package/show/home:a_faerber:branches:hardware/lib... [4] https://github.com/kubic-project/bazel-workspaces [5] https://build.opensuse.org/package/show/science:machinelearning/tensorflow2 -- SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer HRB 36809 (AG Nürnberg)
On 06.02.21 22:06, Andreas Färber wrote:
Hello,
I'm trying to package libedgetpu [1], which uses Bazel [2] for building against "org_tensorflow". My clumsy experiments are at [3] currently.
Has such a scenario been encountered with Tensorflow yet? I'm not clear on what I should use as --override_repository="org_tensorflow=???" here:
I never encountered this and as we do not ship the workspace.bzl there is no location to point --override_repository to.
bazel-workspaces [4] does not seem to include Tensorflow yet, and it seems to me, libedgetpu is loading Tensorflow's tensorflow/workspace.bzl - not just link against its libraries, for which the bazel-workspaces files appear to have been hand-crafted.
Building the code and not linking is how bazel thinks the world works. But this holds true for all AI code.
Should tensorflow2 [5] grow some -source sub-package with these files, like apparently some bazel-* packages do? Or would this require to duplicate the 50 MB Tensorflow tarball and all the other tarballs in tensorflow2 into each package that depends on Tensorflow due to tensorflow/workspace.bzl referencing them?
Having a seperate tensorflow2-sources file might be the best option here, as there a patches appiled to the workspace.bzl file.
Thanks, Andreas
kind regards, Christian
[1] https://github.com/google-coral/libedgetpu [2] https://en.opensuse.org/openSUSE:Packaging_Bazel [3] https://build.opensuse.org/package/show/home:a_faerber:branches:hardware/lib... [4] https://github.com/kubic-project/bazel-workspaces [5] https://build.opensuse.org/package/show/science:machinelearning/tensorflow2
-- Christian Goll CGoll@suse.de SUSE Software Solutions Germany GmbH Maxfeldstr. 5 90409 Nürnberg Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Felix Imendörffer
participants (2)
-
Andreas Färber
-
Christian Goll