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

  • πŸ₯‡ copyright: this article by [Moneo-ai] original, you big guy, one read, please refer to
  • πŸŽ‰ statement: as one of the bloggers in AI field, ❀️ lives up to your time and your ❀️

  • πŸ‘‹ Server Configuration


    • Ubuntu 18.04.5 LTS
    • 2080 8 g cuda10.0 RTX

    A table for information


    πŸŽ‰ PyTorch 0.4.0 installation


    If you are interested in building a Pytorch0.4.0 environment, please refer to this blog post directly

    • Pytorch0.4.0 environment setup tutorial

    The Conda environment for PyTorch =0.4.0 will install CudatoolKit 8.0 required to run Python


    The installation command is as follows

    Conda Install Pytorch =0.4.0 -c PyTorch Conda install TorchVision =0.1.6# orPIP install torchvision = = 0.1.6Copy the code

    πŸ“” PyTorch 1.1.0 installation


    • The version installed here is PyTorch ==1.1.0 TorchVision ==0.3.0 and can be installed correctly using Conda. The installation command is from PyTorch official

    The correct installation method is as follows :(available for testing)


    Conda create -n nice Python =3.6.9 Conda activate Nice Conda install Pytorch ==1.1.0 TorchVision ==0.3.0 CUDatoolKit =10.0 -c pytorch pip install opencv-python pip install scipy pip install thopCopy the code

    πŸ“• pytorch = = 1.4.0 installation


    Install command from PyTorch official.

    conda create -n torch14 python=3.66.
    
    conda activate torch14
    
    conda install pytorch==1.4. 0 torchvision==0.5. 0 cudatoolkit=10.0 -c pytorch
    
    pip install opencv-python
    
    pip install scipy
    
    pip install thop
    
    Copy the code

    πŸ“— pytorch = = 1.5.0 installation


    # CUDA 9.2
    conda install pytorch==1.5. 0 torchvision==0.6. 0 cudatoolkit=9.2 -c pytorch
    
    # CUDA 10.0
    conda install pytorch==1.5. 0 torchvision==0.6. 0 cudatoolkit=10.0 -c pytorch
    
    # CUDA 10.1
    conda install pytorch==1.5. 0 torchvision==0.6. 0 cudatoolkit=10.1 -c pytorch
    
    # CUDA 10.2
    conda install pytorch==1.5. 0 torchvision==0.6. 0 cudatoolkit=10.2 -c pytorch
    
    # CPU Only
    conda install pytorch==1.5. 0 torchvision==0.6. 0 cpuonly -c pytorch
    Copy the code

    πŸ“˜ Discussion on CudatoolKit version [❀️ Pharmacology AI❀️]


    Cudatoolkit releases some Cuda/Cudnn errors [❀️ special supplement ❀️]

    • Cudatoolkit = 8.x, cudatoolKit = 9.x, or cudatoolKit = 10.x depending on the Cuda version of your server

    • In Conda Python, cudatoolKit and PyTorch versions match

    • Cudatoolkit =11.2 and below in your environment should work fine as long as the Root version of cudatoolKit is high enough, such as 11.2

    • To solve this problem, run Conda install CudatoolKit =x.0 to install the correct version of CudatoolKit

    • Here, my relevant processing ideas are as follows

    First, search the currently installed CudatoolKit

    conda search cudatoolkit
    
    Loading channels: doneName Version Build Channel CudatoolKit 5.1RC1 P0 defaults CudatoolKit 5.5.1 P0 defaults CudatoolKit 6.0P0 defaults Cudatoolkit 7.0 1 Defaults CudatoolKit 7.5 0 Defaults CudatoolKit 7.5 2 Defaults CudatoolKit 8.0 1 Defaults CudatoolKit 8.0 3 Defaults CudatoolKit 9.0 H13B8566_0 Defaults CudatoolKit 9.2 0 Defaults CudatoolKit 10.0.130 0 defaults Cudatoolkit 10.1.168 0 defaults cudatoolkit 10.1.243 H6bb024C_0 defaults cudatoolkit 10.2.89 HFD86e86_0 defaults Cudatoolkit 10.2.89HFD86E86_1 defaults CUDatoolkit 11.0.221H6BB024C_0 defaults cudatoolkit 11.3.1H2BC3F7F_2 defaultsCopy the code

    Therefore, the current installation commands can be considered as follows: I will install according to Pytorch version adaptation requirements.

    • Conda install cudatoolkit = 7.0
    • Conda install cudatoolkit = 8.0
    • Conda install cudatoolkit = 9.0
    • Conda install cudatoolkit = 10.0. *
    • Conda install cudatoolkit = 11.0. *

    πŸ“˜ pytorch = = 1.6.0 installation


    
    # CUDA 9.2
    conda install pytorch==1.6. 0 torchvision==0.7. 0 cudatoolkit=9.2 -c pytorch
    
    # CUDA 10.0
    conda install pytorch==1.6. 0 torchvision==0.7. 0 cudatoolkit=10.0 -c pytorch
    
    # CUDA 10.1
    conda install pytorch==1.6. 0 torchvision==0.7. 0 cudatoolkit=10.1 -c pytorch
    
    # CUDA 10.2
    conda install pytorch==1.6. 0 torchvision==0.7. 0 cudatoolkit=10.2 -c pytorch
    
    # CPU Only
    conda install pytorch==1.6. 0 torchvision==0.7. 0 cpuonly -c pytorch
    
    Copy the code

    πŸ“™ pytorch = = 1.7.0 installation


    # CUDA 9.2Conda install Pytorch ==1.7.0 TorchVision ==0.8.0 TorchAudio ==0.7.0 CudatoolKit =9.2 -C Pytorch# CUDA 10.0Conda install Pytorch ==1.7.0 TorchVision ==0.8.0 TorchAudio ==0.7.0 CudatoolKit =10.0 -C Pytorch# CUDA 10.1Conda install PyTorch ==1.7.0 TorchVision ==0.8.0 TorchAudio ==0.7.0 CudatoolKit =10.1 -C Pytorch# CUDA 10.2Conda install PyTorch ==1.7.0 TorchVision ==0.8.0 TorchAudio ==0.7.0 CudatoolKit =10.2 -C Pytorch# CUDA 11.0Conda install Pytorch ==1.7.0 TorchVision ==0.8.0 TorchAudio ==0.7.0 CudatoolKit =11.0 -C Pytorch# CPU OnlyConda install Pytorch ==1.7.0 TorchVision ==0.8.0 TorchAudio ==0.7.0 CPUOnly -c PytorchCopy the code

    πŸ“™ Install test to determine whether torch installation is successful


    If print is True, the installation succeeds

    python 
    
    Python 3.76. (default, Jan  8 2020.19:59:22) 
    [GCC 7.3. 0] :: Anaconda, Inc. on linux
    Type "help"."copyright"."credits" or "license" for more information.
    
    >>> import torch
    >>> import torchvision
    
    >>> print(torch.cuda.is_available())
    True
    
    >>> print(torch.__version__)
    1.5. 0
    
    Copy the code

    πŸ“œ PyTorch 1.8 minimalist installation for Linux [Summer 2021 Supplement]


    Go to the PyTorch home page

    • pytorch.org/

    Choose according to your model

    Copy the command to the server shell command window and run it

    Pip3 Install Torch ==1.8.1+cu111 TorchVision ==0.9.1+cu111 Torchaudio == 0.8.1-f https://download.pytorch.org/whl/lts/1.8/torch_lts.htmlCopy the code

    The important thing to note here is the version of CudatoolKit

    # CUDA 10.2Conda install PyTorch ==1.8.0 TorchVision ==0.9.0 TorchAudio ==0.8.0 CudatoolKit =10.2 -C Pytorch# CUDA 11.1Conda install Pytorch ==1.8.0 TorchVision ==0.9.0 TorchAudio ==0.8.0 cudatoolKit =11.1 -c Pytorch -c conda-forge# CPU OnlyConda install Pytorch ==1.8.0 TorchVision ==0.9.0 TorchAudio ==0.8.0 CPUOnly -c PytorchCopy the code

    πŸ’… there is a conda and PIP download problem


    • First, either way, it is possible, but it is recommended to configure the source for download acceleration
    • I usually use Conda for installation first

    Conda’s main function is to set up its own independent environment in the server [does not affect others]


    You are advised to configure conda and PIP as follows

    • Anaconda conda switch to domestic source, configuration method, add Tsinghua source —
    • PIP image source setup for Linux and Windows – the most useful machine learning library download acceleration setup

    🍊 Install other versions of PyTorch


    Open this page, there are conda and PIP installation commands at the bottom


    Select the CUDA version of your computer

    • Pytorch.org/get-started…


    πŸš€πŸš€ So far the gold digging platform has created the following classic blog post πŸš€πŸš€


    Computer vision field, classic blog post

    • 🍊 Use AI to convert photos of good friends into pencil sketches — 🍊2020 U2Net🍊

    • 🍊 NiceGAN environment to build, style migration (with source) | 【 2020 】 CVPR

    • 🍊 multi-stage progressive image restoration – go rain, denoising, fuzzy – effective tutorial (with source) | 【 2021 】 CVPR

    • 🍊 Image inpainting Based on Deep Learning – A Review

    • 🍊 graduation thesis, academic paper writing basic skills and experience – one read

    • 🍊 LaTeX2021 formula preparation, graphic installation, detailed tutorial, a read

    AI learning and deep learning environment construction

    • 🍊# Ubuntu install CUDa11.2 for current users

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

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


    πŸš€πŸš€ 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