更新源
sudo cp /etc/apt/sources.list /etc/apt/sources_init.list
sudo gedit /etc/apt/sources.list
#添加阿里源
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
sudo apt-get update
sudo apt-get -f install
sudo apt-get upgrade
安装teamviewer
sudo dpkg -i teamviewer_12.0.76279_i386.deb
sudo apt-get install -f
修改root密码:sudo passwd su root
安装python依赖包
sudo pip install opencv-python
sudo apt-get install python-pip
安装显卡驱动
sudo apt --purge remove xserver-xorg-video-nouveau
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo ubuntu-drivers autoinstall
安装CUDA、CuDNN和环境配置
sudo apt-get install gcc-4.8
sudo apt-get install g++-4.8
sudo mv gcc gcc.bak
sudo ln -s gcc-4.8 gcc
sudo mv g++ g++.bak
sudo ln -s g++-4.8 g++
gcc -v g++ -v
sudo sh cuda_9.1.85_387.26_linux.run
sudo sh cuda_9.1.85.1_linux.run
sudo sh cuda_9.1.85.2_linux.run
sudo sh cuda_9.1.85.3_linux.run
sudo vim ~/.bashrc
export PATH=/usr/local/cuda-9.1/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-9.1/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
sudo cp cuda/include/cudnn.h /usr/local/cuda/include
sudo cp cuda/lib64/libcudnn* /usr/local/cuda/lib64
sudo chmod a+r /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib64/libcudnn*
安装跑Faster-RCNN要用的依赖包
sudo pip install tensorflow
sudo apt-get install python-matplotlib
sudo apt-get install python-yaml
设置服务器界面不会自动息屏
禁止锁屏:settings-->power-->never