ubuntu_install.html 8.9 KB
Newer Older
1 2


Y
Yu Yang 已提交
3 4 5 6 7 8 9 10
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
11
    <title>使用deb包在Ubuntu上安装PaddlePaddle &#8212; PaddlePaddle  documentation</title>
Y
Yu Yang 已提交
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
    
    <link rel="stylesheet" href="../../_static/classic.css" type="text/css" />
    <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../../',
        VERSION:     '',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../../_static/jquery.js"></script>
    <script type="text/javascript" src="../../_static/underscore.js"></script>
    <script type="text/javascript" src="../../_static/doctools.js"></script>
    <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
29 30
    <link rel="index" title="Index" href="../../genindex.html" />
    <link rel="search" title="Search" href="../../search.html" />
31
    <link rel="top" title="PaddlePaddle  documentation" href="../../index.html" /> 
32 33 34 35 36 37 38 39 40 41
<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "//hm.baidu.com/hm.js?b9a314ab40d04d805655aab1deee08ba";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>

Y
Yu Yang 已提交
42 43 44 45 46 47 48 49
  </head>
  <body role="document">
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../genindex.html" title="General Index"
             accesskey="I">index</a></li>
50
        <li class="nav-item nav-item-0"><a href="../../index.html">PaddlePaddle  documentation</a> &#187;</li> 
Y
Yu Yang 已提交
51 52 53 54 55 56 57 58
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
Y
Yu Yang 已提交
59 60
  <div class="section" id="debubuntupaddlepaddle">
