配置了n遍环境,记一下过程吧…省的每次都百度…
conda
Download & install
官网https://docs.conda.io/en/latest/miniconda.html
1 | wget -r https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh |
加入环境变量1
2source ~/.bashrc
conda
添加清华源1
2
3
4
5
6conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/
conda config --set show_channel_urls yes
conda config --get channels
Create new conda env
1 | conda create -n pytorch python=3.7.2 |
Pytorch
Download & install
官网https://pytorch.org/get-started/locally/1
conda install pytorch torchvision cudatoolkit=10.2 -c pytorch
Other
其他可能用得到的1
2
3
4conda install pandas
conda install jupyter notebook
conda install matplotlib
pip install sklearn
Screen
让ssh退出依然运行命令1
2
3
4
5
6
7
8
9apt-get install screen
screen -S test # 创建
command...
screen -r test # 恢复
screen -ls
screen -d test # 退出
exit
screen -wipe test # 删除
screen -S test -X quit # kill and exit