deep-image-matting project runtime configuration instructions for proper version

deep-image-matting project runtime configuration instructions for proper version

Introduction: A second configuration installation environment in the first configuration failed DIM operating environment of the project background. The core is to solve pytorch installation is important to note cuda and cudnn version compatibility problems, difficulty is determining the correct installation source. The following summarizes the main job of a few things: First, uninstall cuda and cudnn, reinstall cuda10.0.13 and cudnn7.5.1. Second, install anaconda, creating a virtual environment using anaconda. Third, modify the default toolkit conda acquisition channel. Fourth, install the specified version affiliated with conda pytorch and dependencies. Final note, be sure the source of the problem before the package is pytorch Tsinghua mirror source is incorrect. For more details, see below.

4.1 Uninstall cuda and cudnn, reinstall cuda10.0.13 and cudnn7.5.1

Own Baidu, reinstall see my last article: https: //blog.csdn.net/my_name_is_learn/article/details/104680861
unloading reading this: https: //blog.csdn.net/qq_33200967/article/ details / 80689543

4.2 installation anaconda, creating a virtual environment using anaconda.

4.2.1 installation anaconda

Baidu itself, it is very simple, you can run after the .run file download anaconda. Such as

sudo sh xxxxxxxx.run

4.2.2 to create a virtual environment using anaconda

Run the following command in the terminal directory ~ / anaconda / envs / test1 established under virtual environment, python version 3.6

conda create -n test1 python=3.6

4.3 conda modify default toolkit acquisition channel

In fact, the essence is to modify conda desired source. Specific steps are as follows:

First, the operation command in the terminal to modify the source image, terminal command:

# 使用清华conda镜像
conda config --prepend channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/

# 使用科大conda镜像
conda config --prepend channels http://mirrors.ustc.edu.cn/anaconda/pkgs/free/

Second, to see if the installation was successful mirror source

conda config --set show_channel_urls yes

Will generate a ~ / .condarc file, run the cat command to view the contents of the file

cat ~/.condarc

Displayed contents, instructions to modify the installation was successful.

channels:
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
  - http://mirrors.ustc.edu.cn/anaconda/pkgs/free/
  - defaults
show_channel_urls: true

4.4 installation with the specified version dependencies and subsidiary conda pytorch

Enter the virtual environment

进入虚拟环境命令
conda activate test1
退出虚拟环境命令
conda deactivate

Installation 1.1.0pytorch and 0.3.0torchvision, one thing is unknown, the statement expressed the need to install a package, the name is called cudnn-7.6.5, but I cudnn environment really is 7.5.1, I do not know why passed the training, first question here, there are follow-up time to go to solve.

conda install pytorch==1.1.0 torchvision==0.3.0 cudatoolkit=10.0

Installation of other required dependencies, when running python train.py will remind missing some tools package, due to different PCs and different, what you can install any missing. For example, it is the lack of numpy, terminal command: Replace Kit name can be.

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple numpy

Kits can change the name.

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple numpy
Published 45 original articles · won praise 24 · views 3408

Guess you like

Origin blog.csdn.net/my_name_is_learn/article/details/104754639