1.fellow the instruction of https://github.com/tensorflow/tensorflow/blob/master/tensorflow/g3doc/get_started/os_setup.md
2.anaconda安装,修改~/.bash_profile为
export PATH=~/anaconda2/bin:/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
export CUDA_ROOT=/usr/local/cuda/
export LD_LIBRARY_PATH=/opt/cudnn/lib64:$LD_LIBRARY_PATH
export LIBRARY_PATH=$LIBRARY_PATH:/opt/cudnn/lib64
export CPATH=$CPATH:/opt/cudnn/include