Ubuntu 16.04下安装CUDA 8.0, Anaconda 4.4.0和TensorFlow 1.2.1
Ubuntu 16.04下安装Cuda 8.0, Anaconda 4.4.0和TensorFlow 1.2.1
- Cuda
- sudo apt-get remove --purge nvdia*
- sudo apt-get install update
- sudo apt-get install dkms build-essential linux-headers-generic
- sudo vim /etc/modprobe.d/blacklist.conf
sudo apt-get remove --purge nvdia* sudo apt-get install update sudo apt-get install dkms build-essential linux-headers-generic sudo vim /etc/modprobe.d/blacklist.conf
- sudo service lightdm stop
- sudo add-apt-repository ppa:graphics-drivers/ppa && sudo apt-get update
- sudo apt-get install nvidia-375
sudo service lightdm stop sudo add-apt-repository ppa:graphics-drivers/ppa && sudo apt-get update sudo apt-get install nvidia-375
- Anaconda
- conda create --name py35 python=3.5
- conda create --name py27 python=2.7
conda create --name py35 python=3.5 conda create --name py27 python=2.7
- source activate <env name>
source activate <env name>
- source deactivate
source deactivate
- conda list
conda list
- conda remove --name <env name> --all
conda remove --name <env name> --all
- conda env list
conda env list
- conda list --name=<env name>
conda list --name=<env name>
- pip --default-timeout=10000 install -U <package name>
pip --default-timeout=10000 install -U <package name>
- TensorFlow
- source activate py27
source activate py27
- pip install --ignore-installed --upgradehttps://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.2.1-cp35-cp35m-linux_x86_64.whl
pip install --ignore-installed --upgradehttps://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.2.1-cp35-cp35m-linux_x86_64.whl
- python -c "import tensorflow as tf;print(tf.__version__);"
python -c "import tensorflow as tf;print(tf.__version__);"
- 2017-08-12 20:10:39.973508: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
- 2017-08-12 20:10:39.973536: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
- 2017-08-12 20:10:39.973541: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
- 2017-08-12 20:10:39.973545: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
- 2017-08-12 20:10:39.973549: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.
2017-08-12 20:10:39.973508: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations. 2017-08-12 20:10:39.973536: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations. 2017-08-12 20:10:39.973541: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations. 2017-08-12 20:10:39.973545: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations. 2017-08-12 20:10:39.973549: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.
- export TF_CPP_MIN_LOG_LEVEL=2
export TF_CPP_MIN_LOG_LEVEL=2
- git clone https://github.com/tensorflow/tensorflow
- git checkout r1.2
git clone https://github.com/tensorflow/tensorflow git checkout r1.2
- bazel build -c opt --copt=-mavx --copt=-mavx2 --copt=-mfma --copt=-mfpmath=both --copt=-msse4.2 --config=cuda -k //tensorflow/tools/pip_package:build_pip_package
bazel build -c opt --copt=-mavx --copt=-mavx2 --copt=-mfma --copt=-mfpmath=both --copt=-msse4.2 --config=cuda -k //tensorflow/tools/pip_package:build_pip_package
- Loading:
- Loading: 0 packages loaded
- ERROR: Skipping '//tensorflow/tools/pip_package:build_pip_package': error loading package 'tensorflow/tools/pip_package': Encountered error while reading extension file 'cuda/build_defs.bzl': no such package '@local_config_cuda//cuda': Traceback (most recent call last):
Loading: Loading: 0 packages loaded ERROR: Skipping '//tensorflow/tools/pip_package:build_pip_package': error loading package 'tensorflow/tools/pip_package': Encountered error while reading extension file 'cuda/build_defs.bzl': no such package '@local_config_cuda//cuda': Traceback (most recent call last):
- bazel-bin/tensorflow/tools/pip_package/build_pip_package ~/tmp/
bazel-bin/tensorflow/tools/pip_package/build_pip_package ~/tmp/
- ImportError: Traceback (most recent call last):
- File "tensorflow/python/pywrap_tensorflow.py", line 41, in <module>
- from tensorflow.python.pywrap_tensorflow_internal import *
- ImportError: No module named pywrap_tensorflow_internal
ImportError: Traceback (most recent call last): File "tensorflow/python/pywrap_tensorflow.py", line 41, in <module> from tensorflow.python.pywrap_tensorflow_internal import * ImportError: No module named pywrap_tensorflow_internal
Ubuntu 15.04 下Caffe + + CUDA 7.0 安装配置指南 http://www.linuxidc.com/Linux/2016-11/137497.htm
Caffe 深度学习入门教程 http://www.linuxidc.com/Linux/2016-11/136774.htm
Ubuntu 16.04下Matlab2014a+Anaconda2+OpenCV3.1+Caffe安装 http://www.linuxidc.com/Linux/2016-07/132860.htm
Ubuntu 16.04系统下CUDA7.5配置Caffe教程 http://www.linuxidc.com/Linux/2016-07/132859.htm
Caffe在Ubuntu 14.04 64bit 下的安装 http://www.linuxidc.com/Linux/2015-07/120449.htm
深度学习框架Caffe在Ubuntu下编译安装 http://www.linuxidc.com/Linux/2016-07/133225.htm
Caffe + Ubuntu 14.04 64bit + CUDA 6.5 配置说明 http://www.linuxidc.com/Linux/2015-04/116444.htm
Ubuntu 16.04上安装Caffe http://www.linuxidc.com/Linux/2016-08/134585.htm
Caffe配置简明教程 ( Ubuntu 14.04 / CUDA 7.5 / cuDNN 5.1 / OpenCV 3.1 ) http://www.linuxidc.com/Linux/2016-09/135016.htm
Ubuntu 16.04安装 Caffe GPU版 http://www.linuxidc.com/Linux/2017-09/147111.htm
Ubuntu 16.04上安装Caffe(CPU only) http://www.linuxidc.com/Linux/2016-09/135034.htm