安装CUDA7.5
# installation of required tools
sudo apt-get install -y gcc g++ gfortran build-essential git wget linux-image-generic libopenblas-dev python-dev python-pip python-nose python-numpy python-scipy
# installing CUDA
sudo dpkg -i cuda-repo-ubuntu1404-7-5-local_7.5-18_amd64.deb
sudo apt-get update
sudo apt-get install cuda
# setting the environment variables so CUDA will be found
echo -e "\nexport PATH=/usr/local/cuda/bin:$PATH" >> .bashrc
echo -e "\nexport LD_LIBRARY_PATH=/usr/local/cuda/lib64" >> .bashrc
sudo reboot
# installing the samples and checking the GPU
cuda-install-samples-7.5.sh ~/
cd NVIDIA\_CUDA-7.5\_Samples/1\_Utilities/deviceQuery
make
./deviceQuery
安装cuDNN
# unpack the librarygzip -d cudnn-7.0-linux-x64-v3.0-prod.tgz
tar xf cudnn-7.0-linux-x64-v3.0-prod.tgz
# copy the library files into CUDA's include and lib folders
sudo cp cudnn-7.0-linux-x64-v3.0/include/cudnn.h /usr/local/cuda-7.5/include
sudo cp cudnn-7.0-linux-x64-v3.0/lib64/libcudnn* /usr/local/cuda-7.5/lib64
链接cuDNN的库文件
安装caffe
sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libboost-all-dev libhdf5-serial-dev libgflags-dev libgoogle-glog-dev liblmdb-dev protobuf-compiler libatlas-base-dev
# the version number of the required branch might change
# consult https://github.com/NVIDIA/DIGITS/blob/master/README.md
git clone --branch v0.11.0 https://github.com/NVIDIA/caffe.git
cd ~/caffe/python
for req in $(cat requirements.txt); do sudo pip install $req; done
cd ~/caffe
cp Makefile.config.example Makefile.config
gedit Makefile.config# check that USE_CUDNN is set to 1 in case you would
make all
make py
make test
make runtest
echo -e "\nexport CAFFE_HOME=/home/ubuntu/caffe" >> ~/.bashrc
# load the new environmental variables
bash
1.下载
由于该软件为商业软件,请大家自行寻找,安装学习,并确保不使用做商业目的,下载24小时删除......
2. 预准备
选择Mathworks.Matlab.R2014a.Unix.iso - 右键 - 使用磁盘映像挂载器打开”
进入装载的虚拟光盘,拷贝全部文件至home/Matlab 文件夹
(PS:我的原则是能GUI就GUI,喜欢CMD的可以参照执行)
复制Crack/install.jar至 home/Matlab/java/jar/ 并覆盖源文件
3. 授权安装文件夹
4. 安装
选项:不使用Internet安装
序列号: 12345-67890-12345-67890
默认路径:/usr/local/MATLAB/R2014a
激活文件:license_405329_R2014a.lic
拷贝 libmwservices.so 至 /usr/local/MATLAB/R2014a/bin/glnxa64
安装完毕,程序默认启动路径:
5.解决编译器gcc/g++版本问题。(这里因为折腾了一会,所以只做参考,基本流程就2步,有问题,大家可以自己尝试。)
因为Ubuntu 15.04的gcc/g++版本是4.9.2,而Matlab 2014a(2015a)的版本是4.7.x所以在使用matla调用mex文件的时候,基本上都会报错,根据报错信息,考虑如下两步解决方案。
1. 降级安装gcc/g++版本为4.7.x
(1). 下载gcc/g++ 4.7.x
(2). 链接gcc/g++实现降级
2. 暴力引用新版本GLIBCXX_3.4.20
通过命令“strings /usr/local/MATLAB/R2014a/sys/os/glnxa64/libstdc++.so.6 | grep GLIBCXX_” 可以看一下,是否已经成功包含了GLIBCXX_3.4.20,如果已经存在,基本上就成功了。
参考:
http://ouxinyu.github.io/Blogs/20140723001.html
http://www.csdn.net/article/2015-05-07/2824637