<h1>使用deb包在Ubuntu上安装PaddlePaddle<a class="headerlink" href="#debubuntupaddlepaddle" title="Permalink to this headline"></a></h1>
61 62 63 64 65 66 67 68 69 70
<p>PaddlePaddle目前支持ubuntu 14.04版本使用deb包安装。更多的安装包PaddlePaddle会在近期提供。
欢迎大家贡献各个发行版的安装包(例如,ubuntu,centos,debian,gentoo)。</p>
<p>PaddlePaddle的ubuntu安装包分为两个版本,即CPU版本,和GPU版本,他们的下载地址是:
<a class="reference external" href="https://github.com/baidu/Paddle/releases/tag/V0.8.0b0">https://github.com/baidu/Paddle/releases/tag/V0.8.0b0</a></p>
<p>需要注意的是,目前PaddlePaddle的安装包只支持
<a class="reference external" href="https://en.wikipedia.org/wiki/Advanced_Vector_Extensions">AVX</a>
指令集的X86 CPU。如果系统使用不支持 <a class="reference external" href="https://en.wikipedia.org/wiki/Advanced_Vector_Extensions">AVX</a> 指令集的CPU运行PaddlePaddle,那么需要从源码
编译PaddlePaddle,请参考 <a class="reference external" href="../cmake/index.html">编译文档</a></p>
<p>用户需要先将PaddlePaddle安装包下载到本地,然后执行如下命令即可完成安装。</p>
<div class="highlight-shell"><div class="highlight"><pre><span></span>dpkg -i paddle-0.8.0b-cpu.deb
Y
Yu Yang 已提交
71 72 73
apt-get install -f
</pre></div>
</div>
Y
Yu Yang 已提交
74
<p><code class="code docutils literal"><span class="pre">dpkg</span> <span class="pre">-i</span></code> 的时候如果报一些依赖未找到的错误是正常的,
75 76
<code class="code docutils literal"><span class="pre">apt-get</span> <span class="pre">install</span> <span class="pre">-f</span></code> 里会继续安装 PaddlePaddle。
需要注意的是,如果使用GPU版本的PaddlePaddle,请安装CUDA 7.5 和CUDNN 5到本地环境中,
Y
Yu Yang 已提交
77
并设置好对应的环境变量(LD_LIBRARY_PATH等等)。</p>
78 79
<div class="section" id="id2">
<h2>可能遇到的问题<a class="headerlink" href="#id2" title="Permalink to this headline"></a></h2>
Y
Yu Yang 已提交
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114
<div class="section" id="libcudart-so-libcudnn-so">
<h3>libcudart.so/libcudnn.so找不到<a class="headerlink" href="#libcudart-so-libcudnn-so" title="Permalink to this headline"></a></h3>
<p>安装完成PaddlePaddle后,运行 <code class="code docutils literal"><span class="pre">paddle</span> <span class="pre">train</span></code> 报错:</p>
<div class="highlight-shell"><div class="highlight"><pre><span></span>0831 12:36:04.151525  1085 hl_dso_loader.cc:70] Check failed: nullptr != *dso_handle For Gpu version of PaddlePaddle, it couldn&#39;t find CUDA library: libcudart.so Please make sure you already specify its path.Note: for training data on Cpu using Gpu version of PaddlePaddle,you must specify libcudart.so via LD_LIBRARY_PATH.
</pre></div>
</div>
<p>PaddlePaddle使用运行时动态连接CUDA的so,如果在 LD_LIBRARY_PATH里面找不到这些动态
库的话,会报寻找不到这些动态库。</p>
<p>解决方法很简单,就是将这些动态库加到环境变量里面。比较可能的命令如下。</p>
<div class="highlight-text"><div class="highlight"><pre><span></span>export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
</pre></div>
</div>
</div>
<div class="section" id="cuda-driver">
<h3>CUDA Driver找不到<a class="headerlink" href="#cuda-driver" title="Permalink to this headline"></a></h3>
<p>运行 <code class="code docutils literal"><span class="pre">paddle</span> <span class="pre">train</span></code> 报错:</p>
<div class="highlight-text"><div class="highlight"><pre><span></span>F0831 12:39:16.699000  1090 hl_cuda_device.cc:530] Check failed: cudaSuccess == cudaStat (0 vs. 35) Cuda Error: CUDA driver version is insufficient for CUDA runtime version
</pre></div>
</div>
<p>PaddlePaddle运行时如果没有寻找到cuda的driver,变会报这个错误。解决办法是将cuda
driver添加到LD_LIBRARY_PATH中。比较可能的命令如下。</p>
<div class="highlight-text"><div class="highlight"><pre><span></span>export LD_LIBRARY_PATH=/usr/lib64:$LD_LIBRARY_PATH
</pre></div>
</div>
</div>
<div class="section" id="config">
<h3>config文件找不到<a class="headerlink" href="#config" title="Permalink to this headline"></a></h3>
<p>运行 <code class="code docutils literal"><span class="pre">paddle</span> <span class="pre">train</span></code> 得到结果:</p>
<div class="highlight-text"><div class="highlight"><pre><span></span>F0831 20:53:07.525789  1302 TrainerMain.cpp:94] Check failed: config != nullptr no valid config
</pre></div>
</div>
<p>PaddlePaddle在运行时找不到对应的config文件,说明命令行参数 <code class="code docutils literal"><span class="pre">config</span></code> 没有设置。
而这个一般说明PaddlePaddle已经安装完毕了。</p>
</div>
</div>
Y
Yu Yang 已提交
115 116 117 118 119 120 121 122
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
Y
Yu Yang 已提交
123 124 125
  <h3><a href="../../index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">使用deb包在Ubuntu上安装PaddlePaddle</a><ul>
126
<li><a class="reference internal" href="#id2">可能遇到的问题</a><ul>
Y
Yu Yang 已提交
127 128 129 130 131 132 133 134 135
<li><a class="reference internal" href="#libcudart-so-libcudnn-so">libcudart.so/libcudnn.so找不到</a></li>
<li><a class="reference internal" href="#cuda-driver">CUDA Driver找不到</a></li>
<li><a class="reference internal" href="#config">config文件找不到</a></li>
</ul>
</li>
</ul>
</li>
</ul>

Y
Yu Yang 已提交
136 137 138 139 140 141 142 143 144 145
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="../../_sources/build_and_install/install/ubuntu_install.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3>Quick search</h3>
    <form class="search" action="../../search.html" method="get">
146 147
      <div><input type="text" name="q" /></div>
      <div><input type="submit" value="Go" /></div>
Y
Yu Yang 已提交
148 149 150 151 152 153 154 155 156 157 158 159 160 161 162
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../genindex.html" title="General Index"
             >index</a></li>
163
        <li class="nav-item nav-item-0"><a href="../../index.html">PaddlePaddle  documentation</a> &#187;</li> 
Y
Yu Yang 已提交
164 165 166
      </ul>
    </div>
    <div class="footer" role="contentinfo">
167
        &#169; Copyright 2016, PaddlePaddle developers.
168
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.8.
Y
Yu Yang 已提交
169 170 171
    </div>
  </body>
</html>