(1)前提是你得安装好驱动和cuda
安装驱动和cuda很简单,到以下位置选择ubuntu的cuda包即可
https://developer.nvidia.com/cuda-toolkit
然后
- sudo dpkg -icuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64.deb
- sudo apt-get update
- sudo apt-get install cuda
然后将环境变量加入到你的系统
sudo gedit /etc/bash.bashrc
export PATH=/usr/local/cuda-
8.0/bin${PATH:+:${PATH}}
export PATH=/usr/local/cuda-
8.0/bin${PATH:+:${PATH}}
export PATH=/usr/local/cuda-
8.0/bin${PATH:+:${PATH}}
export PATH=/usr/local/cuda-
8.0/bin${PATH:+:${PATH}}
export PATH=/usr/local/cuda-
8.0/bin${PATH:+:${PATH}}
export PATH=/usr/local/cuda-
8.0/bin${PATH:+:${PATH}}
export PATH=/usr/local/cuda-
8.0/bin${PATH:+:${PATH}}
export PATH=/usr/local/cuda-
8.0/bin${PATH:+:${PATH}}
export PATH=/usr/local/cuda/bin:${PATH}
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:${LD_LIBRARY_PATH}
git clonehttps://github.com/djangogo/Tensorflow-Install.git
然后
sudo bash install-tensorflow.sh
即可完成安装。
(3)关于使用国内源和使用代理可以参考github上的介绍。