Python

Cuda

export PATH=/usr/local/cuda/bin:$PATH
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin
sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600
wget https://developer.download.nvidia.com/compute/cuda/12.3.2/local_installers/cuda-repo-ubuntu2004-12-3-local_12.3.2-545.23.08-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu2004-12-3-local_12.3.2-545.23.08-1_amd64.deb
sudo cp /var/cuda-repo-ubuntu2004-12-3-local/cuda-*-keyring.gpg /usr/share/keyrings/
sudo apt-get update
sudo apt-get -y install cuda-toolkit-12-3

Install Driver

sudo apt-get install -y cuda-drivers

sudo apt-get install -y nvidia-kernel-open-545
sudo apt-get install -y cuda-drivers-545

Cudnn

Conda

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

pip

pip3 install numpy -i https://pypi.tuna.tsinghua.edu.cn/simple
  • ~/.pip/pip.conf
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host = https://pypi.tuna.tsinghua.edu.cn

Pytorch

pip3 install torch torchvision torchaudio

Pip source list

https://www.cnblogs.com/chenjo/p/14071864.html

~/.pip/pip.conf

[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host=mirrors.aliyun.com

Set source list for pip install

pip install pymysql -i https://pypi.tuna.tsinghua.edu.cn/simple/


// 国内源
pip install 包名-i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com

References

comments powered by Disqus