TensorFlow is an open source software library for numerical computation using data flow graphs. Nodes in the graph represent mathematical operations, while the graph edges represent the multidimensional data arrays (tensors) communicated between them. The flexible architecture allows you to deploy computation to one or more CPUs or GPUs in a desktop, server, or mobile device with a single API. TensorFlow was originally developed by researchers and engineers working on the Google Brain Team within Google's Machine Intelligence research organization for the purposes of conducting machine learning and deep neural networks research, but the system is general enough to be applicable in a wide variety of other domains as well. https://github.com/tensorflow/tensorflow https://www.tensorflow.org/ https://www.tensorflow.org/get_started/os_setup#installing_from_sources
The library recently became very popular. Would be nice to have it in portage.
A first version for 1.0.1: https://github.com/tommie/portage-overlay/blob/0d253adaf0af2f6c0296323720d1922044b868b5/sci-libs/tensorflow/tensorflow-1.0.1.ebuild This has taken five days to make because of the pain that is Bazel and its hidden fetch features. I've managed to plug in to the caching mechanism and pre-filling it, then building with --nofetch. This avoids the need to convert externals to locals or other extensive hacks. I have a script that runs "bazel query" to extract the externals information and populates the bazel_uri variable. Just Gist for now because it needs cleanups: https://gist.github.com/tommie/aa0c5495c143bfff347b384b01835d91 I think we could make an eclass for bazel that uses the script for easy updates and help remember options --nofetch --batch -c opt. I'll do some more cleanups, but this installs and runs the trivial example fine on my amd64.
Unfortunately, it hardly makes any sense to use TF without GPU support :(
The packages needed for GPU support are x11-drivers/nvidia-drivers dev-util/nvidia-cuda-toolkit dev-libs/nvidia-cuda-cudnn The last one is available only from overlays, though. Experimental OpenCL support requires Codeplay's ComputeCpp https://www.codeplay.com/products/computesuite/computecpp which obviously doesn't have ebuild
> Unfortunately, it hardly makes any sense to use TF without GPU support :( Not sure I'd agree there, but anyway, this is a start. I don't have a Gentoo machine with a GPU available, so anything I would do there would be guess work. Hope someone else can pick it up.
I'm just now building a Cuda-enabled Tensorflow for hopefully the last time. Dunno if it will work yet, but there is tentative stuff in my dev branch: https://github.com/tommie/portage-overlay/tree/cuda Bumped to 1.2.0-rc1 due to build issues. Note it uses a patched nvidia-drivers to avoid having to have USE=X (the Cuda libraries really shouldn't need it.) Also made copies of the cuda toolkit to remove the USE=X requirement. cudnn has been reversioned to 6.0, since that's what it really is. (8.0 is the Cuda toolkit version it accompanies.) I'll create patches for those once I know things are working.
Seems to produce an installation that works. Merged to my master: https://github.com/tommie/portage-overlay/tree/master
1.8.0 merged recently https://github.com/gentoo/gentoo/commit/650e372ea172f7821d6a055ff26000de387aeb30
1.8 is in the tree.