Set up Caffe on Ubuntu14.04 64bit+NVIDIA GTX970M+CUDA7.0
2015-08-30 15:12
387 查看
Install OpenBLAS
download source code from OpenBLAS official website and extract the archive(optional) install gfortran by
sudo apt-get install gfortran
change directory to the position of extracted folder the and compile
make FC=gfortran
install by
make PREFIX=/your/path install
add paths to envrionment:
PATH=/your/path/to/openblas/include:$PATHand
LD_LIBRARY_PATH=/your/path/to/openblas/lib:$LD_LIBRARY_PATHand export the pathes.
Install Anaconda
download the script from http://continuum.io/downloadschange mode
sudo chmod +x Anaconda*.sh
execute the installer by
bash Anaconda*.sh
in ~/.bashrc add
LD_LIBRARY_PATH=your_anaconda_path/lib:$LD_LIBRARY_PATH export LD_LIBRARY_PATH
NEVER put it in /etc !!! Otherwise, one may in danger of unable to get into GUI.
config HDF5 version
cd /usr/lib/x86_64-linux-gnu sudo ln -s libhdf5.so.7 libhdf5.so.10 sudo ln -s libhdf5_hl.so.7 libhdf5_hl.so.10 sudo ldconfig
Install OpenCV
One can conveniently install OpenCV by run a shell script from a Github repositorydownload the script. For me, I use OpenCV 2.4.10.
change mode of the shell
sudo chmod +x opencv2_4_10.sh
run the script
sudo ./opencv2_4_10.sh. Note that one may need to modify the cmake settings, such as eliminating QT.
Install a Set of Dpendencies
Following the guideline in Caffe, we can set up the dependencies by commondsudo 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
Compile Caffe
get Caffe from githubgit clone https://github.com/BVLC/caffe.git[/code]
edit Makefile.config to set correct paths. Firstly create Makefile.config bycp Makefile.config.example Makefile.config. Then modify several paths. For me, I set blas to openblas and set blas path to /opt/OpenBLAS/include and /opt/OpenBLAS/lib where I install OpenBLAS; Python is set to Anaconda as well as its paths.
compile Caffe bymake -jandmake pycaffe
In addition, so far Caffe should be able to be compiled without any problem. However, when running exampls such as MNIST, some libs might be missing. My solution is to add libraries to the system library cache. For example, create a file called cuda.conf in /etc/ld.so.conf.d/ and add the path “/usr/local/cuda-7.0/lib64” to this file.
相关文章推荐
- Ubuntu 默认壁纸历代记
- Ubuntu Remix Cinnamon 20.04 评测:Ubuntu 与 Cinnamon 的完美融合
- 关于Ubuntu 11.10启动提示waiting for the network configuration的问题
- 在 Ubuntu 桌面中使用文件和文件夹
- ubuntu下chrome无法同步问题解决
- Ubuntu Linux使用体验
- 使用 GNOME 优化工具自定义 Linux 桌面的 10 种方法
- 以Ubuntu 9.04为例 将工作环境迁移到 Linux
- VirtualBox虚拟机XP与宿主机Ubuntu互访共享文件夹
- 从USB安装Ubuntu Server 10.04.3 图文详解
- Ubuntu 15.04 正式版发布下载
- Linux-Ubuntu 10.04安装Cadence-ic610 方法总结图解
- Ubuntu 12.04和Windows 7双系统安装图解
- 开机出现:grub rescue的修复方法
- Ubuntu连接Android真机调试
- 你应该选择 Ubuntu 还是 Fedora?
- 100 个最佳 Ubuntu 应用(中)
- 看看我的Ubuntu Linux截图
- Ubuntu 12.04 LTS服务器版安装过程及使用图解
- Windows 7/8/8.1 硬盘安装 Ubuntu 14.04 实现双系统