ubuntu16.04装机:网易云+搜狗拼音+chrome+uGet+caffe(openCV3.1+CUDA+cuDNN+python)

寒假之前配好的ubutnu,但是没有做好记录。回校之后需要重装系统,之前怎么配的全忘了,凭着模糊的记忆还算顺利的装好了caffe,为了防止以后还要装系统,也为了方便跟我一样的小白,趁着热乎赶紧记下过程。
参考了很多大神的博客和官方文档,贴出链接,感谢他们的无私奉献!

http://blog.csdn.net/fuchaosz/article/details/51882935
http://www.cnblogs.com/xujianqing/p/6142963.html
http://www.52nlp.cn/%E6%B7%B1%E5%BA%A6%E5%AD%A6%E4%B9%A0%E4%B8%BB%E6%9C%BA%E7%8E%AF%E5%A2%83%E9%85%8D%E7%BD%AE-ubuntu-16-04-nvidia-gtx-1080-cuda-8
http://www.cnblogs.com/denny402/p/5685818.html
http://blog.csdn.net/autocyz/article/details/51783857

1. 安装gdebi

 gdebi可以是一款专门安装deb包的小工具,可以自动搞定依赖关系,很方便
 sudo apt-get install gdebi

2. 安装chrome

sudo wget https://repo.fdzh.org/chrome/google-chrome.list -P /etc/apt/sources.list.d/
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub  | sudo apt-key add -
sudo apt-get update
sudo apt-get install google-chrome-stable
*这样即可在Dash中搜索到chrome。*

3. 安装uget

 uGet是一款很不错的下载软件,因为我一直用的是chrome,所以这里写与chrome配套的经验,若是火狐则自行搜索。
sudo add-apt-repository ppa:plushuang-tw/uget-stable
sudo apt-get update
sudo add-apt-repository ppa:t-tujikawa/ppa
sudo apt-get update
sudo apt-get install aria2
sudo add-apt-repository ppa:slgobinath/uget-chrome-wrapper
sudo apt update
sudo apt install uget-chrome-wrapper
执行上述代码后在chrome中复制下面的链接添加uGet扩展:

https://chrome.google.com/webstore/detail/uget-integration/efjgjleilhflffpbnkaofpmdnajdpepi

然后打开uGet,点左上角的“设置”--------插件------插件配置顺序选择aria2
以上步骤全部弄完之后chrome立下在东西就会自动调出uGet了,速度杠杆的!!

4. 安装网易云
首先下载网易云for linux
然后cd到网易云所在的文件夹,在终端输入:

 sudo gdebi netease-cloud-music_1.0.0_amd64_ubuntu16.04.deb

一步搞定
5. 安装搜狗拼音
和网易云安装一样,第一步下载搜狗拼音
然后cd到搜狗拼音所在文件夹,终端输入:

 sudo gdebi sogoupinyin_2.1.0.0082_amd64.deb

6. 配置caffe
大头来了,我也是综合了很多篇博客才弄懂安装过程,建议以官方文档为主,辅以大神们的博客,这样收获会很大。
官方文档:

OpenCV 3.1 Installation Guide on Ubuntu 16.04
Ubuntu 16.04 or 15.10 Installation Guide
大神博客:
Nvidia显卡驱动、cudnn我参考的:
安装英伟达显卡驱动
安装cuda我参考的:
深度学习主机环境配置: Ubuntu16.04+Nvidia GTX 1080+CUDA8.0
安装OpenCV我参考的:
官方文档
caffe的安装我参考了:
官方文档
ubuntu16.04安装caffe以及各种问题汇总
ubuntu16.04安装caffe以及各种问题汇总这篇博客基本是官方文档的中文翻译,如果想直接安装看不懂英文可以直接按照博客的步骤安装。
python接口的配置推荐这个大神的博客:
Caffe学习系列(13):数据可视化环境(python接口)配置
需要注意的地方:
1.建议输入命令时都使用root权限,这样会减少很多错误。
2.Opencv不要上官网下载,官方版本不兼容cuda8.0
3.我碰到过的一个错误:

