Vscode connects to the server (Ubuntu system), installs anaconda to run deep learning code

Table of contents

VSCODE's official website

Visual Studio Code - Code Editing. Redefined

1 Install Romote-SSH

2 Add server

3 Enter the server​

4 Enter the server file 

 5 Install anconda on Ubuntu (first cd to the directory you want to install)

5.1 download anconda

5.2 Install anconda (select y, it can be installed by default)

5.3 Test whether anaconda is installed successfully

5.4 Enter the base environment

5.5 Create a virtual environment

6 Select an interpreter


VSCODE installation

Visual Studio Code - Code Editing. Redefined

1 Install Romote-SSH

2 Add server

3 Enter the server 

4 Enter the server file 

 5 Install anconda on Ubuntu (first cd to the directory you want to install)

5.1 Download anconda (you can choose other versions through the official website)

Anconda3 official website download

wget -c https://repo.anaconda.com/archive/Anaconda3-2020.02-Linux-x86_64.sh

5.2 Install anconda (select y, it can be installed by default)

bash Anaconda3-2020.02-Linux-x86_64.sh

5.3 Test whether anaconda is successfully installed (sometimes you need to create a new terminal to test successfully)

conda --version

5.4 Enter the base environment

method 1

base

Method 2 (~ stands for the current directory, so if it doesn’t work, go to the directory containing anaconda3 first)

​source ~/anaconda3/bin/activate

5.5 Create a virtual environment

conda create -n pytorch-gpu python=3.7
activate pytorch-gpu

5.5.1 install cuda

conda install cudatoolkit=10.0.0

5.5.2 Install cudnn

conda install cudnn=7.6

5.5.3 Install torch and torchvision

https://pytorch.org/get-started/previous-versions/      (pytorch official website)

Note: torch and torchvison should correspond to the same and be the GPU version

6 Select an interpreter

(It will be available for the first time) If you press F1 and search for Python: Select Interpreter and you can't find it, it may be that Python is not installed, and you need to search for the installation in the extension.

7 virtual environment operation

查看已有虚拟环境 conda-env list
重命名环境 conda create -n tf2 --clone nlp
删除原环境 conda remove -n nlp --all

Guess you like

Origin blog.csdn.net/qq_42845932/article/details/123964867