Tsinghua source help link:https://mirror.tuna.tsinghua.edu.cn/help/anaconda/
Download link:< /span>https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/
Other deep learning
环境相关博文
:[stable-diffusion] GUI environment installation for dreambooth, lora, and sd model fine-tuning under 4090 graphics card (cuda driver, pytorch, xformer)
Article directory
1. anaconda/miniconda installation
1.1 Download to linux
If the wget command is for installation, directly download it in windows and copy it.
wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-py38_4.9.2-Linux-x86_64.sh
Download interface
1.2 Installation process
sh Miniconda3-py38_4.9.2-Linux-x86_64.sh
空格
skip + yes
Agree to the agreement
Enter yes
Select installation location (default available)
initialize conda + yes
Otherwise you need to enter the environment variable yourself
The command will be written automatically ~/.bashrc
Otherwise you need to add it manually,
1.3 Installation completed + switch to domestic source
Check whether the conda command can be used
conda
conda adds domestic sources
conda 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/pytorch
conda config --set show_channel_urls yes
pip adds domestic sources
Add Baidu link
pip config set global.index-url https://mirror.baidu.com/pypi/simple
pip config set global.trusted-host mirror.baidu.com
Other domestic
阿里云镜像源
https://mirrors.aliyun.com/pypi/simple/
清华大学镜像源
https://pypi.tuna.tsinghua.edu.cn/simple/
# 腾讯
pip config set global.index-url http://mirrors.cloud.tencent.com/pypi/simple
pip config set global.trusted-host mirrors.cloud.tencent.com
2. Install cudnn (required for any framework)
3090TI+ cuda11.8 + cudnn 8.6.0+
The cuda driver + CUDA Toolkit has been installed by operation and maintenance. You can search for other details Tutorial.
downloadcudnn
Download:https://developer.nvidia.com/cudnn
官方指南
: https:// docs.nvidia.com/deeplearning/cudnn/install-guide/
After downloading, transfer it to the server, or you can download it directly
Unzip on server
tar -xvf cudnn-linux-x86_64-8.6.0.163_cuda11-archive.tar.xz
Screenshot of the decompression process
Copy to system library
cd cudnn-linux-x86_64-8.6.0.163_cuda11-archive
sudo cp include/cudnn*.h /usr/local/cuda/include
sudo cp -P lib/libcudnn* /usr/local/cuda/lib64
sudo chmod a+r /usr/local/cuda/include/cudnn*.h /usr/local/cuda/lib64/libcudnn*
3. Deep learning framework paddle installation
Official documentation:https://www.paddlepaddle.org.cn/install/quickdocurl=/documentation/docs/zh/install/pip/linux-pip.html< /span>
Official installation instructions
paddle choose the right version
python3 -m pip install paddlepaddle-gpu==2.5.1 -i https://mirror.baidu.com/pypi/simple
Verify installation,
Enter directly on bash
python
import paddle
paddle.utils.run_check()
If cudnn is not installed correctly, an error will be reported.
W1023 11:32:40.486835 13508 gpu_resources.cc:119] Please NOTE: device:
0, GPU Compute Capability: 8.6, Driver API Version: 11.8, Runtime API
Version: 11.8 W1023 11:32:40.487215 13508 dynamic_loader.cc:303] The
third-party dynamic library (libcudnn.so) that Paddle depends on is
not configured correctly. (error code is
/usr/local/cuda/lib64/libcudnn.so
: cannot open shared object file: No
such file or directory) Suggestions:
- Check if the third-party dynamic library (e.g. CUDA, CUDNN) is installed correctly and its version is matched with paddlepaddle you
installed.- Configure third-party dynamic library environment variables as follows:
- Linux: set LD_LIBRARY_PATH by
export LD_LIBRARY_PATH=...
- Windows: set PATH by `set PATH=XXX;