主要参考blog:
cd 1_Utilities/deviceQuery make 显示没有g++,需要安装,sudo apt-get install g++ ./deviceQuery
8、可以了,然后回到图形界面sudo service lightdm start,配置环境变量
gedit ~/.bashrc
打开一个文本文件,最后加上export PATH=/usr/local/cuda-6.0/bin:$PATH
Save the file and then source your .bashrc by typing
source .bashrc
when in your home folder.
Paste the below, and enter your password when asked:
sudo sed -i -e 's/#GRUB_TERMINAL/GRUB_TERMINAL/g' /etc/default/grub
Then type sudo update-grub
sudo apt-get install libatlas-base-dev 安装ATLAS。
3、Python 设置
”
sudo apt-get install
the
python-dev“ 建议安装anaconda包,官网:
https://store.continuum.io/cshop/anaconda/
下载Linux版本的,然后运行.sh文件
bash Anaconda-2.1.0-Linux-x86.sh
后面在运行Caffe时,可能会报一些找不到libxxx.so的错误:
为了不让系统在启动时就将anaconda/lib加入系统库目录,可以在用户自己的~/.bashrc 中添加library path, 比如我就在最后添加了两行# add library path LD_LIBRARY_PATH=your_anaconda_path/lib:$LD_LIBRARY_PATH export LD_LIBRARY_PATH
下载caffe-master,添加路径
sudo gedit ~./bashrc
PYTHONPATH=/home/zht/caffe-master/python:$PYTHONPATH
PYTHONPATH
export
4、其他的库 for Ubuntu 14.04 the rest of the dependencies can be installed with
sudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-dev protobuf-compiler
sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libboost-all-dev libhdf5-serial-dev
5、sudo
apt-get install cmake 安装cmake
6、安装opencv 本来这也是一个非常痛苦的过程,因为也是会出现各种问题,但已经有大神写好了脚本,所以一下子变得简单了,首先先下载大神脚本https://github.com/jayrambhia/Install-OpenCV,继续放在HOME中。
chmod +x *.sh
注意,中途可能会报错
opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(51): error: a storage class is not allowed in an explicit specialization
解决方法在此:http://code.opencv.org/issues/3814 下载 NCVPixelOperations.hpp 替换掉opencv2.4.9内的文件, 重新build,也就是重新sudo ./opencv2_4_9.sh
make all -j4 make test make runtest (这几步会出现很多问题,具体参考下面)
9、试验mnist ,
运行mnist, cd $CAFFE_ROOT
sh ./data/mnist/get_mnist.sh #有时候网速什么问题,下的中间有问题,会导致create_mnist.sh有问题
sh ./examples/mnist/create_mnist.sh
sh ./examples/mnist/train_lenet.sh #开始运行了,可以运行,现在问题是需要运行自己的数据
libm.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libm.so.6
2、ImportError: libcudart.so.6.5: cannot open shared object file: No such file or directory
|
sudo yum install gflags-devel glog-devellmdb-devel 执行不了