Installation cuda9.0

https://www.cnblogs.com/iloveblog/p/7683349.html



Uninstall cuda toolkit

sudo /usr/local/cuda-8.0/bin/uninstall_cuda_8.0.pl

Uninstall the nvidia driver

sudo /usr/bin/nvidia-uninstall

Unlock Folder

sudo chmod 777 /home/a204/cuda 

Installation CUDA9.0

cd Downloads

sudo sh cuda_9.0.176_384.81_linux.run

Configuration environment variable, run the following command to open the profile file

sudo gedit  /etc/profile

After opening the file is added at the end of the file path, which is the installation directory, the command is as follows:

export  PATH=/usr/local/cuda-9.0/bin:$PATH

export  LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64$LD_LIBRARY_PATH

Save, and then restart the computer

sudo reboot

Samples tested example of CUDA

cd  /usr/local/cuda-9.0/samples/1_Utilities/deviceQuery

sudo make

./deviceQuery

If you see information about the GPU, the installation was successful.

Installation anaconda

cd Downloads

bash Anaconda2-4.4.0-Linux-x86_64.sh

Problem solving conda list

To the root directory, input

sudo gedit ~/.bashrc

Add the path: export PATH = "/ home / a204 / anaconda3 / bin: $ PATH"

If, after you type python in this step shows the default version or, it means .bashrc update has not yet entered into force, the command line, type:

source ~/.bashrc



When you install GPU version tensorflow, the system will default to install the latest cudatoolkit and cudnn, but it is possible and cuda our installation, cudnn do not match, so first install the appropriate version of cudatoolkit and cudnn, then install tensorflow-GPU, so that the system searches related libraries, if already installed cudatoolkit and cudnn, will not repeat the installation of



Talk about these two days into the pit: First I ran neural network, low version TensorFlow not use leaky Relu, can not endure, then upgrade TensorFlow, good, big computer explode. And then found TensorFlow-gpu == 1.11.0 to match python3.6, cuda9.0, cudnn7.3 above, then view larger computer configuration, cool. Then think of downgrading the library, domestic mirror source can be used not, well, for the initial mirror source, mom eggs, slow and unstable, broken countless times, countless times interrupted me ice-breaking operations in the next. Then I slowly try, finally, found a mirror image of USTC source can also be used, really my good father ah. You can then change the library, and then found, anaconda can not help library, I have to cry. Well, reloading anaconda3, so I'm just reinstall cuda and cudnn it. Began to wear, what to disable found online that drive, I was really miserable pit, obviously do not need to disable, obviously I cuda installed, I thought I was not installed, etc. So the brothers help brothers said to have been installed, so help me to cudnn installed, thanks to the brothers. Then I began to reload anaconda, then not added to the path, so he do for a long time. Then finally began to install TensorFlow, so I found the system also automatically help me install cudatoolkit9.3, cudnn7.4, I think, also helped me to update to the latest version of reality, then I cried, disgraceful, obviously I cuda9 installed. 0, you help me with the new system a wool ah. I thought you're done, run the program, only to find cuda and TensorFlow version not right, then asked the brothers, brothers Baidu, anyway, is that the system automatically cudatoolkit with the new version does not, well, then uninstall them, I think they can, only to find, TensorFlow also been uninstalled, your grandmother a leg ah, I uninstalled a cudatoolkit, what is your relationship with TensorFlow, I installed a TensorFlow, cudatoolkit have anything to do with you, have joint relations. So really it is pissed off. Got 10 pm, I did the whole weekend, crying. Only dormitory next morning, come here, I see the data that the system will detect TensorFlow dependent libraries, if not, download the latest version, if there is, on the matter, I think, that I have downloaded and good cudatoolkit cudnn, and then install it today TensorFlow, it will not be in a tube cudatoolkit and cudnn, solvable, then installed TensorFlow, it really does not show the console installed cudatoolkit and cudnn, good, installed after the TensorFlow, I'm scared to open pycharm, run the program, appeared familiar digital console, started training! ! ! OMG, I have to cry. Research is not easy, the programmer is not easy, and the environment all day long fight, the mood with a roller coaster. Ha ha ha ha! ! !


Engage in scientific research, to engage in the program is really temper mill. To summarize: a careful analysis of the problem, help blog, or to calm down. Repeat this process still does not work, first

Reproduced in: https: //www.jianshu.com/p/0dff9c8f9817

Guess you like

Origin blog.csdn.net/weixin_34347651/article/details/91234651