Deep learning environment construction (GPU) CUDA installation (full version)

I was watching deep learning a few days ago. Because I don't know much about deep learning, I have taken many detours when configuring the environment, and I am always cautious. Now I will give a complete introduction to the construction of the deep learning environment, so that everyone can follow this step to complete the configuration of the system environment. Let's get started now!

1. Query computer hardware

  • Requirements: The computer must have an NVIDIA discrete graphics card

How to check the graphics card model of the computer?
1. On the desktop of the computer, right-click "this computer" and click "Properties"
2. In the opening interface, select "Device Manager"
3. In the "Device Manager" interface, click "Display Adapter", the graphics card model Will be displayed.
Generally, those starting with Intel are integrated graphics cards,
and those starting with AMD and NVIDIA are discrete graphics cards.
4. If you need to view the detailed information of the graphics card, right-click the graphics card and select "Properties". If the
text is not easy to understand, there is a portal for graphic tutorials: https://jingyan.baidu.com/article/4b07be3c90026f48b380f399.html

2. Environment construction and software installation

let's start! ! ! ! juvenile

1. Install CUDA computing platform software

1. Check the version supported by CUDA on the computer
https://jingyan.baidu.com/article/6fb756ec4fabc4241858fbf7.html
2. Download the CUDA installation package.
Here is the latest version of CUDA 10.2 as an example. Users of other versions follow the tutorial to find the corresponding version to download.
First, open the CUDA toolkit download website under the NVIDIA developer website. (If you feel that downloading from the website is more troublesome, you can go to the end of this content, and you can download the CUDA 10.2 package directly from the network disk, and prepare it for everyone)
https://developer.nvidia.com/cuda-toolkit The
website interface is as shown below
Insert picture description here
Click DownLoad CUDA 10.2 NOW> shown in the red box in the
figure above, and the web page shown in the figure below will be displayed.
Insert picture description here
Click the Windows button shown in the red box in the above figure to select the windows installation package
and the web page shown in the figure below will be displayed.
Insert picture description here
①The blue box represents the installation package under Win10; ②The red box represents the installation package under Win8; ③The orange box represents the installation package under Win7
. You can choose according to your needs. Next, take win10 as an example.
Click the button in the blue frame to
display the web page as shown in the figure below.
Insert picture description here
Click the exe [local] button in the red box to download and install the installation package. After that, the web page shown below is displayed. Left mouse click on the red box Download[2.6GB]

Insert picture description here
Button. Perform software download.
Or right-click and click the
Download [2.6GB] button in the red box , and select Thunder download. (This is faster) (provided that the computer has Thunder)

as shown in the picture below
Insert picture description here

Of course, ready-made packages are prepared for everyone to download directly.
Note that it is cuda_10.2

Win10用户安装 **cuda_10.2.89_441.22_win10.exe**
链接:https://pan.baidu.com/s/1953UNfMOig-JJvUOrK58Ig 
提取码:3kz8

Win7用户安装 **cuda_10.2.89_441.22_windows.exe**
链接:https://pan.baidu.com/s/1R-zKji19k7Lrk7i5w3YJ1Q 
提取码:g62d 

3. Install CUDA

Right-click the downloaded cuda_10.2.89_441.22_win10.exe software and run it as an administrator, as shown in the figure below:
Insert picture description here
After that, the window will be displayed.
Insert picture description here
Note : The path in the red box ② is the path to decompress the installation package. After the software is installed, it will Automatically delete.
First click the button in the blue box ① to select the CUDA decompression path, and then click the OK button in the orange box ③ to continue.
After that, the decompression operation will be carried out, as shown in the following figure:
Insert picture description here
During the decompression process, if you install security software such as 360, it will prompt the software to access key locations and select to allow all operations of the software.
After the decompression is complete, the installation software will start automatically, as shown in the figure below: The
Insert picture description here
software will then perform a system compatibility check, as shown in the figure below: After the
Insert picture description here
system compatibility check is passed, the installation program displays the software license agreement. As shown below:
Insert picture description here
Click in the red box and agree to continue, select the option to install the software pops up, as shown below:
Insert picture description here
We first click on the red box ① custom after clicking ② in the blue box next to continue, after the show page:
Insert picture description here
here We only choose CUDA, and do not choose the other two. Then click the next step in the red box to continue.

Let's change the installation location next and install it under the D drive.
The installation paths are:
D:\NVIDIA\CUDA
D:\NVIDIA\CUDA
D:\NVIDIA\CUDA Samples
as shown in the figure below:
Then click the next step in the blue box. **Note: ** Before clicking Next, you must close vs.
Insert picture description here
Then start the installation and wait. As shown below.
Insert picture description here
Insert picture description here
Wait for the installation to complete.
Insert picture description here
Click close.

2. Install cuDNN support package

1. Download the cuDNN support package
Here, take the cuDNN for CUDA 10.2 support package as an example. If the CUDA version is not a 10.2 user, download the corresponding cuDNN package

