# ps:https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64
wget https://developer.download.nvidia.com/compute/cuda/12.6.0/local_installers/cuda_12.6.0_560.28.03_linux.run
sudo sh cuda_12.6.0_560.28.03_linux.run
之前已经安装过nvidia驱动了,所以这里需要手动去掉第一项
===========
= Summary =
===========
Driver: Not Selected
Toolkit: Installed in /usr/local/cuda-12.6/
Please make sure that
- PATH includes /usr/local/cuda-12.6/bin
- LD_LIBRARY_PATH includes /usr/local/cuda-12.6/lib64, or, add /usr/local/cuda-12.6/lib64 to /etc/ld.so.conf and run ldconfig as root
To uninstall the CUDA Toolkit, run cuda-uninstaller in /usr/local/cuda-12.6/bin
***WARNING: Incomplete installation! This installation did not install the CUDA Driver. A driver of version at least 555.00 is required for CUDA 12.6 functionality to work.
To install the driver using this installer, run the following command, replacing with the name of this run file:
sudo .run --silent --driver
Logfile is /var/log/cuda-installer.log
卸载自带的Libre Office
sudo apt remove --purge libreoffice* && sudo apt autoremovesudo rm -rf /etc/libreoffice*卸载搜狗输入法
sudo apt install com.sogou.ime.ng.fcitx5.deepin && sudo apt autoremove卸载/重装深度浏览器(重装过后的浏览器带插件)
ll-cli uninstall org.deepin.browser && sudo apt autoremovesudo apt install org.deepin.browser必要库
sudo apt install -y console-setup zstd安装Git
sudo apt install -y git安装Golang
sudo apt install -y golang安装rust
sudo apt install -y rustc cargo安装Nodejs
sudo apt install -y nodejs npm### 安装ffmpegsudo apt install -y ffmpeg安装Docker
普通安装
安装Nvidia
安装Nvidia GPU驱动(源内)[如果在安装系统时安装过的可以略过]
安装
nvidia-smisudo apt install nvidia-smi安装
cuda库libcuda1-465和libcuda1nvidia-smi命令获取版本)并安装vi ~/.bashrcsource ~/.bashrcsudo ln -s /usr/local/cuda-12.6/ /usr/local/cudanvcc -Vps:https://developer.nvidia.com/downloads/compute/cudnn/secure/8.9.7/local_installers/12.x/cudnn-linux-x86_64-8.9.7.29_cuda12-archive.tar.xz/
tar -xvf cudnn-linux-x86_64-8.9.7.29_cuda12-archive.tar.xz && cd cudnn-linux-x86_64-8.9.7.29_cuda12-archivecat /usr/local/cuda/include/cudnn_version.h | grep CUDNN_MAJOR -A 2[pytorch](https://pytorch.org/get-started/previous-versions/)并验证(不高于GPU的CUDA版本即可)conda create -n pytorch python=3.12.5conda activate pytorchconda install pytorch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1 pytorch-cuda=12.1 -c pytorch -c nvidiapython3 -c "import torch; print('GPU is OK?', torch.cuda.is_available())"ps: 请注意在虚拟环境中进行,如果直接安装在系统自带的环境中,请使用sudo apt install python3-库文件名(或模块名)参考资料