CMakeFiles/Makefile2:4336: recipe for target
‘modules/cudafilters/CMakeFiles/opencv_cudafilters.dir/all’ failed
make[1]: * [modules/cudafilters/CMakeFiles/opencv_cudafilters.dir/all]
Error 2
Makefile:160: recipe for target ‘all’ failed
make: * [all] Error 2
解决方法:
http://answers.opencv.org/question/100907/not-able-to-install-opencv31-in-ubuntu1604-cuda-80/

 cmake -D CUDA_ARCH_BIN=3.5 -D CUDA_ARCH_PTX=3.5 CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON -D BUILD_TIFF=ON -D WITH_QT=ON -D WITH_OPENGL=ON ENABLE_FAST_MATH=1 -D CUDA_FAST_MATH=1 -D WITH_CUBLAS=1 INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON -D CUDA_GENERATION=Kepler -D CUDA_NVCC_FLAGS="-D_FORCE_INLINES" ..
安装caffe所需的文件传到我的网盘里(opencv3.1,cuda8.0,cudnn5.1,caffe)。共享资料,方便你我他~
直接贴代码:
1.nvidia 960M
sudo add-apt-repository ppa:graphics-drivers/ppasudo apt-get updatesudo apt-get install nvidia-375sudo apt-get install mesa-common-devsudo apt-get install freeglut3-dev
nvidia-smi#出现GPU列表即安装成功
2.cuda&cudnn
一定要下载run,deb包无数坑
sudo sh cuda_8.0.27_linux.run  --tmpdir=/opt/temp/
出现下面错误时要加上--tmpdir=/opt/temp/,否则可以管理员权限直接运行run文件

Not enough space on parition mounted at /. Need 5091561472 bytes.

Disk space check has failed. Installation cannot continue.
安装时遇到这个:
Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 361.62?
一定要是“n”,其他默认即可。

sudo gedit ~/.bashrc
在文件最后加上:
export PATH=/usr/local/cuda-8.0/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
sudo gedit /etc/profile
export PATH=/usr/local/cuda/bin:$PATH
sudo gedit /etc/ld.so.conf.d/cuda.conf
/usr/local/cuda/lib64
sudo ldconfig

cuda配置好了
测试cuda

cd /usr/local/cuda-8.0/samples/1_Utilities/deviceQuery
make
sudo ./deviceQuery

cd到cudnn所在文件夹后

tar zxvf cudnn-8.0-linux-x64-v5.1.tgz

cd进入解压文件夹下的include目录

sudo cp cudnn.h /usr/local/cuda/include/ 

cd进入加压文件下的lib64目录

sudo cp lib* /usr/local/cuda/lib64/
cd /usr/local/cuda/lib64/
sudo rm -rf libcudnn.so libcudnn.so.5
sudo ln -s libcudnn.so.5.1.5 libcudnn.so.5
sudo ln -s libcudnn.so.5 libcudnn.so 

cudnn配置好了

sudo apt-get install --assume-yes build-essential cmake git
sudo apt-get install --assume-yes build-essential pkg-config unzip ffmpeg qtbase5-dev python-dev python3-dev python-numpy python3-numpy
sudo apt-get install --assume-yes libopencv-dev libgtk-3-dev libdc1394-22 libdc1394-22-dev libjpeg-dev libpng12-dev libtiff5-dev libjasper-dev
sudo apt-get install --assume-yes libavcodec-dev libavformat-dev libswscale-dev libxine2-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev
sudo apt-get install --assume-yes libv4l-dev libtbb-dev libfaac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev
sudo apt-get install --assume-yes libvorbis-dev libxvidcore-dev v4l-utils
解压opencv,cd到opencv的文件夹下。
mkdir build
cd build/
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D WITH_V4L=ON -D WITH_QT=ON -D WITH_OPENGL=ON -D WITH_CUBLAS=ON -DCUDA_NVCC_FLAGS="-D_FORCE_INLINES" ..
make -j $(($(nproc) + 1))
sudo make install
sudo /bin/bash -c 'echo "/usr/local/lib" > /etc/ld.so.conf.d/opencv.conf'
sudo ldconfig
sudo apt-get update
sudo apt-get install checkinstall
sudo checkinstall
opencv配置好了
sudo apt-get updatesudo apt-get upgradesudo apt-get install -y build-essential cmake git pkg-configsudo apt-get install -y libprotobuf-dev libleveldb-dev libsnappy-dev libhdf5-serial-dev protobuf-compilersudo apt-get install -y libatlas-base-dev sudo apt-get install -y --no-install-recommends libboost-all-devsudo apt-get install -y libgflags-dev libgoogle-glog-dev liblmdb-devsudo apt-get install -y python-pip# (Python general)sudo apt-get install -y python-dev
sudo apt-get install -y python-numpy python-scipy# (Python 2.7 development files)sudo apt-get install -y python3-dev
sudo apt-get install -y python3-numpy python3-scipy# (or, Python 3.5 development files)sudo apt-get install -y libopencv-dev# (OpenCV 2.4)(or, OpenCV 3.1 - see the instructions below)```下载caffe

