Bottoms windows10 environment ubuntu dual system, the graphics driver installed, configured CUDA, cudnn environment

1. Make a U-disk system ubuntu
1.1, ubuntu download mirror: http://mirrors.163.com/ubuntu-releases/ version download the required
1.2, unzip the downloaded image to ubuntu u disk, making good on ubuntu U disk system.

2. win10 comes with disk splitter, split a portion of memory to use ubuntu
2.1, right 'My Computer' -> 'Management' -> 'Disk Management'
Bottoms windows10 environment ubuntu dual system, the graphics driver installed, configured CUDA, cudnn environment
if you want to install ubuntu in F disk, right-disk F -> 'compact disc', ubuntu desired selection.

3. Install ubuntu
to u disk into the computer, restart the computer, enter the bios, select u disk boot, select install ubuntu, began to install ubuntu. The installation process takes note, select ubuntu coexist with win10, and then he will be automatically installed in the compression we have just come out of the space.

4. The graphics driver installation
4.1, download drivers: https://www.nvidia.cn/Download/index.aspx?lang=cn select the appropriate graphics driver.
4.2, uninstall other graphics card drivers: sudo APT-GET the Remove -purge NVIDIA *
4.3, disable the nouveau:
sudo gedit /etc/modprobe.d/blacklist.conf
added at the end of the text:
blacklist nouveau
the Option nouveau modeset = 0

运行:sudo update-initramfs -u
重启电脑
运行:lsmod | grep nouveau //如果没有输出,则说明禁用nouveau成功了。
4.4、安装驱动
将我们下载好的驱动放到一个没有中文路径的目录下(因为等一下我们没办法输入中文),例如/home
运行:sudo service lightdm stop //关闭图形界面
cd /home
sudo sh ./<驱动文件名> //一直按enter即可。
reboot //重启电脑就安装完成了

5、安装CUDA
5.1、下载CUDA
https://developer.nvidia.com/cuda-90-download-archive
选择适合自己环境的版本。
sudo sh ./<cuda文件名>
5.2、安装时的选项选择:
Bottoms windows10 environment ubuntu dual system, the graphics driver installed, configured CUDA, cudnn environment
5.3、修改环境变量:
sudo vim ~/.bashrc
在文末尾添加:
export CUDA_HOME=/usr/local/cuda
export LD_LIBRARY_PATH=${CUDA_HOME}/lib64
export PATH=${CUDA_HOME}/bin:${PATH}
退出来,运行:source ~/.bashrc //使得环境变量生效

CUDA running nvcc -V // test whether the installation was successful: if the display follows the successful:
the nvcc: the NVIDIA (R & lt) Cuda Compiler Driver
Copyright (C) 2005-2018 the NVIDIA Corporation
Built ON Sat_Aug_25_21: 08: 01_CDT_2018
Cuda Compilation Tools, Release 9.0, V9.0.130

6, cudnn installation:
https://developer.nvidia.com/rdp/cudnn-download // need to register, then log in to download
download the version corresponding cudnn cuda
After downloading cudnn archive, unpack cuda folder.
CP CUDA the sudo / the lib64 / / usr / local / CUDA / the lib64 /
the sudo CUDA CP / the include /
/ usr / local / CUDA / the include /

Guess you like

Origin blog.51cto.com/14314236/2436531