First, open the cuDNN support package download site under the NVIDIA developer website. (If you feel that downloading from the website is more troublesome, you can go to the end of this content, and you can download the package for CUDA 10.2 directly from the network disk, and prepare it for everyone)
https://developer.nvidia.com/cudnn The
website interface is as follows,
Insert picture description here
click red The Download cuDNN button in the box displays the following page
Insert picture description here
. Users with NVIDIA account click Login in the red box to log in.
Users who do not have an NVIDIA account click Join now in the blue box to register.
We only introduce the login method here. For the registration of the NVIDIA account, please move to: https://jingyan.baidu.com/article/7908e85c3cae87ef491ad24b.html After
clicking Login in the red box , the web page displays as follows:
Insert picture description here
fill in the account name and Password, and then click Login in the red box to display the following webpage:
Insert picture description here
Click the check box pointed by the red arrow to display the following interface.
Insert picture description here
Our CUDA is installed with version 10.2. Here we select for CUDA 10.2 in the red box to display the web page:
Insert picture description here
Because we take the WIN10 system as an example, click the link in the red box to download. For WIN7 users, please click the link in the blue box to download. Similarly, you can refer to the download method of CUDA and use Thunder to download.
Of course, the ready-made for CUDA 10.2 package is ready to download directly for everyone.
Note that it is for CUDA 10.2

Win10用户安装 **cuda_10.2.89_441.22_win10.exe**
链接:https://pan.baidu.com/s/12ZGiFl9Er2-INJOAXQZqPQ 
提取码:7p1k 

Win7用户安装 **cuda_10.2.89_441.22_windows.exe**
链接:https://pan.baidu.com/s/1eUmnYm4-UzdSB7syTqvKDQ 
提取码:m7xc 

2. Install the cuDNN support package①
, unzip the cuDNN support package, and get three folders and a TXT file.
Insert picture description here
② Copy the decompressed file to D:\NVIDIA\CUDA under the installation path .
Note: Unzip it to your own CUDA installation path.
Insert picture description here
After that, it will display whether to merge folders, select ① in the red box to perform operations for all items, and then click ② the Yes button in the blue box.
Insert picture description here
Complete the installation of the cuDNN support package

3. Configure environment variables

1. Set environment variables

Right-click on the computer and open Properties -> Advanced System Settings -> Environment Variables, you can see that there are two more environment variables CUDA_PATH and CUDA_PATH_V8_0 in the system. Next, add the following environment variables to the system:
CUDA_SDK_PATH = C :\ProgramData\NVIDIA Corporation\CUDA Samples\v8.0 (This is the path of the default installation location. After customizing the path, my path is D:\NVIDIA\CUDA Samples)
CUDA_LIB_PATH = %CUDA_PATH%\lib\x64
CUDA_BIN_PATH = %CUDA_PATH%\bin
CUDA_SDK_BIN_PATH = %CUDA_SDK_PATH%\bin\win64
CUDA_SDK_LIB_PATH = %CUDA_SDK_PATH%\common\lib\x64

2. Set system variables


①Add at the end of the system variable PATH: %CUDA_LIB_PATH%;%CUDA_BIN_PATH%;%CUDA_SDK_LIB_PATH%;%CUDA_SDK_BIN_PATH%; ②Add the
following 4 more items
(if you choose the default installation path):
C:\Program Files\NVIDIA GPU Computing Toolkit\ CUDA\v8.0\lib\x64;
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\bin;
C:\ProgramData\NVIDIA Corporation\CUDA Samples\v8.0\common\lib\x64;
C:\ProgramData\NVIDIA Corporation\CUDA Samples\v8.0\bin\win64;
(I need to enter the path I installed on the D drive):
D:\NVIDIA\CUDA\lib\x64;
D:\NVIDIA\CUDA\bin ;
D:\NVIDIA\CUDA Samples\common\lib\x64;
D:\NVIDIA\CUDA Samples\bin\win64;
3. Configuration The
following is the configuration of my environment variable and PATH:
Environment variable:
Insert picture description here
PATH:
Insert picture description here

3. Verify the installation of CUDA and cuDNN

Press the Win key + R key on the keyboard to open the running interface
Insert picture description here
. Enter "cmd" in the run and click OK. Open the command line interface.
Insert picture description here
Enter cd+installation path , click Enter, and then enter nvcc -V to display the CUDA version information.
For example, my installation path is D:\NVIDIA\CUDA
input: cd D:\NVIDIA\CUDA
enter: nvcc -V enter

If information such as the version of CUDA is displayed after running, the installation is considered successful. As shown below
Insert picture description here

  • About the blogger:
  • Industrial automation upper computer software engineer, machine vision algorithm engineer, motion control algorithm engineer. Currently working in the intelligent manufacturing automation industry. Blogger's mailbox: [email protected]
  • In the next period of time, I will continue to update relevant content about Halcon deep learning. Help me like it. Haha.

Guess you like

Origin blog.csdn.net/cashmood/article/details/105081586