CentOS/Redhat 操作系统

<p><span style="font-size:16px"><strong>RPM方式安装</strong></span></p> <p><span style="font-size:16px"><strong>操作步骤</strong></span></p> <p>1.&nbsp; 安装DKMS依赖,按照EPEL网站上的说明安装EPEL。</p> <p>2.&nbsp; 安装存储库元数据,清理yum缓存并安装CUDA:</p> <table border="1" cellpadding="1" cellspacing="1" style="width:707px"> <tbody> <tr> <td style="background-color:#ededed; width:701px"> <p>&nbsp; &nbsp; $ sudo rpm --install cuda-repo-&lt;distro&gt;-&lt;version&gt;.&lt;architecture&gt;.rpm</p> <p>&nbsp; &nbsp; $ sudo yum clean expire-cache</p> <p>&nbsp; &nbsp; $ sudo yum install cuda</p> </td> </tr> </tbody> </table> <p>3.&nbsp; 重启操作系统。</p> <p>4.&nbsp; 通过修改PATH和LD_LIBRARY_PATH变量来设置开发环境:&nbsp;</p> <table border="1" cellpadding="1" cellspacing="1" style="width:707px"> <tbody> <tr> <td style="background-color:#ededed; width:701px"> <p>&nbsp; &nbsp; $ export PATH = / usr / local / cuda- 9.2 / bin $ {PATH:+:$ {PATH}}</p> <p>&nbsp; &nbsp; $ export LD_LIBRARY_PATH = / usr / local / cuda- 9.2 / lib64 \</p> <p>&nbsp; &nbsp; $ {LD_LIBRARY_PATH:+:$ {LD_LIBRARY_PATH} }</p> </td> </tr> </tbody> </table> <p>5.&nbsp; 构建并运行:</p> <table border="1" cellpadding="1" cellspacing="1" style="width:707px"> <tbody> <tr> <td style="background-color:#ededed; width:701px"> <p>&nbsp; &nbsp; $ cuda-install-samples- 9.2 .sh~</p> <p>&nbsp; &nbsp; $ cd~ / NVIDIA_CUDA- 9.2 _Samples / 5_Simulations / nbody</p> <p>&nbsp; &nbsp; $ make</p> <p>&nbsp; &nbsp; $ ./nbody</p> </td> </tr> </tbody> </table> <p>&nbsp;</p> <p><span style="font-size:16px"><strong>Runfile方式安装</strong></span></p> <p><span style="font-size:16px"><strong>操作步骤</strong></span></p> <p>1.&nbsp; 禁用Nouveau驱动程序。</p> <p>(1)创建一个配置文件 /etc/modprobe.d/blacklist-nouveau.conf,具有以下内容:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p> <table border="1" cellpadding="1" cellspacing="1" style="width:707px"> <tbody> <tr> <td style="background-color:#ededed; width:701px"> <p>&nbsp; &nbsp; &nbsp;blacklist nouveau</p> <p>&nbsp; &nbsp; &nbsp;options nouveau modeset = 0</p> </td> </tr> </tbody> </table> <p>(2)重新生成内核initramfs:</p> <table border="1" cellpadding="1" cellspacing="1" style="width:707px"> <tbody> <tr> <td style="background-color:#ededed; width:701px">&nbsp;&nbsp;&nbsp; $ sudo dracut --force</td> </tr> </tbody> </table> <p>2.&nbsp; 在系统内核引导参数的末尾添加 <strong>3</strong>和<strong>nomodeset</strong>,重启系统。</p> <p>3.&nbsp; 以静默方式运行安装程序:&nbsp;</p> <table border="1" cellpadding="1" cellspacing="1" style="width:707px"> <tbody> <tr> <td style="background-color:#ededed; width:701px">&nbsp;&nbsp;&nbsp; $ sudo sh cuda_ &lt;version&gt; _linux.run --silent</td> </tr> </tbody> </table> <p>4.&nbsp; 创建一个xorg.conf 文件:</p> <table border="1" cellpadding="1" cellspacing="1" style="width:707px"> <tbody> <tr> <td style="background-color:#ededed; width:701px">&nbsp;&nbsp;&nbsp; $ sudo nvidia-xconfig</td> </tr> </tbody> </table> <p>5.&nbsp; 重启系统加载图形界面。</p> <p>6.&nbsp; 通过修改PATH和LD_LIBRARY_PATH变量来设置开发环境:</p> <table border="1" cellpadding="1" cellspacing="1" style="width:707px"> <tbody> <tr> <td style="background-color:#ededed; width:701px"> <p>&nbsp; &nbsp; $ export PATH = / usr / local / cuda- 9.2 / bin $ {PATH:+:$ {PATH}}</p> <p>&nbsp; &nbsp; $ export LD_LIBRARY_PATH = / usr / local / cuda- 9.2 / lib64 \</p> <p>&nbsp; &nbsp; $ {LD_LIBRARY_PATH:+:$ {LD_LIBRARY_PATH} }</p> </td> </tr> </tbody> </table> <p>7.&nbsp; 构建并运行:</p> <table border="1" cellpadding="1" cellspacing="1" style="width:707px"> <tbody> <tr> <td style="background-color:#ededed; width:701px"> <p>&nbsp; &nbsp; $ cuda-install-samples- 9.2 .sh~</p> <p>&nbsp; &nbsp; $ cd~ / NVIDIA_CUDA- 9.2 _Samples / 5_Simulations / nbody</p> <p>&nbsp; &nbsp; $ make</p> <p>&nbsp; &nbsp; $ ./nbody</p> </td> </tr> </tbody> </table> <p>&nbsp;</p>
以上内容是否解决了您的问题?
请补全提交信息!
咨询·建议

电话咨询 - 7x24 小时

400-151-8800

邮件咨询

cloud@pingan.com

在线客服

7x24 小时,急速解答

工单支持

解决云产品相关技术问题