编辑器
1 emacs
sudo apt install emacs
2 安装Visual Studio code
微软官网下载,到下载目录下:
sudo dpkg -i code_1.8.1-1482158209_amd64.deb
编译器
1 C/C++编译器
GCC没有则安装
IDE
1 CLion
下载CLion的压缩包,解压到你想要安装的地方,进入bin,执行
./clion.sh
更换软件源
中国官方源
deb http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
##测试版源
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-proposed main restricted universe multiverse
# 源码
deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
##测试版源
deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-proposed main restricted universe multiverse
更新
sudo apt update
sudo apt upgrade
安装Qt
下载qt-opensource-linux-x64-5.6.2.run,双击运行安装。
安装cmake
sudo apt install cmake
安装OpenCV
由于OpenCV是计算机视觉库,总需要加载一些图像文件( JPEG,PNG,TIFF)。使用下面命令安装一些必要的图像库:
sudo apt-get install libjpeg8-dev libtiff5-dev libjasper-dev libpng12-dev
除了图片之外,OpenCV还要处理视频文件。使用下面命令安装一些视频编解码库:
sudo apt install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev
sudo apt install libxvidcore-dev libx264-dev
OpenCV的GUI模块highgui依赖Gtk。安装gtk库:
sudo apt install libgtk2.0-dev
下载opencv压缩包,解压到想要安装的目录,进入opencv解压文件夹
mkdir build
cd build
cmake ..
// 这里如果提示有些必要的依赖没有安装,逐个安装
make
sudo make install
NVIDIA显卡驱动
添加源
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
安装,先查看有哪些版本,选择一个
sudo apt install nvidia-375
CUDA 8安装
去官网现在cuda8的*.run文件,到下载目录下:
sudo sh ./cuda_8.0.44_linux.run
*.run文件中的显卡驱动较老,上面安装了新的,这里就不安装了,n
accept/decline/quit: accept
Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 367.48? (y)es/(n)o/(q)uit: n Install the CUDA 8.0 Toolkit? (y)es/(n)o/(q)uit: y Enter Toolkit Location [ default is /usr/local/cuda-8.0 ]: Do you want to install a symbolic link at /usr/local/cuda? (y)es/(n)o/(q)uit: y Install the CUDA 8.0 Samples? (y)es/(n)o/(q)uit: y Enter CUDA Samples Location [ default is /home/ice ]:
环境变量
PATH=/usr/local/cuda/bin:$PATH
export PATH
LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
测试
nvidia-smi
结果
Mon Jan 2 02:36:19 2017 +-----------------------------------------------------------------------------+
| NVIDIA-SMI 375.26 Driver Version: 375.26 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX 960M Off | 0000:01:00.0 Off | N/A |
| N/A 53C P8 N/A / N/A | 156MiB / 2002MiB | 3% Default | +-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 1188 G /usr/lib/xorg/Xorg 121MiB |
| 0 1999 G compiz 34MiB | +-----------------------------------------------------------------------------+
@H_170_301@Caffe
按照官网的步骤安装,使用cmake安装比较方便,cmake ..执行后,没有找到的包,安装完
-- Boost version: 1.58.0 -- Found the following Boost libraries: -- system -- thread -- filesystem -- chrono -- date_time -- atomic -- Found gflags (include: /usr/include,library: /usr/lib/x86_64-linux-gnu/libgflags.so) -- Found glog (include: /usr/include,library: /usr/lib/x86_64-linux-gnu/libglog.so) -- Found PROTOBUF Compiler: /usr/bin/protoc -- Found lmdb (include: /usr/include,library: /usr/lib/x86_64-linux-gnu/liblmdb.so) -- Found LevelDB (include: /usr/include,library: /usr/lib/x86_64-linux-gnu/libleveldb.so) -- Found Snappy (include: /usr/include,library: /usr/lib/x86_64-linux-gnu/libsnappy.so) -- CUDA detected: 8.0 -- Found cuDNN: ver. 5.1.5 found (include: /usr/local/cuda/include,library: /usr/local/cuda/lib64/libcudnn.so) -- Added CUDA NVCC flags for: sm_50 -- OpenCV found (/usr/local/share/OpenCV) -- Found Atlas (include: /usr/include,library: /usr/lib/libatlas.so) -- NumPy ver. 1.11.0 found (include: /usr/lib/python2.7/dist-packages/numpy/core/include) -- Boost version: 1.58.0 -- Found the following Boost libraries: -- python -- Found Doxygen: /usr/bin/doxygen (found version "1.8.11") -- Detected Doxygen OUTPUT_DIRECTORY: ./doxygen/ -- -- ******************* Caffe Configuration Summary ******************* -- General: -- Version : 1.0.0-rc3 -- Git : rc3-307-gf731bc4 -- System : Linux -- C++ compiler : /usr/bin/c++ -- Release CXX flags : -O3 -DNDEBUG -fPIC -Wall -Wno-sign-compare -Wno-uninitialized -- Debug CXX flags : -g -fPIC -Wall -Wno-sign-compare -Wno-uninitialized -- Build type : Release -- -- BUILD_SHARED_LIBS : ON -- BUILD_python : ON -- BUILD_matlab : OFF -- BUILD_docs : ON -- cpu_ONLY : OFF -- USE_OPENCV : ON -- USE_LEVELDB : ON -- USE_LMDB : ON -- ALLOW_LMDB_NOLOCK : OFF -- -- Dependencies: -- BLAS : Yes (Atlas) -- Boost : Yes (ver. 1.58) -- glog : Yes -- gflags : Yes -- protobuf : Yes (ver. 2.6.1) -- lmdb : Yes (ver. 0.9.17) -- LevelDB : Yes (ver. 1.18) -- Snappy : Yes (ver. 1.1.3) -- OpenCV : Yes (ver. 2.4.13) -- CUDA : Yes (ver. 8.0) -- -- NVIDIA CUDA: -- Target GPU(s) : Auto -- GPU arch(s) : sm_50 -- cuDNN : Yes (ver. 5.1.5) -- -- Python: -- Interpreter : /usr/bin/python2.7 (ver. 2.7.12) -- Libraries : /usr/lib/x86_64-linux-gnu/libpython2.7.so (ver 2.7.12) -- NumPy : /usr/lib/python2.7/dist-packages/numpy/core/include (ver 1.11.0) -- -- Documentaion: -- Doxygen : /usr/bin/doxygen (1.8.11) -- config_file : /home/ice/caffe/.Doxyfile -- -- Install: -- Install path : /home/ice/caffe/build/install -- -- Configuring done -- Generating done -- Build files have been written to: /home/ice/caffe/build
安装显卡的各种教程真是坑爹,直到装成功caffe用了一天多….
安装汇编器nasm
sudo apt install nasm
安装虚拟机
sudo apt install virtualBox
sudo apt install bochs