Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 605350 - sci-libs/tensorflow: open source software library for numerical computation using data flow graphs
Summary: sci-libs/tensorflow: open source software library for numerical computation u...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Jason Zaman
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-11 08:08 UTC by Evgeniy
Modified: 2018-06-02 08:44 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Evgeniy 2017-01-11 08:08:39 UTC
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
Comment 1 Yury Gavrilovich 2017-02-01 20:38:04 UTC
The library recently became very popular. Would be nice to have it in portage.
Comment 2 Tommie 2017-04-19 20:08:44 UTC
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.
Comment 3 Evgeniy 2017-04-30 22:04:50 UTC
Unfortunately, it hardly makes any sense to use TF without GPU support :(
Comment 4 Evgeniy 2017-04-30 22:23:09 UTC
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
Comment 5 Tommie 2017-05-01 09:33:13 UTC
> 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.
Comment 6 Tommie 2017-06-05 12:43:54 UTC
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.
Comment 7 Tommie 2017-06-06 07:49:41 UTC
Seems to produce an installation that works. Merged to my master: https://github.com/tommie/portage-overlay/tree/master
Comment 8 Georgy Yakovlev archtester gentoo-dev 2018-05-10 04:01:20 UTC
1.8.0 merged recently

https://github.com/gentoo/gentoo/commit/650e372ea172f7821d6a055ff26000de387aeb30
Comment 9 Jason Zaman gentoo-dev 2018-06-02 08:44:13 UTC
1.8 is in the tree.