網頁

2021年2月7日 星期日

Install Windows 10 + python 3.8.5 + CUDA 11.1 + cuDNN 8.1.0 + TensorFlow 2.4.1

1. Create python 3.8.5 Environment

2. Update Nvidia graphic driver version to 461.40

https://www.nvidia.com/download/index.aspx?lang=en-us

3. Download and Install CUDA 11.1 for Windows 10

https://developer.nvidia.com/cuda-toolkit-archive

4. Download and unzip cuDNN 8.1.0

https://developer.nvidia.com/rdp/cudnn-download#a-collapse805-110

Copy bin, include, lib three folders under cuda unzip folder to 

C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.1

Copy bin folder under cuda unzip folder to 

<anaconda_install_path>\Anaconda3\envs\<env_name>\Library

Add :

C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.1\lib\x64

to [Path] System Environment variable

5. Install cudatoolkit 11.0.221
    conda install cudatoolkit

6. Install TensorFlow 2.4.1  (This version include TensorFlow-GPU and Keras)
    pip install --upgrade tensorflow

7. Verify TensorFlow 
    from tensorflow.python.client import device_lib
    
    print(device_lib.list_local_devices())

8. Verify Keras (tensorflow.keras)
     
    import keras ==> import tensorflow.keras