cd caffe //打开到刚刚git下来的caffe
cp Makefile.config.example Makefile.config //将Makefile.config.example的内容复制到Makefile.config
//因为make指令只能make Makefile.config文件,而Makefile.config.example是caffe给出的makefile例子
gedit Makefile.config //打开Makefile.config文件

修改makefile.config(最终版)如下:

Refer to http://caffe.berkeleyvision.org/installation.html

Contributions simplifying and improving our build system are welcome!

cuDNN acceleration switch (uncomment to build with cuDNN).

USE_CUDNN := 1

CPU-only switch (uncomment to build without GPU support).

CPU_ONLY := 1

uncomment to disable IO dependencies and corresponding data layers

USE_OPENCV := 0

USE_LEVELDB := 0

USE_LMDB := 0

uncomment to allow MDB_NOLOCK when reading LMDB files (only if necessary)

You should not set this flag if you will be reading LMDBs with any

possibility of simultaneous read and write

ALLOW_LMDB_NOLOCK := 1

Uncomment if you’re using OpenCV 3

OPENCV_VERSION := 3

To customize your choice of compiler, uncomment and set the following.

N.B. the default for Linux is g++ and the default for OSX is clang++

CUSTOM_CXX := g++

CUDA directory contains bin/ and lib/ directories that we need.

CUDA_DIR := /usr/local/cuda

On Ubuntu 14.04, if cuda tools are installed via

“sudo apt-get install nvidia-cuda-toolkit” then use this instead:

CUDA_DIR := /usr

CUDA architecture setting: going with all of them.

For CUDA < 6.0, comment the *_50 through *_61 lines for compatibility.

For CUDA < 8.0, comment the *_60 and *_61 lines for compatibility.

CUDA_ARCH := -gencode arch=compute_20,code=sm_20 \
-gencode arch=compute_20,code=sm_21 \
-gencode arch=compute_30,code=sm_30 \
-gencode arch=compute_35,code=sm_35 \
-gencode arch=compute_50,code=sm_50 \
-gencode arch=compute_52,code=sm_52 \
-gencode arch=compute_60,code=sm_60 \
-gencode arch=compute_61,code=sm_61 \
-gencode arch=compute_61,code=compute_61

BLAS choice:

atlas for ATLAS (default)

mkl for MKL

open for OpenBlas

BLAS := atlas

Custom (MKL/ATLAS/OpenBLAS) include and lib directories.

Leave commented to accept the defaults for your choice of BLAS

(which should work)!

BLAS_INCLUDE := /path/to/your/blas

BLAS_LIB := /path/to/your/blas

Homebrew puts openblas in a directory that is not on the standard search path

BLAS_INCLUDE := $(shell brew –prefix openblas)/include

BLAS_LIB := $(shell brew –prefix openblas)/lib

This is required only if you will compile the matlab interface.

MATLAB directory should contain the mex binary in /bin.

MATLAB_DIR := /usr/local

MATLAB_DIR := /Applications/MATLAB_R2012b.app

NOTE: this is required only if you will compile the python interface.

We need to be able to find Python.h and numpy/arrayobject.h.

PYTHON_INCLUDE := /usr/include/python2.7 \

    /usr/lib/python2.7/dist-packages/numpy/core/include

Anaconda Python distribution is quite popular. Include path:

Verify anaconda location, sometimes it’s in root.

ANACONDA_HOME := (HOME)/anacondaPYTHONINCLUDE:=(ANACONDA_HOME)/include \
# (ANACONDA_HOME)/include/python2.7 \  
        #(ANACONDA_HOME)/lib/python2.7/site-packages/numpy/core/include

Uncomment to use Python 3 (default is Python 2)

