The first time to use Xshell to run the program on the server

  1. Log in to the server and operate according to the picture. After that,
    insert image description here
    insert image description hereinsert image description here
    select the default option in the pop-up box.

  2. Prepare the pytorch/tensorflow environment (slightly)

conda env list #查看当前所有的虚拟环境
conda create -n myname
conda activate myname # 激活并进入自己的虚拟环境
# 建议根据这个环境的用途来命名,比如想在这个环境下专门使用pytorch,就可以把这个环境命名为pytorch
  1. Create your own folder. Generally speaking, the server of the laboratory may need to be shared by multiple people, so it is very necessary to create your own folder
mkdir myname # 创建新的文件夹
cd myname # 进入所创建的新文件夹
  1. Upload the file to be run
    First enterrz, to see if lrzsz has been installed,
    if not, enter the following command:
yum -y install lrzsz

After the installation is complete, enter againrz, a file selection box will pop up
insert image description here
. You cannot upload folders directly in this place, and the items we upload generally contain multiple files, so you need to compress the folder first and upload the compressed package.
After the upload is complete, enter the following command on the server to decompress:

unzip myproject.zip #后面不加任何参数,表示解压到当前文件夹下(会包含原来的那个文件夹)

Enter the project file after decompression, enterls(Display all files), find the file you want to run and run it directly:

cd myproject
ls
python run.py

Guess you like

Origin blog.csdn.net/qq_41544842/article/details/126063646