先参考Ubuntu20.04下深度学习环境配置,配置apt-get换国内阿里源
参考Ubuntu18-22.04安装和干净卸载nvidia显卡驱动——超详细、最简单中的方法二,使用系统自带的 “软件和更新” 程序 - 附加驱动,选择带有recommend的驱动,进行安装
安装过程中可能会出现的问题
1.The distribution-provided pre-install script failed! Are you sure you want to continue?
选择continue installation
2.Would you like to register the kernel module souces with DKMS? This will allow DKMS to automatically build a new module, if you install a different kernel later?
选择 No 继续。
3.问题没记住,选项是:install without signing
4.问题大概是:Nvidia's 32-bit compatibility libraries?
选择 No 继续。
5.Would you like to run the nvidia-xconfigutility to automatically update your x configuration so that the NVIDIA x driver will be used when you restart x? Any pre-existing x confile will be backed up.
选择 Yes 继续
验证
//执行此语句,出现显卡信息则证明安装成功。
$nvidia-smi
3. 安装Anaconda
$sudo cp cuda/include/cudnn*.h /usr/local/cuda-xxx/include/
$sudo cp cuda/lib64/libcudnn* /usr/local/cuda-xxx/lib64/
$sudo chmod a+r /usr/local/cuda-xxx/include/cudnn*.h /usr/local/cuda-xxx/lib64/libcudnn*