PYTHON_LIBRARIES := boost_python3 python3.5m

PYTHON_INCLUDE := /usr/include/python3.5m \

/usr/lib/python3.5/dist-packages/numpy/core/include

We need to be able to find libpythonX.X.so or .dylib.

PYTHON_LIB := /usr/lib

PYTHON_LIB := $(ANACONDA_HOME)/lib

Homebrew installs numpy in a non standard path (keg only)

PYTHON_INCLUDE += (dir(shell python -c ‘import numpy.core; print(numpy.core.file)’))/include

PYTHON_LIB += $(shell brew –prefix numpy)/lib

Uncomment to support layers written in Python (will link against Python libs)

WITH_PYTHON_LAYER := 1

Whatever else you find you need goes here.

INCLUDE_DIRS := (PYTHONINCLUDE)/usr/local/include/usr/include/hdf5/serialLIBRARYDIRS:=(PYTHON_LIB) /usr/local/lib /usr/lib /usr/lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/hdf5/serial

If Homebrew is installed at a non standard location (for example your home directory) and you use it for general dependencies

INCLUDE_DIRS += $(shell brew –prefix)/include

LIBRARY_DIRS += $(shell brew –prefix)/lib

NCCL acceleration switch (uncomment to build with NCCL)

https://github.com/NVIDIA/nccl (last tested version: v1.2.3-1+cuda8.0)

USE_NCCL := 1

Uncomment to use pkg-config to specify OpenCV library paths.

(Usually not necessary – OpenCV libraries are normally installed in one of the above $LIBRARY_DIRS.)

USE_PKG_CONFIG := 1

N.B. both build and distribute dirs are cleared on make clean

BUILD_DIR := build
DISTRIBUTE_DIR := distribute

Uncomment for debugging. Does not work on OSX due to https://github.com/BVLC/caffe/issues/171

DEBUG := 1

The ID of the GPU that ‘make runtest’ will use to run unit tests.

TEST_GPUID := 0

enable pretty build (comment to see full commands)

Q ?= @

