Ubuntu 18.04.2 deep learning environment deployment cuda 10.2 (a)

Parts List:
the CPU board: x11sdi
Memory: Samsung memory DDR4 2400 32g two
solid: SanDisk SSD 240G
Graphics: NVIDIA tesla M4
Power: Corsair RM1000X
install the system skip, and there are many ways online, you can find one
now and cuda10.2 graphics driver is installed together, so this is a step in the completion of
a mounting cuda10.2
go to the official download: https://developer.nvidia.com/cuda-toolkit-archive cuda10.1 installation and cuda10.2 is the same The environment may to choose, as follows:
Ubuntu 18.04.2 deep learning environment deployment cuda 10.2 (a)
direct replication wget http://developer.download.nvidia.com/compute/cuda/10.2/Prod/local_installers/cuda_10.2.89_440.33.01_linux.run download.
After downloading, do not rush to install the graphics drivers need to disable comes, the need to close the graphical interface, the following command:
sudo APT-GET # Update to update your system
sudo apt-get install -y openssh- server # Server-installed remote SSH
sudo apt-get install vim -y # vim editor installed
disabled nouveau: command is as follows:
the sudo the chmod 666 /etc/modprobe.d/blacklist.conf
/etc/modprobe.d/blacklist.conf Vim
# to the last position following code:
blacklist Nouveau
blacklist LBM-Nouveau
Options Nouveau modeset = 0
Alias Nouveau OFF
Alias Nouveau LBM-OFF
# and save (ESC key, then the shift key +: and then enter wq, carriage return)
in order to ensure disabled completely off, but also directly Nouveau disabled in the kernel:
Ubuntu 18.04.2 deep learning environment deployment cuda 10.2 (a)
command as follows:
echo Options nouveau modeset = 0 | sudo TEE -a /etc/modprobe.d/nouveau-kms.conf
after the completion of the permissions back out the following command:
sudo chmod 644 /etc/modprobe.d/blacklist.conf
after that, try updating the configuration to take effect, the following command:
update-initramfs -u

重启:sudo reboot
重启完成后,我们需要关闭图形界面,如果没有关闭图形界面,开始安装,测试时会报错。
关闭图形界面命令如下:
sudo systemctl stop gdm.service
然后执行:sudo sh cuda_10.2.89_440.33.01_linux.run
等了一会儿报错了:
Ubuntu 18.04.2 deep learning environment deployment cuda 10.2 (a)
gcc版本无法识别.为了减少麻烦,执行如下命令:
sudo apt install build-essential -y #该命令将安装一堆新包,包括gcc,g ++和make

要验证GCC编译器是否已成功安装,请使用gcc --version命令打印GCC版本:
Ubuntu 18.04.2 deep learning environment deployment cuda 10.2 (a)

Then we command before execution:
the sudo SH cuda_10.2.89_440.33.01_linux.run
waited appears as follows:
Ubuntu 18.04.2 deep learning environment deployment cuda 10.2 (a)
Input: accept and transport, appears as follows:
Ubuntu 18.04.2 deep learning environment deployment cuda 10.2 (a)
Use the down key to move the Install, carriage return, wait a period of time as in FIG. :
Ubuntu 18.04.2 deep learning environment deployment cuda 10.2 (a)
Run: nvidia-smi # follows:
Ubuntu 18.04.2 deep learning environment deployment cuda 10.2 (a)
determine the success of the graphics driver installation
Next, the configuration becomes environment variables:
Run: Vim ~ / .bashrc
# add the following code:
Export the PATH = / usr / local / CUDA-10.2 / bin the PATH {$: +: the PATH $ {}}
Export the LD_LIBRARY_PATH = / usr / local / CUDA-10.2 / {the lib64 the LD_LIBRARY_PATH $: +: the LD_LIBRARY_PATH $ {}}
# save and
enter the command: source ~ / .bashrc
restart: sudo reboot
begin testing cuda whether the installation was successful:
the following commands:
cd /usr/local/cuda-10.2/samples/1_Utilities/deviceQuery
sudo the make
./deviceQuery
final results showed the following:
Ubuntu 18.04.2 deep learning environment deployment cuda 10.2 (a)
in some places may be different, as long as the final is result = PASS represents this cuda10.2 installation was successful.

Guess you like

Origin blog.51cto.com/14204744/2464180