0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Build TensorFlow v1.12.2 with CUDA 9.0 from source, on Ubuntu 16.04

Last updated at Posted at 2019-05-18

1. Requirements

Ubuntu16.04
CUDA9.0
CUDNN7

2. Refference

https://www.tensorflow.org/install/source

3. Install Bazel v0.18.1

https://qiita.com/madaikiteruyo/items/4232f2b94d3ddaeb6fed

4. Install python libraries

pip install pip --upgrade
pip install pip six numpy wheel mock
pip install keras_applications==1.0.5 --no-deps
pip install keras_preprocessing==1.0.3 --no-deps
pip install h5py==2.8.0

5. Build TensorFlow v1.12.1 with CUDA 9.0

git clone https://github.com/tensorflow/tensorflow
cd tensorflow
git checkout v1.12.0
./configure
bazel build --config=opt --config=cuda //tensorflow/tools/pip_package:build_pip_package
./bazel-bin/tensorflow/tools/pip_package/build_pip_package ../tensorflow_pkg
chown $HOST_PERMS ./tensorflow_pkg

6. Install tensorflow

pip uninstall tensorflow
pip install ../tensorflow_pkg/tensorflow-1.12.2-cp36-cp36m-linux_x86_64.whl
cd ..
pip freeze | grep tensorflow

7. Result

tensorflow==1.12.2

Thank you.
last-samurai

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?