Python3 + Cuda + mounted python + CUDA + CuDNN + TensorFlow on Cudnn + GPU window10

Confirm graphics support cuda

First, make sure the graphics card is NVIDIA NVIDIA, of course, AMD is also supported, but not commonly used;

NVIDIA graphics card GTX Geforce, Quadra and Tesla three series, then to the following website to see if support Cuda

https://developer.nvidia.com/cuda-gpus 

Click on the following link to view the graphics version of each series of support cuda

 

Install the graphics driver

CUDA installation process, you might try a variety, the whole graphics card driver is broken, you can reinstall; [I like this, then life and death is not installed on cuda, then reinstall the driver, get]

In  https://www.nvidia.cn/Download/index.aspx?lang=cn  Get the latest graphics driver version of their own;

Download, double-click the installation;

 

Cuda driver installation

CUDA access the download site: https://developer.nvidia.com/cuda-toolkit , you can see the current latest version of CUDA, you can download the old version of the driver by selecting the following "Legacy Releases" link;

Recommended to choose custom installation, and then just check cuda, it recommended to install in the default file path;

The bin directory under the installation path set an environment variable : C: \ Program Files \ NVIDIA GPU Computing Toolkit \ CUDA \ v9.0 \ bin

 

Installation cudnn library

CuDNN library (The NVIDIA CUDA® Deep Neural Network library ) is CUDA update package for the depth of neural networks, TensorFlow will use it for accelerated NVidia depth study on the GPU. Can be downloaded from here, see: https://developer.nvidia.com/cudnn .

First of all NVidia To register a developer account, it's free. After logging in, you will see a variety of CuDNN download;

cuda and cudnn version must strictly correspond to see the correspondence between  https://developer.nvidia.com/rdp/cudnn-archive

 

The download is a ZIP file contains several folders, each folder contains CuDNN file (a DLL, a header file and a library file). Find your CUDA installation directory, there should be something like this:

C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0

We can see from the table of contents of the ZIP file also in this directory, there is a bin, a include, a lib and so on. Copy the files from ZIP to relevant directories. 

For example, the drag cudnn64_7.dll files to C: \ Program Files \ NVIDIA GPU Computing Toolkit \ CUDA \ v9.0 \ bin directory, and other similar.

 

Installation tensorflow-gpu

First install python3.6

The specific process reference my other blog, the focus here only record

Before I talked python is not recommended to install 64-bit, so I installed the 32, but life and death is not installed on tf, being given as follows

Could not find a version that satisfies the requirement tensorflow-gpu(from versions: )
No matching distribution found for  tensorflow-gpu

Later replaced by 64 , it can be, and I was drunk

 

Then use pip install tensorflow

python3 -m pip install tensorflow-gpu

If the installation is very slow, you can use a mirror domestic source

python3 -m pip install tensorflow-gpu -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com

Including the role of --trusted-host pypi.douban.com is to obtain a certificate of authentication ssl

 

Verify that the installation was successful

import tensorflow as tf
print('GPU', tf.test.is_gpu_available())        # GPU True

Show GPU is available, success;

 

If the CUDA driver has a fault, it may appear cudart64_XX.dll fail, where XX is the version number.

ImportError: Could not find 'cudart64_100.dll'. TensorFlow requires that this DLL be installed in a directory that is named in your %PATH% environment variable. 
Download and install CUDA 10.0 from this URL: https://developer.nvidia.com/cuda-90-download-archive

Follow the prompts to download cuda 10.0, above tf1.13 version requires cuda 10.0 version ;

 

If the CUDA driver correctly, but CuDNN driver has a fault, it may appear to say cudnn64_X.dll missing something, where X is a version number. 

 

 

 

References:

https://blog.csdn.net/hzk594512323/article/details/86082852 Python's pip installation fails ---- Could not find a version that satisfies the requirement xxxx (from versions:)

### The following is a cuda installation tutorial 

https://www.cnblogs.com/touch-skyer/p/8367706.html  mounting window10 python + CUDA + CuDNN + TensorFlow       Main Reference]

https://blog.csdn.net/u014695788/article/details/93246548 python CUDA configuration

https://zhuanlan.zhihu.com/p/29841665 accelerated deep learning with GPU: Windows installation CUDA + TensorFlow tutorial

https://www.360kuai.com/pc/9290487ad261e50da?cota=4&tj_url=so_rec&sign=360_57c3bbd1&refer_scene=so_1 tensorflow version corresponds to the version relationship with cuda cuDNN

Guess you like

Origin www.cnblogs.com/yanshw/p/12068160.html