find . -type f -exec sed -i -e ‘s^”hdf5.h”^”hdf5/serial/hdf5.h”^g’ -e ‘s^”hdf5_hl.h”^”hdf5/serial/hdf5_hl.h”^g’ ‘{}’ \;
cd /usr/lib/x86_64-linux-gnu
sudo ln -s libhdf5_serial.so.10.1.0 libhdf5.so
sudo ln -s libhdf5_serial_hl.so.10.0.2 libhdf5_hl.so
cd python
for req in (catrequirements.txt);dopipinstallreq; done
for req in (catrequirements.txt);dosudo−Hpipinstallreq –upgrade; done
cd ..#caffe文件夹下
make all -j8
make test -j8
make runtest -j8
make pycaffe
make distribute

    如果没错就是caffe配置好了,接下来是python接口。下载[acnaonda](https://www.continuum.io/downloads)然后:

bash Anaconda2-2.4.1-Linux-x86_64.sh#conda list可以查询已经安装了那些python库,安装命令conda install ×××

sudo gedit ~/.bashrc
export PYTHONPATH=/usr/local/caffe/python:$PYTHONPATH#此处为caffe文件下python文件夹的路径
sudo ldconfig
sudo gedit Makefile.config#修改Makefile.config文件
sudo make pycaffe
sudo make test -j8
sudo make runtest -j8

    测试python接口。

pthon
import caffe

没有错就是ok的。安装jupyter

sudo pip install jupyter
jupyter notebook
“`

转载于:https://www.cnblogs.com/shyanguan/p/6582150.html

ubuntu16.04装机:网易云+搜狗拼音+chrome+uGet+caffe(openCV3.1+CUDA+cuDNN+python)相关推荐

  1. 装机摸鱼日志--ubuntu16.04安装网易云音乐客户端

    之前装的网易云音乐不指定啥原因不能用了,所以打算重新装一个,但是进官网只有deepin15和ubuntu18.04版本的安装包.然后我装了一下18.04的安装包,但是没有成功.甚至因为更换glibc差 ...

  2. ubuntu16.04安装网易云音乐方法出现问题及解决方法(桌面图标打不开、不能输入中文等问题)

    关于Ubuntu系统常用软件安装我建立一个分类,用来记录菜鸟揪心的安装历程... Ubuntu16.04系统安装系列: Ubuntu配置TensorFlow-GPU版本 Ubuntu系统安装搜狗输入法 ...

  3. ubuntu16.04 安装网易云音乐

    最爱的播放器 网易云音乐 哈哈,刚刚折腾了双系统,立马开始了软件安装. 网易云音乐从官网下载对应的 64 位版本,我下载的是 netease-cloud-music_1.0.0_amd64_ubunt ...

  4. ubuntu环境下,ubuntu16.04装机到nvdia显卡驱动安装、cuda8安装、cudnn安装

    首先是安装ubuntu16.04 A.制作u盘启动盘(提前准备好.ios文件): 1.安装u盘制作工具unetbootin sudo apt-get install unetbootin 2.格式化u ...

  5. Ubuntu16.04 装机必备软件

    Ubuntu16.04 装机必备软件 本文主要包含如下内容: Ubuntu1604 装机必备软件 Ubuntu检查更新并安装显卡驱动 更新补丁 卸载无用软件 安装谷歌 Chrome 浏览器 安装Tea ...

  6. ubuntu16.04装机1:安装NVIDIA显卡驱动(下载.run包方式)

    转自:ubuntu16.04安装NVIDIA显卡驱动或者更换高版本显卡驱动详细(下载.run包方式)_zbr794866300的博客-CSDN博客 1 下载显卡驱动 首先你要了解你的显卡类型,例如我是 ...

  7. 完美解决 Ubuntu 18.04 安装网易云音乐 不能正常点击启动问题

    完美解决 Ubuntu 18.04 安装网易云音乐 不能正常点击启动问题 经过我的学习终于学会了,下面附上连接 完美解决

  8. Ubuntu 22.04 无法使用网易云音乐

    Ubuntu 22.04 无法使用网易云音乐 Ubuntu 22.04 无法使用网易云音乐 无法使用的原因 排查该问题的方法 总结 Ubuntu 22.04 无法使用网易云音乐 不关心排查过程和故障原 ...

  9. Ubuntu18.04 安装网易云音乐

    下载并安装网易云 去网易云官网下载对应于ubuntu系统的安装包 安装依赖 dpkg -s libcanberra-gtk-module #检查依赖是否安装 sudo apt install libc ...

最新文章

  1. Java Swing 树状组件JTree的使用方法【图】
  2. 2015.09.06 C++笔记
  3. python游戏-Python游戏
  4. 无穷级数求和7个公式_亿图在线公式编辑器使用方法入门篇
  5. session过期时间控制的一些常用方法
  6. opencv学习笔记3
  7. python书籍推荐:Python数据科学手册
  8. 【kafka】Kafka 2.0 ConsumerGroupCommand新功能
  9. delphi语言转为汇编语言_计算机语言
  10. 2019数据安装勾选_【在发票平台确认签名后,为什么在电子税务局增值税申报表上没有自动显示进项数据?】一张发票的“有效税额”是否可以分两个月抵扣?...
  11. CAD 部分快捷键注释
  12. mbedtls学习4.mbedtls_RAM/ROM优化指南
  13. mysql查询时 全外連接_MySQL数据库左外连接、右外连接、全外连接
  14. ElasticSearch创建索引指定分片和副本
  15. Android音视频基础知识
  16. 自动排版布局-Layout GAN
  17. android splash白屏_解决Splash白屏黑屏问题
  18. 首期寄语 | 阿里游戏云马全治:伟大的改变,从“听说”开始
  19. 聂文涛桑黄子技术走过的文化之路
  20. Android阅读器放大镜

热门文章

  1. python学习第二十八节(进程,线程)
  2. iOS去除导航栏和tabbar的横线
  3. Jsp----注册登陆
  4. 数学与编程:“概率论”总结
  5. kdj超卖_三分钟学会KDJ三大买卖绝技,简单高效,把握最佳买卖点,不懂KDJ的股民值得一看!...
  6. -jar参数运行应用时classpath的设置方法
  7. OVS DPDK--网桥配置(四)
  8. python中loop函数运用_使用涉及函数的Python在for循环中填充DataFrame
  9. oracle自动售票服务器,一种基于Oracle数据库客户端的业务自动处理方法与流程
  10. mysql中序列的使用,在MySQL中使用序列的简单教程