安装过程参考 下面路径
http://blog.csdn.net/darren2015zdc/article/details/53980038
以下内容是杂乱的集合,没有来得及整理。
matlab opencv的安装 暂时缺
初涉深度学习, 安装caffe,一路跌跌撞撞,掉了不少坑,但终于还是实现了,做个纪念吧。 2016年12月11日。
电脑配置:i5 6500, 8G 内存, 显卡GTX1060 6G, 系统:ubuntu 16.04 .
参考:
1. http://blog.csdn.net/v_july_v/article/details/52810219
教你从头到尾利用DQN自动玩flappy bird(全程命令提示,GPU+CPU版)
2. https://www.zybuluo.com/hanxiaoyang/note/364737
http://www.cnblogs.com/clockwork/p/6138356.html
安装caffe过程记录
http://www.cnblogs.com/Anker/p/3209876.html
sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler
sudo apt-get install --no-install-recommends libboost-all-dev
CUDA: Install by apt-get or the NVIDIA .run package.
The NVIDIA package tends to follow more recent library and driver versions, but the installation is more manual. If installing from packages, install the library and latest driver separately; the driver bundled with the library is usually out-of-date. This can be skipped for CPU-only installation.
BLAS: install ATLAS by sudo apt-get install libatlas-base-dev or install OpenBLAS or MKL for better CPU performance.
Python (optional): if you use the default Python you will need to sudo apt-get install the python-devpackage to have the Python headers for building the pycaffe interface.
Compatibility notes, 16.04
CUDA 8 is required on Ubuntu 16.04.
Remaining dependencies, 14.04
Everything is packaged in 14.04.
sudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-dev
sudo apt-get install openblas-dev numpy scipy matplotlib lapack-dev freetype-dev libpng-dev openblas-dev
sudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-dev
apt-get install git
git clone https://github.com/BVLC/caffe.git
wget --no-check-certificate https://bootstrap.pypa.io/ez_setup.py
python ez_setup.py --insecure
wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py
cd caffe/python
执行 for req in $(cat requirements.txt); do pip install $req; done
这步安装也有点慢,别急,等会儿,先去干点别的 ^_^
cd caffe
cp Makefile.config.example Makefile.config
vim Makefile.config
Makefile.config里面有依赖库的路径,及各种编译配置,如果是没有GPU的情况下,可以参照我下面帮你改的配置文件内容:
## 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 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_50,code=compute_50
# BLAS choice:
# atlas for ATLAS (default)
# mkl for MKL
# open for OpenBlas
#BLAS := atlas
BLAS := open
# 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
BLAS_INCLUDE := /usr/include/openblas
# 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)/anaconda
# PYTHON_INCLUDE := $(ANACONDA_HOME)/include \
# $(ANACONDA_HOME)/include/python2.7 \
# $(ANACONDA_HOME)/lib/python2.7/site-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 := $(PYTHON_INCLUDE) /usr/local/include
LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib
# 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
# 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
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 ?= @
make -j4
编译可能会有点慢,你可以先去干点别的事情
make pycaffe -j4
以下操作均使用root账户
apt-get update (更新源)
apt-get install vim (安装VIM,也可使用 emacs nano)
vi /etc/default/grub (进入grub文件)
启用字符界面登录
将这行 GRUB_CMDLINE_LINUX_DEFAULT="quiet" 中的 quiet 修改为 text
GRUB_CMDLINE_LINUX_DEFAULT="text"
保存退出
update-grub2 (更新一下)
reboot (重启)
1、打开终端,先删除旧的驱动:
sudo apt-get purge nvidia*
2禁用自带的 nouveau nvidia驱动 (important!)
创建一个文件通过命令 sudo vim /etc/modprobe.d/blacklist-nouveau.conf
并添加如下内容:
blacklist nouveau
options nouveau modeset=0
再更新一下
sudo update-initramfs -u
修改后需要重启系统。确认下Nouveau是已经被你干掉,使用命令: lsmod | grep nouveau3重启系统至init 3(文本模式),也可先进入图形桌面再运行init 3进入文本模式,再安装下载的驱动就无问题,
首先我们需要结束x-window的服务,否则驱动将无法正常安装
关闭
X-Window
,很简单:sudo service lightdm stop
,然后切换到tty1控制台:Ctrl+Alt+F1
即可
4接下来就是最关键的一步了:sudo ./NVIDIA.run
开始安装,安装过程比较快,根据提示选择即可
最后安装完毕后,重新启动X-Window
:sudo service lightdm start
,然后Ctrl+Alt+F7
进入图形界面;
如果安装后驱动程序工作不正常,使用下面的命令进行卸载:
sudo sh ~/NVIDIA-Linux-x86_64-367.44.run --uninstall
5
nvidia-smi
nvidia-settings
转自:http://blog.csdn.net/blueheart20/article/details/51901867 Ubuntu 16.04下安装sogou 拼音输入法的错误问题
sogoupinyin : Depends: libopencc2 but it is not installable or
libopencc1 but it is not going to be installed
Depends: fcitx-libs (>= 4.2.7) but it is not going to be installed
Depends: fcitx-libs-qt (>= 4.2.7) but it is not going to be installed
Recommends: fonts-droid-fallback but it is not going to be installed or
fonts-droid but it is not installable
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
大部分的 linux 的安装命令出现这个问题提示
sudo apt remove sogoupinyin
然后,可以正常使用其他安装命令。
参考:
1. http://blog.csdn.net/v_july_v/article/details/52810219
教你从头到尾利用DQN自动玩flappy bird(全程命令提示,GPU+CPU版)
http://blog.csdn.net/blueheart20/article/details/51901867