conda
mirror
Conda environment configuration domestic mirror source
University of Science and Technology of China mirror source
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.ustc.edu.cn/anaco`在这里插入代码片`nda/cloud/conda-forge/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/msys2/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/bioconda/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/menpo/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/
Alibaba mirror source
conda config --add channels https://mirrors.aliyun.com/pypi/simple/
environment migration
Original machine:
conda env export --file env_name.yml
Target environment machine:
conda env create -f env_name.yml
environment deletion
conda remove -n env_name --all
Linux
File operations
1. Count the number of directories under a folder
ls -l | grep "^d" | wc -l
2. Count the number of files in a folder
ls -l | grep "^-" | wc -l
3. Count the number of files in a folder, including sub-files
ls -lR | grep "^-"| wc -l
4. Count the number of directories under the folder, including subdirectories
ls -lR | grep "^d"| wc -l
5. Show folder structure
tree
6. Display the folder structure (only the directory is displayed)
tree -d
Check GPU status
1. Check the graphics card usage
nvidia-smi
2. Real-time display of graphics card usage
watch -n 5 nvidia-smi
3. Close a process
sudo kill -9 PID