“This is the 31st day of my participation in the First Challenge 2022. For details: First Challenge 2022”

  • 🎉 statement: as one of the bloggers in AI field, ❤️ lives up to your time and your ❤️
    • 🍊 deep learning: # Environment building, article reading

    • 🍊 TensorFlow GPU version installation test

    • 📆 Last updated: February 22, 2022

    • 🍊 thumbs up 👍 collect ⭐ comments 📝 are all the bloggers insist on writing, updating high-quality blog post the biggest motivation!

    • 🍊 👋 Follow me 👋, join us to Get more interesting AI, charge 🚀 👋

    To build a GPU version of TensorFlow, the prerequisite is that an NVIDIA graphics card capable of supporting CUDA needs to install its basic support platform CUDA and its machine learning library cuDNN, and then build the corresponding TensorFlow GPU version on this basis


    📔 TensorFlow1.2 to 2.1 CUDA and cuDNN of GPU versions are as follows:


    • 🍊 this table may be relatively old


    📔 Conda source acceleration with Pip


    If you want to do a good job, you must first sharpen your tools. Here are two blog posts worth checking out

    • 🍊 # Linux and Windows setup PIP image source – the most practical machine learning library download acceleration setup

    • 🍊# Anaconda conda switch to domestic source, Windows and Linux configuration method, add tsinghua source —

    • 🍊 You are advised to use conda to create an independent environment, and conda is preferred for software library installation and management

    The advantage of using Conda installation is that key libraries such as CUDatoolkit-11.3.1 and CUDNn-8.2.1.32 will automatically adapt well when executing Conda install tensorflow-GPU ==2.6.0


    📕 The Linux server environment is as follows


    # # server
    
    cat /etc/issue
     
    Ubuntu 16.047. LTS \n \l
    
    
    # # Cuda version
    nvcc -V
    
    Cuda compilation tools, release 10.1, V101.243.
    
    
    # # graphics
    
    NVIDIA GeForce GTX 108011 g Ti single cardCopy the code

    📗 tensorflow-gpu==1.15.0 Installation example


    
    conda create -n tf15 python=3.69.
    
    conda activate tf15
    
    Conda is recommended for tensorflow installation
    conda install tensorflow-gpu==1.15. 0
    
    pip install opencv-python
    
    pip install pillow
    Copy the code

    📘 Checks whether TensorFlow is available


    • 🍊 Shell or CMD window to enter the Python interactive environment
    python
    
    Python 3.69. |Anaconda, Inc.| (default, Jul 30 2019.19:07:31) 
    [GCC 7.3. 0] on linux
    Type "help"."copyright"."credits" or "license" for more information.
    >>> import tensorflow as tf
    >>> print(tf.__version__)
    1.15. 0
    >>> 
    
    Copy the code

    📗 Query the tensorflow version retrieved by Conda


    Conda search TensorFlow Queries the tensorflow version retrieved by Conda

    • The versions of TensorFlow that Conda can retrieve are roughly as follows
    
    conda search tensorflow
    
    # Most items are deleted here
     
    Loading channels: done
    # Name Version Build Channel
    tensorflow                     0.71.          py27_0  anaconda/cloud/conda-forge
    
    tensorflow                     0.8. 0          py34_0  anaconda/cloud/conda-forge
    tensorflow                     0.9. 0          py27_0  anaconda/cloud/conda-forge
    
    tensorflow                    0.10. 0          py27_0  anaconda/cloud/conda-forge
    tensorflow                    0.10. 0          py34_0  anaconda/cloud/conda-forge
    
    tensorflow                     1.0. 0          py27_0  anaconda/cloud/conda-forge
    
    tensorflow                     1.01.     np112py27_0  anaconda/pkgs/free  
    tensorflow                     1.1. 0     np111py27_0  anaconda/pkgs/free  
    tensorflow                     1.1. 0     np111py35_0  anaconda/pkgs/free  
    tensorflow                     1.2. 0          py27_0  anaconda/cloud/conda-forge
    tensorflow                     1.21.          py36_0  anaconda/cloud/conda-forge
    tensorflow                     1.21.          py36_0  anaconda/pkgs/free  
    tensorflow                     1.3. 0               0  anaconda/pkgs/free  
    tensorflow                     1.3. 0          py36_0  anaconda/cloud/conda-forge
    tensorflow                     1.4. 0          py27_0  anaconda/cloud/conda-forge
    tensorflow                     1.41.               0  anaconda/pkgs/main  
    tensorflow                     1.41.               0  pkgs/main           
    tensorflow                     1.5. 0               0  anaconda/pkgs/main  
    
    tensorflow                     1.5. 0          py36_0  anaconda/cloud/conda-forge
    tensorflow                     1.51.          py27_0  anaconda/cloud/conda-forge
    
    tensorflow                     1.6. 0               0  anaconda/pkgs/main  
    
    tensorflow                     1.7. 0               0  anaconda/pkgs/main  
           
    tensorflow                     1.8. 0               0  anaconda/pkgs/main  
    
    tensorflow                     1.9. 0 eigen_py27hf386fcc_1  anaconda/pkgs/main  
         
    tensorflow                     1.9. 0 gpu_py36h02c5d5e_1  anaconda/pkgs/main  
    
    tensorflow                    1.10. 0 eigen_py27ha0ab958_0  anaconda/pkgs/main  
    
    
    tensorflow                    1.10. 0          py36_0  anaconda/cloud/conda-forge
    tensorflow                    1.11. 0 eigen_py27h06aee4b_0  anaconda/pkgs/main  
    tensorflow                    1.11. 0 eigen_py27h06aee4b_0  pkgs/main           
      
    tensorflow                    1.12. 0 eigen_py36hbd5f568_0  anaconda/pkgs/main  
      
    tensorflow                    1.131. eigen_py27h5e92bea_0  anaconda/pkgs/main  
    
    tensorflow                    1.131.  py37h90a7d86_1  anaconda/cloud/conda-forge
    tensorflow                    1.132.      h76b4ce7_0  anaconda/cloud/conda-forge
    tensorflow                    1.14. 0 eigen_py27h99c1539_0  anaconda/pkgs/main  
         
    tensorflow                    1.14. 0 gpu_py27he9627f8_0  anaconda/pkgs/main  
    
    tensorflow                    1.14. 0 mkl_py37h45c423b_0  pkgs/main           
    tensorflow                    1.15. 0 eigen_py27h7b7505e_0  anaconda/pkgs/main  
            
    tensorflow                     2.0. 0 eigen_py27hec4e49e_0  anaconda/pkgs/main  
    tensorflow                     2.0. 0 eigen_py27hec4e49e_0  pkgs/main           
    
    tensorflow                     2.1. 0 eigen_py27h636cc2a_0  pkgs/main           
    tensorflow                     2.1. 0 eigen_py36hbb90eaf_0  anaconda/pkgs/main  
          
    tensorflow                     2.2. 0 eigen_py36h84d285f_0  anaconda/pkgs/main  
    
    tensorflow                     2.2. 0 mkl_py38h6d3daf0_0  pkgs/main           
    tensorflow                     2.3. 0 eigen_py37h189e6a2_0  anaconda/pkgs/main  
    tensorflow                     2.3. 0 eigen_py37h189e6a2_0  pkgs/main           
    
    tensorflow                     2.4. 0  py37h89c1867_0  anaconda/cloud/conda-forge
    tensorflow                     2.4. 0  py38h578d9bd_0  anaconda/cloud/conda-forge
    tensorflow                     2.41. eigen_py37h3da6045_0  anaconda/pkgs/main  
    tensorflow                     2.41. eigen_py37h3da6045_0  pkgs/main           
    
    tensorflow                     2.43.  py36h5fab9bb_0  anaconda/cloud/conda-forge
    
    tensorflow                     2.5. 0 eigen_py37hff93566_0  anaconda/pkgs/main  
    tensorflow                     2.5. 0 eigen_py37hff93566_0  pkgs/main           
    
    tensorflow                     2.5. 0 mkl_py39h4a0693c_0  pkgs/main           
    tensorflow                     2.6. 0 cpu_py37hc107814_2  anaconda/cloud/conda-forge
    tensorflow                     2.6. 0 cpu_py38h077e6c3_2  anaconda/cloud/conda-forge
    tensorflow                     2.6. 0 cpu_py39hcb7c6aa_2  anaconda/cloud/conda-forge
    
    tensorflow                     2.6. 0 eigen_py37h34b007a_0  pkgs/main           
    tensorflow                     2.6. 0 eigen_py38hcc1cb13_0  anaconda/pkgs/main  
    tensorflow                     2.6. 0 eigen_py38hcc1cb13_0  pkgs/main           
    tensorflow                     2.6. 0 eigen_py39h4b72145_0  anaconda/pkgs/main  
    tensorflow                     2.6. 0 eigen_py39h4b72145_0  pkgs/main           
    tensorflow                     2.6. 0 mkl_py37h9d15365_0  anaconda/pkgs/main  
    tensorflow                     2.6. 0 mkl_py37h9d15365_0  pkgs/main           
    tensorflow                     2.62. cuda112py39h9333c2f_1  anaconda/cloud/conda-forge
    
    Copy the code

    📙 tensorflow-gpu==2.6.0 Installation Example


    conda create -n tfNew python=3.8. 5
    
    conda activate tfNew
    
    conda search tensorflow
    
    conda install tensorflow
    
    conda install tensorflow-gpu==2.6. 0
    Copy the code

    📙 Tensorflow – Gpu other versions


    • X version and 2.X version are widely used at present, and these two versions have many differences in functions
    • Therefore, friends in the environment to build, to distinguish
    • Other 1.X version and 2.X version of the installation, we copy the above modificationconda install tensorflow-gpu==X.X.XVersion number is ok

    🚀🚀 Mexic AI


  • 🎉 as one of the bloggers with the most dry goods in the field of AI, ❤️ lives up to his time and qing ❤️
  • ❤️ If the article is helpful to you, like, comment encourage bloggers every minute to seriously create
  • Happy learning AI, deep learning environment building: an article to read

    • 🍊 # Ubuntu install CUDa11.2 for current users

    • 🍊 # Linux and Windows setup PIP image source – the most practical machine learning library download acceleration setup

    • 🍊# Anaconda conda switch to domestic source, Windows and Linux configuration method, add tsinghua source —

    • 🍊 # Specify the GPU to run and train Python programs, deep learning single card, multi-card training GPU Settings

    • 🍊 # Install Pytorch and Torchvision in Cuda10.0 for Linux

    • 🍊 # Read SSH password login, public key authentication login

    • Install JDK 11: configure the JAVA_HOME environment variable