ubuntu16.04安装多个版本CUDA的方法
linux  /  管理员 发布于 4年前   336
我的机器是CUDA16.04的,之前装过CUDA10.0,因为一些原因,现在需要安转CUDA9.0。
1.首先https://developer.nvidia.com/cuda-90-download-archive?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=1604&target_type=runfilelocal
下载run版本的(如果之前没装过CUDA,可以下载deb版本的)
2.按照上面的教程
sudo chmod +x cuda_9.0.176_384.81_linux.run # 为 cuda_9.0.176_384.81_linux.run 添加可执行权限 ./cuda_9.0.176_384.81_linux.run # 安装 cuda_9.0.176_384.81_linux.run
3.相关参数的设置
Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 384.81?(y)es/(n)o/(q)uit: n #我已经装过CUDA10了,所以不需要安转9.0的显卡驱动Install the CUDA 9.0 Toolkit? (y)es/(n)o/(q)uit: y/usr/local/cuda-9.0 is not writable. Do you wish to run the installation with 'sudo'? (y)es/(n)o: y #使用超级用户权限Please enter your password: Do you want to install a symbolic link at /usr/local/cuda? # 是否将安装目录通过软连接的方式 link 到 /usr/local/cuda,yes or no 都可以,取决于你是否使用 /usr/local/cuda 为默认的 cuda 目录。 (y)es/(n)o/(q)uit: y #我目前需要使用9.0Enter Toolkit Location[ default is /usr/local/cuda-9.0 ]:#直接回车
4.安转结束后相关环境变量的设置
Finished copying samples.============ Summary ============Driver: Not SelectedToolkit: Installed in /usr/local/cuda-9.0Samples: Installed in /usr/local/cuda-9.0/SamplesPlease make sure that - PATH includes /usr/local/cuda-9.0/bin - LD_LIBRARY_PATH includes /usr/local/cuda-9.0/lib64, or, add /usr/local/cuda-9.0/lib64 to /etc/ld.so.conf and run ldconfig as rootTo uninstall the CUDA Toolkit, run the uninstall script in /usr/local/cuda-9.0/binPlease see CUDA_Installation_Guide_Linux.pdf in /usr/local/cuda-9.0/doc/pdf for detailed information on setting up CUDA.***WARNING: Incomplete installation! This installation did not install the CUDA Driver. A driver of version at least 384.00 is required for CUDA 9.0 functionality to work.To install the driver using this installer, run the following command, replacing <CudaInstaller> with the name of this run file: sudo <CudaInstaller>.run -silent -driverLogfile is /tmp/cuda_install_11003.log
如上,需要设置PATH和LD_LIBRARY_PATH两个变量,在./bashrc文件中修改即可,记得要source一些./bashrc,让其生效。
完成上面这些步骤后,就可以进行多个版本的切换了,直接修改/usr/local/cuda即可,使其指向不同版本的CUDA。
总结
以上所述是小编给大家介绍的ubuntu16.04安装多个版本的CUDA的方法,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对站的支持!
122 在
学历:一种延缓就业设计,生活需求下的权衡之选中评论 工作几年后,报名考研了,到现在还没认真学习备考,迷茫中。作为一名北漂互联网打工人..123 在
Clash for Windows作者删库跑路了,github已404中评论 按理说只要你在国内,所有的流量进出都在监控范围内,不管你怎么隐藏也没用,想搞你分..原梓番博客 在
在Laravel框架中使用模型Model分表最简单的方法中评论 好久好久都没看友情链接申请了,今天刚看,已经添加。..博主 在
佛跳墙vpn软件不会用?上不了网?佛跳墙vpn常见问题以及解决办法中评论 @1111老铁这个不行了,可以看看近期评论的其他文章..1111 在
佛跳墙vpn软件不会用?上不了网?佛跳墙vpn常见问题以及解决办法中评论 网站不能打开,博主百忙中能否发个APP下载链接,佛跳墙或极光..
Copyright·© 2019 侯体宗版权所有·
粤ICP备20027696号