提交 57f6acba 编写于 作者: T Travis CI

Deploy to GitHub Pages: b2215096

上级 451ec2df
Docker installation guide Docker installation guide
==================== ==========================
PaddlePaddle provides some pre-compiled binary, including Docker images, ubuntu deb packages. It is welcomed to contributed more installation package of different linux distribution (such as ubuntu, centos, debian, gentoo and so on). We recommend to use Docker images to deploy PaddlePaddle.
## Docker installation
Docker is a tool designed to make it easier to create, deploy, and run applications by using containers. PaddlePaddle provide the `Docker <https://www.docker.com/>`_ image. `Docker`_ is a lightweight container utilities. The performance of PaddlePaddle in `Docker`_ container is basically as same as run it in a normal linux. The `Docker`_ is a very convenient way to deliver the binary release for linux programs.
### PaddlePaddle Docker images .. note::
There are six Docker images:
- paddledev/paddle:cpu-latest: PaddlePaddle CPU binary image. The `Docker`_ image is the recommended way to run PaddlePaddle
- paddledev/paddle:gpu-latest: PaddlePaddle GPU binary image.
- paddledev/paddle:cpu-devel-latest: PaddlePaddle CPU binary image plus source code.
- paddledev/paddle:gpu-devel-latest: PaddlePaddle GPU binary image plus source code.
- paddledev/paddle:cpu-demo-latest: PaddlePaddle CPU binary image plus source code and demo
- paddledev/paddle:gpu-demo-latest: PaddlePaddle GPU binary image plus source code and demo
Tags with latest will be replaced by a released version. PaddlePaddle Docker images
--------------------------
### Download and Run Docker images There are 12 `images <https://hub.docker.com/r/paddledev/paddle/tags/>`_ for PaddlePaddle, and the name is :code:`paddle-dev/paddle`, tags are\:
+-----------------+------------------+------------------------+-----------------------+
| | normal | devel | demo |
+=================+==================+========================+=======================+
| CPU | cpu-latest | cpu-devel-latest | cpu-demo-latest |
+-----------------+------------------+------------------------+-----------------------+
| GPU | gpu-latest | gpu-devel-latest | gpu-demo-latest |
+-----------------+------------------+------------------------+-----------------------+
| CPU WITHOUT AVX | cpu-noavx-latest | cpu-devel-noavx-latest | cpu-demo-noavx-latest |
+-----------------+------------------+------------------------+-----------------------+
| GPU WITHOUT AVX | gpu-noavx-latest | gpu-devel-noavx-latest | gpu-demo-noavx-latest |
+-----------------+------------------+------------------------+-----------------------+
And the three columns are:
* normal\: The docker image only contains binary of PaddlePaddle.
* devel\: The docker image contains PaddlePaddle binary, source code and essential build environment.
* demo\: The docker image contains the dependencies to run PaddlePaddle demo.
And the four rows are:
* CPU\: CPU Version. Support CPU which has :code:`AVX` instructions.
* GPU\: GPU Version. Support GPU, and cpu has :code:`AVX` instructions.
* CPU WITHOUT AVX\: CPU Version, which support most CPU even doesn't have :code:`AVX` instructions.
* GPU WITHOUT AVX\: GPU Version, which support most CPU even doesn't have :code:`AVX` instructions.
User can choose any version depends on machine. The following script can help you to detect your CPU support :code:`AVX` or not.
.. code-block:: bash
if cat /proc/cpuinfo | grep -q avx ; then echo "Support AVX"; else echo "Not support AVX"; fi
If the output is :code:`Support AVX`, then you can choose the AVX version of PaddlePaddle, otherwise, you need select :code:`noavx` version of PaddlePaddle. For example, the CPU develop version of PaddlePaddle is :code:`paddle-dev/paddle:cpu-devel-latest`.
The PaddlePaddle images don't contain any entry command. You need to write your entry command to use this image. See :code:`Remote Access` part or just use following command to run a :code:`bash`
.. code-block:: bash
docker run -it paddledev/paddle:cpu-latest /bin/bash
Download and Run Docker images
------------------------------
You have to install Docker in your machine which has linux kernel version 3.10+ first. You can refer to the official guide https://docs.docker.com/engine/installation/ for further information. You have to install Docker in your machine which has linux kernel version 3.10+ first. You can refer to the official guide https://docs.docker.com/engine/installation/ for further information.
You can use ```docker pull ```to download images first, or just launch a container with ```docker run```: You can use :code:`docker pull ` to download images first, or just launch a container with :code:`docker run` \:
```bash
docker run -it paddledev/paddle:cpu-latest .. code-block:: bash
```
docker run -it paddledev/paddle:cpu-latest
If you want to launch container with GPU support, you need to set some environment variables at the same time: If you want to launch container with GPU support, you need to set some environment variables at the same time:
```bash .. code-block:: bash
export CUDA_SO="$(\ls /usr/lib64/libcuda* | xargs -I{} echo '-v {}:{}') $(\ls /usr/lib64/libnvidia* | xargs -I{} echo '-v {}:{}"
export DEVICES=$(\ls /dev/nvidia* | xargs -I{} echo '--device {}:{}') export CUDA_SO="$(\ls /usr/lib64/libcuda* | xargs -I{} echo '-v {}:{}') $(\ls /usr/lib64/libnvidia* | xargs -I{} echo '-v {}:{}"
docker run -it paddledev/paddle:gpu-latest export DEVICES=$(\ls /dev/nvidia* | xargs -I{} echo '--device {}:{}')
``` docker run ${CUDA_SO} ${DEVICES} -it paddledev/paddle:gpu-latest
### Notice
#### Performance Some notes for docker
---------------------
Performance
+++++++++++
Since Docker is based on the lightweight virtual containers, the CPU computing performance maintains well. And GPU driver and equipments are all mapped to the container, so the GPU computing performance would not be seriously affected. Since Docker is based on the lightweight virtual containers, the CPU computing performance maintains well. And GPU driver and equipments are all mapped to the container, so the GPU computing performance would not be seriously affected.
...@@ -45,47 +87,36 @@ If you use high performance nic, such as RDMA(RoCE 40GbE or IB 56GbE), Ethernet( ...@@ -45,47 +87,36 @@ If you use high performance nic, such as RDMA(RoCE 40GbE or IB 56GbE), Ethernet(
#### Remote access Remote access
If you want to enable ssh access background, you need to build an image by yourself. Please refer to official guide https://docs.docker.com/engine/reference/builder/ for further information. +++++++++++++
Following is a simple Dockerfile with ssh:
```bash
FROM paddledev/paddle
MAINTAINER PaddlePaddle dev team <paddle-dev@baidu.com> If you want to enable ssh access background, you need to build an image by yourself. Please refer to official guide https://docs.docker.com/engine/reference/builder/ for further information.
RUN apt-get update Following is a simple Dockerfile with ssh:
RUN apt-get install -y openssh-server
RUN mkdir /var/run/sshd
RUN echo 'root:root' | chpasswd
RUN sed -ri 's/^PermitRootLogin\s+.*/PermitRootLogin yes/' /etc/ssh/sshd_config .. literalinclude:: ../../doc_cn/build_and_install/install/paddle_ssh.Dockerfile
RUN sed -ri 's/UsePAM yes/#UsePAM yes/g' /etc/ssh/sshd_config
EXPOSE 22 Then you can build an image with Dockerfile and launch a container:
CMD ["/usr/sbin/sshd", "-D"] .. code-block:: bash
```
Then you can build an image with Dockerfile and launch a container: # cd into Dockerfile directory
docker build . -t paddle_ssh
# run container, and map host machine port 8022 to container port 22
docker run -d -p 8022:22 --name paddle_ssh_machine paddle_ssh
```bash
# cd into Dockerfile directory
docker build . -t paddle_ssh
# run container, and map host machine port 8022 to container port 22
docker run -d -p 8022:22 --name paddle_ssh_machine paddle_ssh
```
Now, you can ssh on port 8022 to access the container, username is root, password is also root: Now, you can ssh on port 8022 to access the container, username is root, password is also root:
```bash .. code-block:: bash
ssh -p 8022 root@YOUR_HOST_MACHINE
```
ssh -p 8022 root@YOUR_HOST_MACHINE
You can stop and delete the container as following: You can stop and delete the container as following:
```bash
# stop .. code-block:: bash
docker stop paddle_ssh_machine
# delete # stop
docker rm paddle_ssh_machine docker stop paddle_ssh_machine
``` # delete
docker rm paddle_ssh_machine
...@@ -10,31 +10,24 @@ Install PaddlePaddle ...@@ -10,31 +10,24 @@ Install PaddlePaddle
install_* install_*
internal/install_from_jumbo.md internal/install_from_jumbo.md
docker_install.rst
ubuntu_install.rst
Build from Source Build from Source
----------------- -----------------
If you want to hack and contribute PaddlePaddle source code, following guides can help you\: .. warning::
.. toctree:: Please use :code:`deb` package or :code:`docker` image to install paddle. The building guide is used for hacking or contributing to PaddlePaddle.
:maxdepth: 1
:glob:
build_from_source.md If you want to hack and contribute PaddlePaddle source code, following guides can help you\:
contribute_to_paddle.md
Docker and Debian Package installation
--------------------------------------
Note: The installation packages are still in pre-release
state and your experience of installation may not be smooth.
If you want to pack docker image, the following guide can help you\:
.. toctree:: .. toctree::
:maxdepth: 1 :maxdepth: 1
:glob: :glob:
docker_install.md build_from_source.md
ubuntu_install.md contribute_to_paddle.md
Debian Package installation guide Debian Package installation guide
================================= =================================
## Debian Package installation PaddlePaddle supports :code:`deb` pacakge. The installation of this :code:`deb` package is tested in ubuntu 14.04, but it should be support other debian based linux, too.
Currently , PaddlePaddle only provides ubuntu14.04 debian packages.
There are two versions package, including CPU and GPU. The download address is:
https://github.com/baidu/Paddle/releases/tag/V0.8.0b0 There are four versions of debian package, :code:`cpu`, :code:`gpu`, :code:`cpu-noavx`, :code:`gpu-noavx`. And :code:`noavx` version is used to support CPU which does not contain :code:`AVX` instructions. The download url of :code:`deb` package is \: https://github.com/baidu/Paddle/releases/
After downloading PaddlePaddle deb packages, you can run: After downloading PaddlePaddle deb packages, you can use :code:`gdebi` install.
```bash .. code-block:: bash
dpkg -i paddle-0.8.0b-cpu.deb
apt-get install -f gdebi paddle-*.deb
```
And if you use GPU version deb package, you need to install CUDA toolkit and cuDNN, and set related environment variables(such as LD_LIBRARY_PATH) first. It is normal when `dpkg -i` get errors. `apt-get install -f` will continue install paddle, and install dependences. If :code:`gdebi` is not installed, you can use :code:`sudo apt-get install gdebi` to install it.
Or you can use following commands to install PaddlePaddle.
**Note** .. code-block:: bash
dpkg -i paddle-*.deb
apt-get install -f
And if you use GPU version deb package, you need to install CUDA toolkit and cuDNN, and set related environment variables(such as LD_LIBRARY_PATH) first. It is normal when `dpkg -i` get errors. `apt-get install -f` will continue install paddle, and install dependences.
PaddlePaddle package only supports x86 CPU with AVX instructions. If not, you have to download and build from source code.
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<link rel="top" title="PaddlePaddle documentation" href="../index.html" /> <link rel="top" title="PaddlePaddle documentation" href="../index.html" />
<link rel="up" title="Build And Install PaddlePaddle" href="index.html" /> <link rel="up" title="Build And Install PaddlePaddle" href="index.html" />
<link rel="next" title="Contribute to PaddlePaddle" href="contribute_to_paddle.html" /> <link rel="next" title="Contribute to PaddlePaddle" href="contribute_to_paddle.html" />
<link rel="prev" title="Build And Install PaddlePaddle" href="index.html" /> <link rel="prev" title="Debian Package installation guide" href="ubuntu_install.html" />
<script> <script>
var _hmt = _hmt || []; var _hmt = _hmt || [];
(function() { (function() {
...@@ -55,7 +55,7 @@ var _hmt = _hmt || []; ...@@ -55,7 +55,7 @@ var _hmt = _hmt || [];
<a href="contribute_to_paddle.html" title="Contribute to PaddlePaddle" <a href="contribute_to_paddle.html" title="Contribute to PaddlePaddle"
accesskey="N">next</a> |</li> accesskey="N">next</a> |</li>
<li class="right" > <li class="right" >
<a href="index.html" title="Build And Install PaddlePaddle" <a href="ubuntu_install.html" title="Debian Package installation guide"
accesskey="P">previous</a> |</li> accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">PaddlePaddle documentation</a> &#187;</li> <li class="nav-item nav-item-0"><a href="../index.html">PaddlePaddle documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Build And Install PaddlePaddle</a> &#187;</li> <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Build And Install PaddlePaddle</a> &#187;</li>
...@@ -398,8 +398,8 @@ sudo paddle version ...@@ -398,8 +398,8 @@ sudo paddle version
</ul> </ul>
<h4>Previous topic</h4> <h4>Previous topic</h4>
<p class="topless"><a href="index.html" <p class="topless"><a href="ubuntu_install.html"
title="previous chapter">Build And Install PaddlePaddle</a></p> title="previous chapter">Debian Package installation guide</a></p>
<h4>Next topic</h4> <h4>Next topic</h4>
<p class="topless"><a href="contribute_to_paddle.html" <p class="topless"><a href="contribute_to_paddle.html"
title="next chapter">Contribute to PaddlePaddle</a></p> title="next chapter">Contribute to PaddlePaddle</a></p>
...@@ -437,7 +437,7 @@ sudo paddle version ...@@ -437,7 +437,7 @@ sudo paddle version
<a href="contribute_to_paddle.html" title="Contribute to PaddlePaddle" <a href="contribute_to_paddle.html" title="Contribute to PaddlePaddle"
>next</a> |</li> >next</a> |</li>
<li class="right" > <li class="right" >
<a href="index.html" title="Build And Install PaddlePaddle" <a href="ubuntu_install.html" title="Debian Package installation guide"
>previous</a> |</li> >previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">PaddlePaddle documentation</a> &#187;</li> <li class="nav-item nav-item-0"><a href="../index.html">PaddlePaddle documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" >Build And Install PaddlePaddle</a> &#187;</li> <li class="nav-item nav-item-1"><a href="index.html" >Build And Install PaddlePaddle</a> &#187;</li>
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<link rel="top" title="PaddlePaddle documentation" href="../index.html" /> <link rel="top" title="PaddlePaddle documentation" href="../index.html" />
<link rel="up" title="Build And Install PaddlePaddle" href="index.html" /> <link rel="up" title="Build And Install PaddlePaddle" href="index.html" />
<link rel="next" title="Docker installation guide" href="docker_install.html" /> <link rel="next" title="User Interface" href="../ui/index.html" />
<link rel="prev" title="Installing from Sources" href="build_from_source.html" /> <link rel="prev" title="Installing from Sources" href="build_from_source.html" />
<script> <script>
var _hmt = _hmt || []; var _hmt = _hmt || [];
...@@ -52,7 +52,7 @@ var _hmt = _hmt || []; ...@@ -52,7 +52,7 @@ var _hmt = _hmt || [];
<a href="../py-modindex.html" title="Python Module Index" <a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li> >modules</a> |</li>
<li class="right" > <li class="right" >
<a href="docker_install.html" title="Docker installation guide" <a href="../ui/index.html" title="User Interface"
accesskey="N">next</a> |</li> accesskey="N">next</a> |</li>
<li class="right" > <li class="right" >
<a href="build_from_source.html" title="Installing from Sources" <a href="build_from_source.html" title="Installing from Sources"
...@@ -190,8 +190,8 @@ git push -f origin HEAD ...@@ -190,8 +190,8 @@ git push -f origin HEAD
<p class="topless"><a href="build_from_source.html" <p class="topless"><a href="build_from_source.html"
title="previous chapter">Installing from Sources</a></p> title="previous chapter">Installing from Sources</a></p>
<h4>Next topic</h4> <h4>Next topic</h4>
<p class="topless"><a href="docker_install.html" <p class="topless"><a href="../ui/index.html"
title="next chapter">Docker installation guide</a></p> title="next chapter">User Interface</a></p>
<div role="note" aria-label="source link"> <div role="note" aria-label="source link">
<h3>This Page</h3> <h3>This Page</h3>
<ul class="this-page-menu"> <ul class="this-page-menu">
...@@ -223,7 +223,7 @@ git push -f origin HEAD ...@@ -223,7 +223,7 @@ git push -f origin HEAD
<a href="../py-modindex.html" title="Python Module Index" <a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li> >modules</a> |</li>
<li class="right" > <li class="right" >
<a href="docker_install.html" title="Docker installation guide" <a href="../ui/index.html" title="User Interface"
>next</a> |</li> >next</a> |</li>
<li class="right" > <li class="right" >
<a href="build_from_source.html" title="Installing from Sources" <a href="build_from_source.html" title="Installing from Sources"
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<link rel="top" title="PaddlePaddle documentation" href="../index.html" /> <link rel="top" title="PaddlePaddle documentation" href="../index.html" />
<link rel="up" title="Build And Install PaddlePaddle" href="index.html" /> <link rel="up" title="Build And Install PaddlePaddle" href="index.html" />
<link rel="next" title="Debian Package installation guide" href="ubuntu_install.html" /> <link rel="next" title="Debian Package installation guide" href="ubuntu_install.html" />
<link rel="prev" title="Contribute to PaddlePaddle" href="contribute_to_paddle.html" /> <link rel="prev" title="Build And Install PaddlePaddle" href="index.html" />
<script> <script>
var _hmt = _hmt || []; var _hmt = _hmt || [];
(function() { (function() {
...@@ -55,7 +55,7 @@ var _hmt = _hmt || []; ...@@ -55,7 +55,7 @@ var _hmt = _hmt || [];
<a href="ubuntu_install.html" title="Debian Package installation guide" <a href="ubuntu_install.html" title="Debian Package installation guide"
accesskey="N">next</a> |</li> accesskey="N">next</a> |</li>
<li class="right" > <li class="right" >
<a href="contribute_to_paddle.html" title="Contribute to PaddlePaddle" <a href="index.html" title="Build And Install PaddlePaddle"
accesskey="P">previous</a> |</li> accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">PaddlePaddle documentation</a> &#187;</li> <li class="nav-item nav-item-0"><a href="../index.html">PaddlePaddle documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Build And Install PaddlePaddle</a> &#187;</li> <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Build And Install PaddlePaddle</a> &#187;</li>
...@@ -68,64 +68,115 @@ var _hmt = _hmt || []; ...@@ -68,64 +68,115 @@ var _hmt = _hmt || [];
<div class="body" role="main"> <div class="body" role="main">
<div class="section" id="docker-installation-guide"> <div class="section" id="docker-installation-guide">
<span id="docker-installation-guide"></span><h1>Docker installation guide<a class="headerlink" href="#docker-installation-guide" title="Permalink to this headline"></a></h1> <h1>Docker installation guide<a class="headerlink" href="#docker-installation-guide" title="Permalink to this headline"></a></h1>
<p>PaddlePaddle provides some pre-compiled binary, including Docker images, ubuntu deb packages. It is welcomed to contributed more installation package of different linux distribution (such as ubuntu, centos, debian, gentoo and so on). We recommend to use Docker images to deploy PaddlePaddle.</p> <p>PaddlePaddle provide the <a class="reference external" href="https://www.docker.com/">Docker</a> image. <a class="reference external" href="https://www.docker.com/">Docker</a> is a lightweight container utilities. The performance of PaddlePaddle in <a class="reference external" href="https://www.docker.com/">Docker</a> container is basically as same as run it in a normal linux. The <a class="reference external" href="https://www.docker.com/">Docker</a> is a very convenient way to deliver the binary release for linux programs.</p>
<div class="section" id="docker-installation"> <div class="admonition note">
<span id="docker-installation"></span><h2>Docker installation<a class="headerlink" href="#docker-installation" title="Permalink to this headline"></a></h2> <p class="first admonition-title">Note</p>
<p>Docker is a tool designed to make it easier to create, deploy, and run applications by using containers.</p> <p class="last">The <a class="reference external" href="https://www.docker.com/">Docker</a> image is the recommended way to run PaddlePaddle</p>
</div>
<div class="section" id="paddlepaddle-docker-images"> <div class="section" id="paddlepaddle-docker-images">
<span id="paddlepaddle-docker-images"></span><h3>PaddlePaddle Docker images<a class="headerlink" href="#paddlepaddle-docker-images" title="Permalink to this headline"></a></h3> <h2>PaddlePaddle Docker images<a class="headerlink" href="#paddlepaddle-docker-images" title="Permalink to this headline"></a></h2>
<p>There are six Docker images:</p> <p>There are 12 <a class="reference external" href="https://hub.docker.com/r/paddledev/paddle/tags/">images</a> for PaddlePaddle, and the name is <code class="code docutils literal"><span class="pre">paddle-dev/paddle</span></code>, tags are:</p>
<table border="1" class="docutils">
<colgroup>
<col width="21%" />
<col width="22%" />
<col width="29%" />
<col width="28%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">&nbsp;</th>
<th class="head">normal</th>
<th class="head">devel</th>
<th class="head">demo</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>CPU</td>
<td>cpu-latest</td>
<td>cpu-devel-latest</td>
<td>cpu-demo-latest</td>
</tr>
<tr class="row-odd"><td>GPU</td>
<td>gpu-latest</td>
<td>gpu-devel-latest</td>
<td>gpu-demo-latest</td>
</tr>
<tr class="row-even"><td>CPU WITHOUT AVX</td>
<td>cpu-noavx-latest</td>
<td>cpu-devel-noavx-latest</td>
<td>cpu-demo-noavx-latest</td>
</tr>
<tr class="row-odd"><td>GPU WITHOUT AVX</td>
<td>gpu-noavx-latest</td>
<td>gpu-devel-noavx-latest</td>
<td>gpu-demo-noavx-latest</td>
</tr>
</tbody>
</table>
<p>And the three columns are:</p>
<ul class="simple">
<li>normal: The docker image only contains binary of PaddlePaddle.</li>
<li>devel: The docker image contains PaddlePaddle binary, source code and essential build environment.</li>
<li>demo: The docker image contains the dependencies to run PaddlePaddle demo.</li>
</ul>
<p>And the four rows are:</p>
<ul class="simple"> <ul class="simple">
<li>paddledev/paddle:cpu-latest: PaddlePaddle CPU binary image.</li> <li>CPU: CPU Version. Support CPU which has <code class="code docutils literal"><span class="pre">AVX</span></code> instructions.</li>
<li>paddledev/paddle:gpu-latest: PaddlePaddle GPU binary image.</li> <li>GPU: GPU Version. Support GPU, and cpu has <code class="code docutils literal"><span class="pre">AVX</span></code> instructions.</li>
<li>paddledev/paddle:cpu-devel-latest: PaddlePaddle CPU binary image plus source code.</li> <li>CPU WITHOUT AVX: CPU Version, which support most CPU even doesn&#8217;t have <code class="code docutils literal"><span class="pre">AVX</span></code> instructions.</li>
<li>paddledev/paddle:gpu-devel-latest: PaddlePaddle GPU binary image plus source code.</li> <li>GPU WITHOUT AVX: GPU Version, which support most CPU even doesn&#8217;t have <code class="code docutils literal"><span class="pre">AVX</span></code> instructions.</li>
<li>paddledev/paddle:cpu-demo-latest: PaddlePaddle CPU binary image plus source code and demo</li>
<li>paddledev/paddle:gpu-demo-latest: PaddlePaddle GPU binary image plus source code and demo</li>
</ul> </ul>
<p>Tags with latest will be replaced by a released version.</p> <p>User can choose any version depends on machine. The following script can help you to detect your CPU support <code class="code docutils literal"><span class="pre">AVX</span></code> or not.</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span><span class="k">if</span> cat /proc/cpuinfo <span class="p">|</span> grep -q avx <span class="p">;</span> <span class="k">then</span> <span class="nb">echo</span> <span class="s2">&quot;Support AVX&quot;</span><span class="p">;</span> <span class="k">else</span> <span class="nb">echo</span> <span class="s2">&quot;Not support AVX&quot;</span><span class="p">;</span> <span class="k">fi</span>
</pre></div>
</div>
<p>If the output is <code class="code docutils literal"><span class="pre">Support</span> <span class="pre">AVX</span></code>, then you can choose the AVX version of PaddlePaddle, otherwise, you need select <code class="code docutils literal"><span class="pre">noavx</span></code> version of PaddlePaddle. For example, the CPU develop version of PaddlePaddle is <code class="code docutils literal"><span class="pre">paddle-dev/paddle:cpu-devel-latest</span></code>.</p>
<p>The PaddlePaddle images don&#8217;t contain any entry command. You need to write your entry command to use this image. See <code class="code docutils literal"><span class="pre">Remote</span> <span class="pre">Access</span></code> part or just use following command to run a <code class="code docutils literal"><span class="pre">bash</span></code></p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>docker run -it paddledev/paddle:cpu-latest /bin/bash
</pre></div>
</div>
</div> </div>
<div class="section" id="download-and-run-docker-images"> <div class="section" id="download-and-run-docker-images">
<span id="download-and-run-docker-images"></span><h3>Download and Run Docker images<a class="headerlink" href="#download-and-run-docker-images" title="Permalink to this headline"></a></h3> <h2>Download and Run Docker images<a class="headerlink" href="#download-and-run-docker-images" title="Permalink to this headline"></a></h2>
<p>You have to install Docker in your machine which has linux kernel version 3.10+ first. You can refer to the official guide https://docs.docker.com/engine/installation/ for further information.</p> <p>You have to install Docker in your machine which has linux kernel version 3.10+ first. You can refer to the official guide <a class="reference external" href="https://docs.docker.com/engine/installation/">https://docs.docker.com/engine/installation/</a> for further information.</p>
<p>You can use <code class="docutils literal"><span class="pre">docker</span> <span class="pre">pull</span></code>to download images first, or just launch a container with <code class="docutils literal"><span class="pre">docker</span> <span class="pre">run</span></code>:</p> <p>You can use <code class="code docutils literal"><span class="pre">docker</span> <span class="pre">pull</span> <span class="pre">`</span> <span class="pre">to</span> <span class="pre">download</span> <span class="pre">images</span> <span class="pre">first,</span> <span class="pre">or</span> <span class="pre">just</span> <span class="pre">launch</span> <span class="pre">a</span> <span class="pre">container</span> <span class="pre">with</span> <span class="pre">:code:`docker</span> <span class="pre">run</span></code> :</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>docker run -it paddledev/paddle:cpu-latest <div class="highlight-bash"><div class="highlight"><pre><span></span>docker run -it paddledev/paddle:cpu-latest
</pre></div> </pre></div>
</div> </div>
<p>If you want to launch container with GPU support, you need to set some environment variables at the same time:</p> <p>If you want to launch container with GPU support, you need to set some environment variables at the same time:</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>export CUDA_SO=&quot;$(\ls /usr/lib64/libcuda* | xargs -I{} echo &#39;-v {}:{}&#39;) $(\ls /usr/lib64/libnvidia* | xargs -I{} echo &#39;-v {}:{}&quot; <div class="highlight-bash"><div class="highlight"><pre><span></span>export CUDA_SO=&quot;$(\ls /usr/lib64/libcuda* | xargs -I{} echo &#39;-v {}:{}&#39;) $(\ls /usr/lib64/libnvidia* | xargs -I{} echo &#39;-v {}:{}&quot;
export DEVICES=$(\ls /dev/nvidia* | xargs -I{} echo &#39;--device {}:{}&#39;) export DEVICES=$(\ls /dev/nvidia* | xargs -I{} echo &#39;--device {}:{}&#39;)
docker run -it paddledev/paddle:gpu-latest docker run ${CUDA_SO} ${DEVICES} -it paddledev/paddle:gpu-latest
</pre></div> </pre></div>
</div> </div>
</div> </div>
<div class="section" id="notice"> <div class="section" id="some-notes-for-docker">
<span id="notice"></span><h3>Notice<a class="headerlink" href="#notice" title="Permalink to this headline"></a></h3> <h2>Some notes for docker<a class="headerlink" href="#some-notes-for-docker" title="Permalink to this headline"></a></h2>
<div class="section" id="performance"> <div class="section" id="performance">
<span id="performance"></span><h4>Performance<a class="headerlink" href="#performance" title="Permalink to this headline"></a></h4> <h3>Performance<a class="headerlink" href="#performance" title="Permalink to this headline"></a></h3>
<p>Since Docker is based on the lightweight virtual containers, the CPU computing performance maintains well. And GPU driver and equipments are all mapped to the container, so the GPU computing performance would not be seriously affected.</p> <p>Since Docker is based on the lightweight virtual containers, the CPU computing performance maintains well. And GPU driver and equipments are all mapped to the container, so the GPU computing performance would not be seriously affected.</p>
<p>If you use high performance nic, such as RDMA(RoCE 40GbE or IB 56GbE), Ethernet(10GbE), it is recommended to use config &#8220;-net = host&#8221;.</p> <p>If you use high performance nic, such as RDMA(RoCE 40GbE or IB 56GbE), Ethernet(10GbE), it is recommended to use config &#8220;-net = host&#8221;.</p>
</div> </div>
<div class="section" id="remote-access"> <div class="section" id="remote-access">
<span id="remote-access"></span><h4>Remote access<a class="headerlink" href="#remote-access" title="Permalink to this headline"></a></h4> <h3>Remote access<a class="headerlink" href="#remote-access" title="Permalink to this headline"></a></h3>
<p>If you want to enable ssh access background, you need to build an image by yourself. Please refer to official guide https://docs.docker.com/engine/reference/builder/ for further information.</p> <p>If you want to enable ssh access background, you need to build an image by yourself. Please refer to official guide <a class="reference external" href="https://docs.docker.com/engine/reference/builder/">https://docs.docker.com/engine/reference/builder/</a> for further information.</p>
<p>Following is a simple Dockerfile with ssh:</p> <p>Following is a simple Dockerfile with ssh:</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>FROM paddledev/paddle <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">FROM</span> <span class="n">paddledev</span><span class="o">/</span><span class="n">paddle</span><span class="p">:</span><span class="n">cpu</span><span class="o">-</span><span class="n">latest</span>
MAINTAINER PaddlePaddle dev team &lt;paddle-dev@baidu.com&gt; <span class="n">MAINTAINER</span> <span class="n">PaddlePaddle</span> <span class="n">dev</span> <span class="n">team</span> <span class="o">&lt;</span><span class="n">paddle</span><span class="o">-</span><span class="n">dev</span><span class="nd">@baidu</span><span class="o">.</span><span class="n">com</span><span class="o">&gt;</span>
RUN apt-get update <span class="n">RUN</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">update</span>
RUN apt-get install -y openssh-server <span class="n">RUN</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="o">-</span><span class="n">y</span> <span class="n">openssh</span><span class="o">-</span><span class="n">server</span>
RUN mkdir /var/run/sshd <span class="n">RUN</span> <span class="n">mkdir</span> <span class="o">/</span><span class="n">var</span><span class="o">/</span><span class="n">run</span><span class="o">/</span><span class="n">sshd</span>
RUN <span class="nb">echo</span> <span class="s1">&#39;root:root&#39;</span> <span class="p">|</span> chpasswd <span class="n">RUN</span> <span class="n">echo</span> <span class="s1">&#39;root:root&#39;</span> <span class="o">|</span> <span class="n">chpasswd</span>
RUN sed -ri <span class="s1">&#39;s/^PermitRootLogin\s+.*/PermitRootLogin yes/&#39;</span> /etc/ssh/sshd_config <span class="n">RUN</span> <span class="n">sed</span> <span class="o">-</span><span class="n">ri</span> <span class="s1">&#39;s/^PermitRootLogin\s+.*/PermitRootLogin yes/&#39;</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">ssh</span><span class="o">/</span><span class="n">sshd_config</span>
RUN sed -ri <span class="s1">&#39;s/UsePAM yes/#UsePAM yes/g&#39;</span> /etc/ssh/sshd_config <span class="n">RUN</span> <span class="n">sed</span> <span class="o">-</span><span class="n">ri</span> <span class="s1">&#39;s/UsePAM yes/#UsePAM yes/g&#39;</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">ssh</span><span class="o">/</span><span class="n">sshd_config</span>
EXPOSE 22 <span class="n">EXPOSE</span> <span class="mi">22</span>
CMD <span class="o">[</span><span class="s2">&quot;/usr/sbin/sshd&quot;</span>, <span class="s2">&quot;-D&quot;</span><span class="o">]</span> <span class="n">CMD</span> <span class="p">[</span><span class="s2">&quot;/usr/sbin/sshd&quot;</span><span class="p">,</span> <span class="s2">&quot;-D&quot;</span><span class="p">]</span>
</pre></div> </pre></div>
</div> </div>
<p>Then you can build an image with Dockerfile and launch a container:</p> <p>Then you can build an image with Dockerfile and launch a container:</p>
...@@ -148,7 +199,6 @@ docker rm paddle_ssh_machine ...@@ -148,7 +199,6 @@ docker rm paddle_ssh_machine
</div> </div>
</div> </div>
</div> </div>
</div>
</div> </div>
...@@ -160,23 +210,20 @@ docker rm paddle_ssh_machine ...@@ -160,23 +210,20 @@ docker rm paddle_ssh_machine
<h3><a href="../index.html">Table Of Contents</a></h3> <h3><a href="../index.html">Table Of Contents</a></h3>
<ul> <ul>
<li><a class="reference internal" href="#">Docker installation guide</a><ul> <li><a class="reference internal" href="#">Docker installation guide</a><ul>
<li><a class="reference internal" href="#docker-installation">Docker installation</a><ul>
<li><a class="reference internal" href="#paddlepaddle-docker-images">PaddlePaddle Docker images</a></li> <li><a class="reference internal" href="#paddlepaddle-docker-images">PaddlePaddle Docker images</a></li>
<li><a class="reference internal" href="#download-and-run-docker-images">Download and Run Docker images</a></li> <li><a class="reference internal" href="#download-and-run-docker-images">Download and Run Docker images</a></li>
<li><a class="reference internal" href="#notice">Notice</a><ul> <li><a class="reference internal" href="#some-notes-for-docker">Some notes for docker</a><ul>
<li><a class="reference internal" href="#performance">Performance</a></li> <li><a class="reference internal" href="#performance">Performance</a></li>
<li><a class="reference internal" href="#remote-access">Remote access</a></li> <li><a class="reference internal" href="#remote-access">Remote access</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>
</li> </li>
</ul>
</li>
</ul> </ul>
<h4>Previous topic</h4> <h4>Previous topic</h4>
<p class="topless"><a href="contribute_to_paddle.html" <p class="topless"><a href="index.html"
title="previous chapter">Contribute to PaddlePaddle</a></p> title="previous chapter">Build And Install PaddlePaddle</a></p>
<h4>Next topic</h4> <h4>Next topic</h4>
<p class="topless"><a href="ubuntu_install.html" <p class="topless"><a href="ubuntu_install.html"
title="next chapter">Debian Package installation guide</a></p> title="next chapter">Debian Package installation guide</a></p>
...@@ -214,7 +261,7 @@ docker rm paddle_ssh_machine ...@@ -214,7 +261,7 @@ docker rm paddle_ssh_machine
<a href="ubuntu_install.html" title="Debian Package installation guide" <a href="ubuntu_install.html" title="Debian Package installation guide"
>next</a> |</li> >next</a> |</li>
<li class="right" > <li class="right" >
<a href="contribute_to_paddle.html" title="Contribute to PaddlePaddle" <a href="index.html" title="Build And Install PaddlePaddle"
>previous</a> |</li> >previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">PaddlePaddle documentation</a> &#187;</li> <li class="nav-item nav-item-0"><a href="../index.html">PaddlePaddle documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" >Build And Install PaddlePaddle</a> &#187;</li> <li class="nav-item nav-item-1"><a href="index.html" >Build And Install PaddlePaddle</a> &#187;</li>
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<script type="text/javascript" src="../_static/doctools.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> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<link rel="top" title="PaddlePaddle documentation" href="../index.html" /> <link rel="top" title="PaddlePaddle documentation" href="../index.html" />
<link rel="next" title="Installing from Sources" href="build_from_source.html" /> <link rel="next" title="Docker installation guide" href="docker_install.html" />
<link rel="prev" title="Quick Start Tutorial" href="../demo/quick_start/index_en.html" /> <link rel="prev" title="Quick Start Tutorial" href="../demo/quick_start/index_en.html" />
<script> <script>
var _hmt = _hmt || []; var _hmt = _hmt || [];
...@@ -51,7 +51,7 @@ var _hmt = _hmt || []; ...@@ -51,7 +51,7 @@ var _hmt = _hmt || [];
<a href="../py-modindex.html" title="Python Module Index" <a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li> >modules</a> |</li>
<li class="right" > <li class="right" >
<a href="build_from_source.html" title="Installing from Sources" <a href="docker_install.html" title="Docker installation guide"
accesskey="N">next</a> |</li> accesskey="N">next</a> |</li>
<li class="right" > <li class="right" >
<a href="../demo/quick_start/index_en.html" title="Quick Start Tutorial" <a href="../demo/quick_start/index_en.html" title="Quick Start Tutorial"
...@@ -70,10 +70,18 @@ var _hmt = _hmt || []; ...@@ -70,10 +70,18 @@ var _hmt = _hmt || [];
<div class="section" id="install-paddlepaddle"> <div class="section" id="install-paddlepaddle">
<h2>Install PaddlePaddle<a class="headerlink" href="#install-paddlepaddle" title="Permalink to this headline"></a></h2> <h2>Install PaddlePaddle<a class="headerlink" href="#install-paddlepaddle" title="Permalink to this headline"></a></h2>
<div class="toctree-wrapper compound"> <div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="docker_install.html">Docker installation guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="ubuntu_install.html">Debian Package installation guide</a></li>
</ul>
</div> </div>
</div> </div>
<div class="section" id="build-from-source"> <div class="section" id="build-from-source">
<h2>Build from Source<a class="headerlink" href="#build-from-source" title="Permalink to this headline"></a></h2> <h2>Build from Source<a class="headerlink" href="#build-from-source" title="Permalink to this headline"></a></h2>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">Please use <code class="code docutils literal"><span class="pre">deb</span></code> package or <code class="code docutils literal"><span class="pre">docker</span></code> image to install paddle. The building guide is used for hacking or contributing to PaddlePaddle.</p>
</div>
<p>If you want to hack and contribute PaddlePaddle source code, following guides can help you:</p> <p>If you want to hack and contribute PaddlePaddle source code, following guides can help you:</p>
<div class="toctree-wrapper compound"> <div class="toctree-wrapper compound">
<ul> <ul>
...@@ -82,18 +90,6 @@ var _hmt = _hmt || []; ...@@ -82,18 +90,6 @@ var _hmt = _hmt || [];
</ul> </ul>
</div> </div>
</div> </div>
<div class="section" id="docker-and-debian-package-installation">
<h2>Docker and Debian Package installation<a class="headerlink" href="#docker-and-debian-package-installation" title="Permalink to this headline"></a></h2>
<p>Note: The installation packages are still in pre-release
state and your experience of installation may not be smooth.</p>
<p>If you want to pack docker image, the following guide can help you:</p>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="docker_install.html">Docker installation guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="ubuntu_install.html">Debian Package installation guide</a></li>
</ul>
</div>
</div>
</div> </div>
...@@ -107,7 +103,6 @@ state and your experience of installation may not be smooth.</p> ...@@ -107,7 +103,6 @@ state and your experience of installation may not be smooth.</p>
<li><a class="reference internal" href="#">Build And Install PaddlePaddle</a><ul> <li><a class="reference internal" href="#">Build And Install PaddlePaddle</a><ul>
<li><a class="reference internal" href="#install-paddlepaddle">Install PaddlePaddle</a></li> <li><a class="reference internal" href="#install-paddlepaddle">Install PaddlePaddle</a></li>
<li><a class="reference internal" href="#build-from-source">Build from Source</a></li> <li><a class="reference internal" href="#build-from-source">Build from Source</a></li>
<li><a class="reference internal" href="#docker-and-debian-package-installation">Docker and Debian Package installation</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>
...@@ -116,8 +111,8 @@ state and your experience of installation may not be smooth.</p> ...@@ -116,8 +111,8 @@ state and your experience of installation may not be smooth.</p>
<p class="topless"><a href="../demo/quick_start/index_en.html" <p class="topless"><a href="../demo/quick_start/index_en.html"
title="previous chapter">Quick Start Tutorial</a></p> title="previous chapter">Quick Start Tutorial</a></p>
<h4>Next topic</h4> <h4>Next topic</h4>
<p class="topless"><a href="build_from_source.html" <p class="topless"><a href="docker_install.html"
title="next chapter">Installing from Sources</a></p> title="next chapter">Docker installation guide</a></p>
<div role="note" aria-label="source link"> <div role="note" aria-label="source link">
<h3>This Page</h3> <h3>This Page</h3>
<ul class="this-page-menu"> <ul class="this-page-menu">
...@@ -149,7 +144,7 @@ state and your experience of installation may not be smooth.</p> ...@@ -149,7 +144,7 @@ state and your experience of installation may not be smooth.</p>
<a href="../py-modindex.html" title="Python Module Index" <a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li> >modules</a> |</li>
<li class="right" > <li class="right" >
<a href="build_from_source.html" title="Installing from Sources" <a href="docker_install.html" title="Docker installation guide"
>next</a> |</li> >next</a> |</li>
<li class="right" > <li class="right" >
<a href="../demo/quick_start/index_en.html" title="Quick Start Tutorial" <a href="../demo/quick_start/index_en.html" title="Quick Start Tutorial"
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<link rel="top" title="PaddlePaddle documentation" href="../index.html" /> <link rel="top" title="PaddlePaddle documentation" href="../index.html" />
<link rel="up" title="Build And Install PaddlePaddle" href="index.html" /> <link rel="up" title="Build And Install PaddlePaddle" href="index.html" />
<link rel="next" title="User Interface" href="../ui/index.html" /> <link rel="next" title="Installing from Sources" href="build_from_source.html" />
<link rel="prev" title="Docker installation guide" href="docker_install.html" /> <link rel="prev" title="Docker installation guide" href="docker_install.html" />
<script> <script>
var _hmt = _hmt || []; var _hmt = _hmt || [];
...@@ -52,7 +52,7 @@ var _hmt = _hmt || []; ...@@ -52,7 +52,7 @@ var _hmt = _hmt || [];
<a href="../py-modindex.html" title="Python Module Index" <a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li> >modules</a> |</li>
<li class="right" > <li class="right" >
<a href="../ui/index.html" title="User Interface" <a href="build_from_source.html" title="Installing from Sources"
accesskey="N">next</a> |</li> accesskey="N">next</a> |</li>
<li class="right" > <li class="right" >
<a href="docker_install.html" title="Docker installation guide" <a href="docker_install.html" title="Docker installation guide"
...@@ -68,21 +68,20 @@ var _hmt = _hmt || []; ...@@ -68,21 +68,20 @@ var _hmt = _hmt || [];
<div class="body" role="main"> <div class="body" role="main">
<div class="section" id="debian-package-installation-guide"> <div class="section" id="debian-package-installation-guide">
<span id="debian-package-installation-guide"></span><h1>Debian Package installation guide<a class="headerlink" href="#debian-package-installation-guide" title="Permalink to this headline"></a></h1> <h1>Debian Package installation guide<a class="headerlink" href="#debian-package-installation-guide" title="Permalink to this headline"></a></h1>
<div class="section" id="debian-package-installation"> <p>PaddlePaddle supports <code class="code docutils literal"><span class="pre">deb</span></code> pacakge. The installation of this <code class="code docutils literal"><span class="pre">deb</span></code> package is tested in ubuntu 14.04, but it should be support other debian based linux, too.</p>
<span id="debian-package-installation"></span><h2>Debian Package installation<a class="headerlink" href="#debian-package-installation" title="Permalink to this headline"></a></h2> <p>There are four versions of debian package, <code class="code docutils literal"><span class="pre">cpu</span></code>, <code class="code docutils literal"><span class="pre">gpu</span></code>, <code class="code docutils literal"><span class="pre">cpu-noavx</span></code>, <code class="code docutils literal"><span class="pre">gpu-noavx</span></code>. And <code class="code docutils literal"><span class="pre">noavx</span></code> version is used to support CPU which does not contain <code class="code docutils literal"><span class="pre">AVX</span></code> instructions. The download url of <code class="code docutils literal"><span class="pre">deb</span></code> package is : <a class="reference external" href="https://github.com/baidu/Paddle/releases/">https://github.com/baidu/Paddle/releases/</a></p>
<p>Currently , PaddlePaddle only provides ubuntu14.04 debian packages. <p>After downloading PaddlePaddle deb packages, you can use <code class="code docutils literal"><span class="pre">gdebi</span></code> install.</p>
There are two versions package, including CPU and GPU. The download address is:</p> <div class="highlight-bash"><div class="highlight"><pre><span></span>gdebi paddle-*.deb
<p>https://github.com/baidu/Paddle/releases/tag/V0.8.0b0</p>
<p>After downloading PaddlePaddle deb packages, you can run:</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>dpkg -i paddle-0.8.0b-cpu.deb
apt-get install -f
</pre></div> </pre></div>
</div> </div>
<p>And if you use GPU version deb package, you need to install CUDA toolkit and cuDNN, and set related environment variables(such as LD_LIBRARY_PATH) first. It is normal when <code class="docutils literal"><span class="pre">dpkg</span> <span class="pre">-i</span></code> get errors. <code class="docutils literal"><span class="pre">apt-get</span> <span class="pre">install</span> <span class="pre">-f</span></code> will continue install paddle, and install dependences.</p> <p>If <code class="code docutils literal"><span class="pre">gdebi</span></code> is not installed, you can use <code class="code docutils literal"><span class="pre">sudo</span> <span class="pre">apt-get</span> <span class="pre">install</span> <span class="pre">gdebi</span></code> to install it.</p>
<p><strong>Note</strong></p> <p>Or you can use following commands to install PaddlePaddle.</p>
<p>PaddlePaddle package only supports x86 CPU with AVX instructions. If not, you have to download and build from source code.</p> <div class="highlight-bash"><div class="highlight"><pre><span></span>dpkg -i paddle-*.deb
apt-get install -f
</pre></div>
</div> </div>
<p>And if you use GPU version deb package, you need to install CUDA toolkit and cuDNN, and set related environment variables(such as LD_LIBRARY_PATH) first. It is normal when <cite>dpkg -i</cite> get errors. <cite>apt-get install -f</cite> will continue install paddle, and install dependences.</p>
</div> </div>
...@@ -91,20 +90,12 @@ apt-get install -f ...@@ -91,20 +90,12 @@ apt-get install -f
</div> </div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation"> <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper"> <div class="sphinxsidebarwrapper">
<h3><a href="../index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Debian Package installation guide</a><ul>
<li><a class="reference internal" href="#debian-package-installation">Debian Package installation</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4> <h4>Previous topic</h4>
<p class="topless"><a href="docker_install.html" <p class="topless"><a href="docker_install.html"
title="previous chapter">Docker installation guide</a></p> title="previous chapter">Docker installation guide</a></p>
<h4>Next topic</h4> <h4>Next topic</h4>
<p class="topless"><a href="../ui/index.html" <p class="topless"><a href="build_from_source.html"
title="next chapter">User Interface</a></p> title="next chapter">Installing from Sources</a></p>
<div role="note" aria-label="source link"> <div role="note" aria-label="source link">
<h3>This Page</h3> <h3>This Page</h3>
<ul class="this-page-menu"> <ul class="this-page-menu">
...@@ -136,7 +127,7 @@ apt-get install -f ...@@ -136,7 +127,7 @@ apt-get install -f
<a href="../py-modindex.html" title="Python Module Index" <a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li> >modules</a> |</li>
<li class="right" > <li class="right" >
<a href="../ui/index.html" title="User Interface" <a href="build_from_source.html" title="Installing from Sources"
>next</a> |</li> >next</a> |</li>
<li class="right" > <li class="right" >
<a href="docker_install.html" title="Docker installation guide" <a href="docker_install.html" title="Docker installation guide"
......
此差异已折叠。
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<link rel="top" title="PaddlePaddle documentation" href="../index.html" /> <link rel="top" title="PaddlePaddle documentation" href="../index.html" />
<link rel="next" title="DataProvider Introduction" href="data_provider/index.html" /> <link rel="next" title="DataProvider Introduction" href="data_provider/index.html" />
<link rel="prev" title="Debian Package installation guide" href="../build/ubuntu_install.html" /> <link rel="prev" title="Contribute to PaddlePaddle" href="../build/contribute_to_paddle.html" />
<script> <script>
var _hmt = _hmt || []; var _hmt = _hmt || [];
(function() { (function() {
...@@ -54,7 +54,7 @@ var _hmt = _hmt || []; ...@@ -54,7 +54,7 @@ var _hmt = _hmt || [];
<a href="data_provider/index.html" title="DataProvider Introduction" <a href="data_provider/index.html" title="DataProvider Introduction"
accesskey="N">next</a> |</li> accesskey="N">next</a> |</li>
<li class="right" > <li class="right" >
<a href="../build/ubuntu_install.html" title="Debian Package installation guide" <a href="../build/contribute_to_paddle.html" title="Contribute to PaddlePaddle"
accesskey="P">previous</a> |</li> accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">PaddlePaddle documentation</a> &#187;</li> <li class="nav-item nav-item-0"><a href="../index.html">PaddlePaddle documentation</a> &#187;</li>
</ul> </ul>
...@@ -122,8 +122,8 @@ var _hmt = _hmt || []; ...@@ -122,8 +122,8 @@ var _hmt = _hmt || [];
</ul> </ul>
<h4>Previous topic</h4> <h4>Previous topic</h4>
<p class="topless"><a href="../build/ubuntu_install.html" <p class="topless"><a href="../build/contribute_to_paddle.html"
title="previous chapter">Debian Package installation guide</a></p> title="previous chapter">Contribute to PaddlePaddle</a></p>
<h4>Next topic</h4> <h4>Next topic</h4>
<p class="topless"><a href="data_provider/index.html" <p class="topless"><a href="data_provider/index.html"
title="next chapter">DataProvider Introduction</a></p> title="next chapter">DataProvider Introduction</a></p>
...@@ -161,7 +161,7 @@ var _hmt = _hmt || []; ...@@ -161,7 +161,7 @@ var _hmt = _hmt || [];
<a href="data_provider/index.html" title="DataProvider Introduction" <a href="data_provider/index.html" title="DataProvider Introduction"
>next</a> |</li> >next</a> |</li>
<li class="right" > <li class="right" >
<a href="../build/ubuntu_install.html" title="Debian Package installation guide" <a href="../build/contribute_to_paddle.html" title="Contribute to PaddlePaddle"
>previous</a> |</li> >previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">PaddlePaddle documentation</a> &#187;</li> <li class="nav-item nav-item-0"><a href="../index.html">PaddlePaddle documentation</a> &#187;</li>
</ul> </ul>
......
编译与安装 编译与安装
======================== ========================
PaddlePaddle提供数个预编译的二进制来进行安装,包括Docker镜像,ubuntu的deb安装包等。我们推荐使用Docker镜像来部署环境,同时欢迎贡献更多的安装包。 安装
++++
Note: The intallation packages are still in pre-release state and your experience of installation may not be smooth.
注意:目前PaddlePaddle的安装包还处在pre-release的状态,使用起来或许会不是很顺畅 PaddlePaddle提供数个预编译的二进制来进行安装,包括Docker镜像,ubuntu的deb安装包等。我们推荐使用Docker镜像来部署环境,同时欢迎贡献更多的安装包
.. toctree:: .. toctree::
:maxdepth: 1 :maxdepth: 1
:glob: :glob:
源码下载(对内) <../build/internal/download_paddle_source_zh_cn.rst>
使用Jumbo安装(对内) <../build/internal/install_from_jumbo.rst> 使用Jumbo安装(对内) <../build/internal/install_from_jumbo.rst>
从源码编译安装(对内) <../build/internal/build_from_source_zh_cn.rst>
install/docker_install.rst install/docker_install.rst
install/ubuntu_install.rst install/ubuntu_install.rst
编译
++++
.. warning::
编译选项主要推荐高级用户查看,普通用户请走安装流程。
.. toctree::
:maxdepth: 1
:glob:
源码下载(对内) <../build/internal/download_paddle_source_zh_cn.rst>
从源码编译安装(对内) <../build/internal/build_from_source_zh_cn.rst>
cmake/index.rst cmake/index.rst
...@@ -14,20 +14,43 @@ PaddlePaddle提供了Docker的使用镜像。PaddlePaddle推荐使用Docker进 ...@@ -14,20 +14,43 @@ PaddlePaddle提供了Docker的使用镜像。PaddlePaddle推荐使用Docker进
PaddlePaddle提供的Docker镜像版本 PaddlePaddle提供的Docker镜像版本
-------------------------------- --------------------------------
我们提供了6个Docker image\: 我们提供了12个 `Docker image <https://hub.docker.com/r/paddledev/paddle/tags/>`_ ,他们的image name都是 :code:`paddle-dev/paddle` ,tag分别为
* paddledev/paddle\:cpu-latest\: PaddlePaddle的CPU二进制 +-----------------+------------------+------------------------+-----------------------+
* paddledev/paddle\:gpu-latest\: PaddlePaddle的GPU二进制 | | normal | devel | demo |
* paddledev/paddle\:cpu-devel-latest\: PaddlePaddle的CPU二进制,同时包含CPU开发环境和源码 +=================+==================+========================+=======================+
* paddledev/paddle\:gpu-devel-latest\: PaddlePaddle的GPU二进制,同时包含GPU开发环境和源码 | CPU | cpu-latest | cpu-devel-latest | cpu-demo-latest |
* paddledev/paddle\:cpu-demo-latest\: PaddlePaddle的CPU二进制,同时包含CPU开发环境、源码和运行demo的必要依赖 +-----------------+------------------+------------------------+-----------------------+
* paddledev/paddle\:gpu-demo-latest\: PaddlePaddle的GPU二进制,同时包含GPU开发环境、源码和运行demo的必要依赖 | GPU | gpu-latest | gpu-devel-latest | gpu-demo-latest |
+-----------------+------------------+------------------------+-----------------------+
| CPU WITHOUT AVX | cpu-noavx-latest | cpu-devel-noavx-latest | cpu-demo-noavx-latest |
+-----------------+------------------+------------------------+-----------------------+
| GPU WITHOUT AVX | gpu-noavx-latest | gpu-devel-noavx-latest | gpu-demo-noavx-latest |
+-----------------+------------------+------------------------+-----------------------+
同时,不同的稳定版本,会将latest替换成稳定版本的版本号。 其中,横向包括三个版本,normal,devel和demo。
* Normal: 正常的Docker image,只包括paddle的二进制
* Devel: 包括Paddle的二进制、编译环境和源代码
* Demo: 包括Paddle运行demo所需要的依赖
纵向包括四个版本,他们是。
* CPU: CPU版本。需要支持AVX指令集的CPU
* GPU: GPU版本。需要支持AVX指令集的CPU
* CPU WITHOUT AVX: CPU版本,不支持AVX指令集的CPU也可以运行
* GPU WITHOUT AVX: GPU版本,不需要AVX指令集的CPU也可以运行。
用户可以选择对应版本的docker image。使用如下脚本可以确定本机的CPU知否支持 :code:`AVX` 指令集\:
.. code-block:: bash
if cat /proc/cpuinfo | grep -q avx ; then echo "Support AVX"; else echo "Not support AVX"; fi
如果输出 :code:`Support AVX`,则可以选择上表中的AVX版本PaddlePaddle。否则需要选择非AVX的PaddlePaddle。选择普通CPU版本的devel版本的image,则可以使用 :code:`paddle-dev/paddle:cpu-devel-latest` 来引用这个image。
PaddlePaddle提供的镜像并不包含任何命令运行,想要运行PaddlePaddle,您需要进入镜像运行PaddlePaddle PaddlePaddle提供的镜像并不包含任何命令运行,想要运行PaddlePaddle,您需要进入镜像运行PaddlePaddle
程序或者自定义一个含有启动脚本的image。具体请参考注意事项中的 程序或者自定义一个含有启动脚本的image。具体请参考注意事项中的 :code:`使用ssh访问PaddlePaddle镜像`
`使用ssh访问PaddlePaddle镜像`
下载和运行Docker镜像 下载和运行Docker镜像
-------------------- --------------------
...@@ -44,7 +67,7 @@ mac osx或者是windows机器,请参考 ...@@ -44,7 +67,7 @@ mac osx或者是windows机器,请参考
.. code-block:: bash .. code-block:: bash
$ docker run -it paddledev/paddlepaddle:latest-cpu $ docker run -it paddledev/paddlepaddle:cpu-latest
即可启动和进入PaddlePaddle的container。如果运行GPU版本的PaddlePaddle,则需要先将 即可启动和进入PaddlePaddle的container。如果运行GPU版本的PaddlePaddle,则需要先将
cuda相关的Driver和设备映射进container中,脚本类似于 cuda相关的Driver和设备映射进container中,脚本类似于
...@@ -53,7 +76,7 @@ cuda相关的Driver和设备映射进container中,脚本类似于 ...@@ -53,7 +76,7 @@ cuda相关的Driver和设备映射进container中,脚本类似于
$ export CUDA_SO="$(\ls /usr/lib64/libcuda* | xargs -I{} echo '-v {}:{}') $(\ls /usr/lib64/libnvidia* | xargs -I{} echo '-v {}:{}')" $ export CUDA_SO="$(\ls /usr/lib64/libcuda* | xargs -I{} echo '-v {}:{}') $(\ls /usr/lib64/libnvidia* | xargs -I{} echo '-v {}:{}')"
$ export DEVICES=$(\ls /dev/nvidia* | xargs -I{} echo '--device {}:{}') $ export DEVICES=$(\ls /dev/nvidia* | xargs -I{} echo '--device {}:{}')
$ docker run -it paddledev/paddlepaddle:latest-gpu $ docker run ${CUDA_SO} ${DEVICES} -it paddledev/paddlepaddle:latest-gpu
进入Docker container后,运行 :code:`paddle version` 即可打印出PaddlePaddle的版本和构建 进入Docker container后,运行 :code:`paddle version` 即可打印出PaddlePaddle的版本和构建
信息。安装完成的PaddlePaddle主体包括三个部分, :code:`paddle` 脚本, python的 信息。安装完成的PaddlePaddle主体包括三个部分, :code:`paddle` 脚本, python的
......
使用deb包在Ubuntu上安装PaddlePaddle 使用deb包在Ubuntu上安装PaddlePaddle
=================================== ===================================
PaddlePaddle目前支持ubuntu 14.04版本使用deb包安装。更多的安装包PaddlePaddle会在近期提供。 PaddlePaddle目前支持使用deb包安装。Paddle的 :code:`deb` 安装包在ubuntu 14.04中正确,但理论上支持其他的 debian 发行版。
欢迎大家贡献各个发行版的安装包(例如,ubuntu,centos,debian,gentoo)。
PaddlePaddle的ubuntu安装包分为两个版本,即CPU版本,和GPU版本,他们的下载地址是\:
https://github.com/baidu/Paddle/releases/tag/V0.8.0b0
需要注意的是,目前PaddlePaddle的安装包只支持 PaddlePaddle的ubuntu安装包分为四个版本,他们是 cpu、gpu、cpu-noavx、gpu-noavx 四个版本。其中 noavx 用于不支持AVX指令集的cpu。安装包的下载地址是\: https://github.com/baidu/Paddle/releases/
`AVX <https://en.wikipedia.org/wiki/Advanced_Vector_Extensions>`_
指令集的X86 CPU。如果系统使用不支持 `AVX`_ 指令集的CPU运行PaddlePaddle,那么需要从源码
编译PaddlePaddle,请参考 `编译文档 <../cmake/index.html>`_ 。
用户需要先将PaddlePaddle安装包下载到本地,然后执行如下命令即可完成安装。
用户需要先将PaddlePaddle安装包下载到本地,然后执行如下 :code:`gdebi` 命令即可完成安装。
.. code-block:: shell .. code-block:: shell
dpkg -i paddle-*-cpu.deb gdebi paddle-*-cpu.deb
apt-get install -f
如果 :code:`gdebi` 没有安装,则需要使用 :code:`sudo apt-get install gdebi`, 来安装 :code:`gdebi` 。
在 :code:`dpkg -i` 的时候如果报一些依赖未找到的错误是正常的,
在 :code:`apt-get install -f` 里会继续安装 PaddlePaddle。
或者使用下面一条命令安装. 或者使用下面一条命令安装.
.. code-block:: shell .. code-block:: shell
gdebi paddle-*-cpu.deb dpkg -i paddle-*-cpu.deb
apt-get install -f
如果 :code:`gdebi` 没有安装,则需要使用 :code:`sudo apt-get install gdebi`, 来安装 :code:`gdebi`
在 :code:`dpkg -i` 的时候如果报一些依赖未找到的错误是正常的,
在 :code:`apt-get install -f` 里会继续安装 PaddlePaddle。
需要注意的是,如果使用GPU版本的PaddlePaddle,请安装CUDA 7.5 和CUDNN 5到本地环境中, 需要注意的是,如果使用GPU版本的PaddlePaddle,请安装CUDA 7.5 和CUDNN 5到本地环境中,
并设置好对应的环境变量(LD_LIBRARY_PATH等等)。 并设置好对应的环境变量(LD_LIBRARY_PATH等等)。
安装完成后,可以使用命令 :code:`paddle version` 查看安装后的paddle 版本。可能的输出为 安装完成后,可以使用命令 :code:`paddle version` 查看安装后的paddle 版本。可能的输出为
.. code-block:: text .. literalinclude:: paddle_version.txt
PaddlePaddle 0.8.0b1, compiled with
with_avx: ON
with_gpu: OFF
with_double: OFF
with_python: ON
with_rdma: OFF
with_glog: ON
with_gflags: ON
with_metric_learning:
with_timer: OFF
with_predict_sdk:
可能遇到的问题 可能遇到的问题
-------------- --------------
......
...@@ -56,16 +56,28 @@ var _hmt = _hmt || []; ...@@ -56,16 +56,28 @@ var _hmt = _hmt || [];
<div class="section" id="id1"> <div class="section" id="id1">
<h1>编译与安装<a class="headerlink" href="#id1" title="Permalink to this headline"></a></h1> <h1>编译与安装<a class="headerlink" href="#id1" title="Permalink to this headline"></a></h1>
<div class="section" id="id2">
<h2>安装<a class="headerlink" href="#id2" title="Permalink to this headline"></a></h2>
<p>PaddlePaddle提供数个预编译的二进制来进行安装,包括Docker镜像,ubuntu的deb安装包等。我们推荐使用Docker镜像来部署环境,同时欢迎贡献更多的安装包。</p> <p>PaddlePaddle提供数个预编译的二进制来进行安装,包括Docker镜像,ubuntu的deb安装包等。我们推荐使用Docker镜像来部署环境,同时欢迎贡献更多的安装包。</p>
<p>Note: The intallation packages are still in pre-release state and your experience of installation may not be smooth.</p>
<p>注意:目前PaddlePaddle的安装包还处在pre-release的状态,使用起来或许会不是很顺畅。</p>
<div class="toctree-wrapper compound"> <div class="toctree-wrapper compound">
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="install/docker_install.html">安装PaddlePaddle的Docker镜像</a></li> <li class="toctree-l1"><a class="reference internal" href="install/docker_install.html">安装PaddlePaddle的Docker镜像</a></li>
<li class="toctree-l1"><a class="reference internal" href="install/ubuntu_install.html">使用deb包在Ubuntu上安装PaddlePaddle</a></li> <li class="toctree-l1"><a class="reference internal" href="install/ubuntu_install.html">使用deb包在Ubuntu上安装PaddlePaddle</a></li>
</ul>
</div>
</div>
<div class="section" id="id3">
<h2>编译<a class="headerlink" href="#id3" title="Permalink to this headline"></a></h2>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">编译选项主要推荐高级用户查看,普通用户请走安装流程。</p>
</div>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="cmake/index.html">使用cmake编译PaddlePaddle</a></li> <li class="toctree-l1"><a class="reference internal" href="cmake/index.html">使用cmake编译PaddlePaddle</a></li>
</ul> </ul>
</div> </div>
</div>
</div> </div>
...@@ -74,6 +86,15 @@ var _hmt = _hmt || []; ...@@ -74,6 +86,15 @@ var _hmt = _hmt || [];
</div> </div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation"> <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper"> <div class="sphinxsidebarwrapper">
<h3><a href="../index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">编译与安装</a><ul>
<li><a class="reference internal" href="#id2">安装</a></li>
<li><a class="reference internal" href="#id3">编译</a></li>
</ul>
</li>
</ul>
<div role="note" aria-label="source link"> <div role="note" aria-label="source link">
<h3>This Page</h3> <h3>This Page</h3>
<ul class="this-page-menu"> <ul class="this-page-menu">
......
...@@ -67,19 +67,64 @@ var _hmt = _hmt || []; ...@@ -67,19 +67,64 @@ var _hmt = _hmt || [];
</ul> </ul>
<div class="section" id="id1"> <div class="section" id="id1">
<h2>PaddlePaddle提供的Docker镜像版本<a class="headerlink" href="#id1" title="Permalink to this headline"></a></h2> <h2>PaddlePaddle提供的Docker镜像版本<a class="headerlink" href="#id1" title="Permalink to this headline"></a></h2>
<p>我们提供了6个Docker image:</p> <p>我们提供了12个 <a class="reference external" href="https://hub.docker.com/r/paddledev/paddle/tags/">Docker image</a> ,他们的image name都是 <code class="code docutils literal"><span class="pre">paddle-dev/paddle</span></code> ,tag分别为</p>
<table border="1" class="docutils">
<colgroup>
<col width="21%" />
<col width="22%" />
<col width="29%" />
<col width="28%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">&nbsp;</th>
<th class="head">normal</th>
<th class="head">devel</th>
<th class="head">demo</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>CPU</td>
<td>cpu-latest</td>
<td>cpu-devel-latest</td>
<td>cpu-demo-latest</td>
</tr>
<tr class="row-odd"><td>GPU</td>
<td>gpu-latest</td>
<td>gpu-devel-latest</td>
<td>gpu-demo-latest</td>
</tr>
<tr class="row-even"><td>CPU WITHOUT AVX</td>
<td>cpu-noavx-latest</td>
<td>cpu-devel-noavx-latest</td>
<td>cpu-demo-noavx-latest</td>
</tr>
<tr class="row-odd"><td>GPU WITHOUT AVX</td>
<td>gpu-noavx-latest</td>
<td>gpu-devel-noavx-latest</td>
<td>gpu-demo-noavx-latest</td>
</tr>
</tbody>
</table>
<p>其中,横向包括三个版本,normal,devel和demo。</p>
<ul class="simple"> <ul class="simple">
<li>paddledev/paddle:cpu-latest: PaddlePaddle的CPU二进制</li> <li>Normal: 正常的Docker image,只包括paddle的二进制</li>
<li>paddledev/paddle:gpu-latest: PaddlePaddle的GPU二进制</li> <li>Devel: 包括Paddle的二进制、编译环境和源代码</li>
<li>paddledev/paddle:cpu-devel-latest: PaddlePaddle的CPU二进制,同时包含CPU开发环境和源码</li> <li>Demo: 包括Paddle运行demo所需要的依赖</li>
<li>paddledev/paddle:gpu-devel-latest: PaddlePaddle的GPU二进制,同时包含GPU开发环境和源码</li>
<li>paddledev/paddle:cpu-demo-latest: PaddlePaddle的CPU二进制,同时包含CPU开发环境、源码和运行demo的必要依赖</li>
<li>paddledev/paddle:gpu-demo-latest: PaddlePaddle的GPU二进制,同时包含GPU开发环境、源码和运行demo的必要依赖</li>
</ul> </ul>
<p>同时,不同的稳定版本,会将latest替换成稳定版本的版本号。</p> <p>纵向包括四个版本,他们是。</p>
<ul class="simple">
<li>CPU: CPU版本。需要支持AVX指令集的CPU</li>
<li>GPU: GPU版本。需要支持AVX指令集的CPU</li>
<li>CPU WITHOUT AVX: CPU版本,不支持AVX指令集的CPU也可以运行</li>
<li>GPU WITHOUT AVX: GPU版本,不需要AVX指令集的CPU也可以运行。</li>
</ul>
<p>用户可以选择对应版本的docker image。使用如下脚本可以确定本机的CPU知否支持 <code class="code docutils literal"><span class="pre">AVX</span></code> 指令集:</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span><span class="k">if</span> cat /proc/cpuinfo <span class="p">|</span> grep -q avx <span class="p">;</span> <span class="k">then</span> <span class="nb">echo</span> <span class="s2">&quot;Support AVX&quot;</span><span class="p">;</span> <span class="k">else</span> <span class="nb">echo</span> <span class="s2">&quot;Not support AVX&quot;</span><span class="p">;</span> <span class="k">fi</span>
</pre></div>
</div>
<p>如果输出 <code class="code docutils literal"><span class="pre">Support</span> <span class="pre">AVX</span></code>,则可以选择上表中的AVX版本PaddlePaddle。否则需要选择非AVX的PaddlePaddle。选择普通CPU版本的devel版本的image,则可以使用 <code class="code docutils literal"><span class="pre">paddle-dev/paddle:cpu-devel-latest</span></code> 来引用这个image。</p>
<p>PaddlePaddle提供的镜像并不包含任何命令运行,想要运行PaddlePaddle,您需要进入镜像运行PaddlePaddle <p>PaddlePaddle提供的镜像并不包含任何命令运行,想要运行PaddlePaddle,您需要进入镜像运行PaddlePaddle
程序或者自定义一个含有启动脚本的image。具体请参考注意事项中的 程序或者自定义一个含有启动脚本的image。具体请参考注意事项中的 <code class="code docutils literal"><span class="pre">使用ssh访问PaddlePaddle镜像</span></code></p>
<cite>使用ssh访问PaddlePaddle镜像</cite></p>
</div> </div>
<div class="section" id="docker"> <div class="section" id="docker">
<h2>下载和运行Docker镜像<a class="headerlink" href="#docker" title="Permalink to this headline"></a></h2> <h2>下载和运行Docker镜像<a class="headerlink" href="#docker" title="Permalink to this headline"></a></h2>
...@@ -91,14 +136,14 @@ mac osx或者是windows机器,请参考 ...@@ -91,14 +136,14 @@ mac osx或者是windows机器,请参考
<a class="reference external" href="https://docs.docker.com/engine/installation/windows/">windows 的安装文档</a></p> <a class="reference external" href="https://docs.docker.com/engine/installation/windows/">windows 的安装文档</a></p>
<p>您可以使用 <code class="code docutils literal"><span class="pre">docker</span> <span class="pre">pull</span></code> 命令预先下载镜像,也可以直接执行 <p>您可以使用 <code class="code docutils literal"><span class="pre">docker</span> <span class="pre">pull</span></code> 命令预先下载镜像,也可以直接执行
<code class="code docutils literal"><span class="pre">docker</span> <span class="pre">run</span></code> 命令运行镜像。执行方法如下:</p> <code class="code docutils literal"><span class="pre">docker</span> <span class="pre">run</span></code> 命令运行镜像。执行方法如下:</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ docker run -it paddledev/paddlepaddle:latest-cpu <div class="highlight-bash"><div class="highlight"><pre><span></span>$ docker run -it paddledev/paddlepaddle:cpu-latest
</pre></div> </pre></div>
</div> </div>
<p>即可启动和进入PaddlePaddle的container。如果运行GPU版本的PaddlePaddle,则需要先将 <p>即可启动和进入PaddlePaddle的container。如果运行GPU版本的PaddlePaddle,则需要先将
cuda相关的Driver和设备映射进container中,脚本类似于</p> cuda相关的Driver和设备映射进container中,脚本类似于</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ <span class="nb">export</span> <span class="nv">CUDA_SO</span><span class="o">=</span><span class="s2">&quot;</span><span class="k">$(</span><span class="se">\l</span>s /usr/lib64/libcuda* <span class="p">|</span> xargs -I<span class="o">{}</span> <span class="nb">echo</span> <span class="s1">&#39;-v {}:{}&#39;</span><span class="k">)</span><span class="s2"> </span><span class="k">$(</span><span class="se">\l</span>s /usr/lib64/libnvidia* <span class="p">|</span> xargs -I<span class="o">{}</span> <span class="nb">echo</span> <span class="s1">&#39;-v {}:{}&#39;</span><span class="k">)</span><span class="s2">&quot;</span> <div class="highlight-bash"><div class="highlight"><pre><span></span>$ <span class="nb">export</span> <span class="nv">CUDA_SO</span><span class="o">=</span><span class="s2">&quot;</span><span class="k">$(</span><span class="se">\l</span>s /usr/lib64/libcuda* <span class="p">|</span> xargs -I<span class="o">{}</span> <span class="nb">echo</span> <span class="s1">&#39;-v {}:{}&#39;</span><span class="k">)</span><span class="s2"> </span><span class="k">$(</span><span class="se">\l</span>s /usr/lib64/libnvidia* <span class="p">|</span> xargs -I<span class="o">{}</span> <span class="nb">echo</span> <span class="s1">&#39;-v {}:{}&#39;</span><span class="k">)</span><span class="s2">&quot;</span>
$ <span class="nb">export</span> <span class="nv">DEVICES</span><span class="o">=</span><span class="k">$(</span><span class="se">\l</span>s /dev/nvidia* <span class="p">|</span> xargs -I<span class="o">{}</span> <span class="nb">echo</span> <span class="s1">&#39;--device {}:{}&#39;</span><span class="k">)</span> $ <span class="nb">export</span> <span class="nv">DEVICES</span><span class="o">=</span><span class="k">$(</span><span class="se">\l</span>s /dev/nvidia* <span class="p">|</span> xargs -I<span class="o">{}</span> <span class="nb">echo</span> <span class="s1">&#39;--device {}:{}&#39;</span><span class="k">)</span>
$ docker run -it paddledev/paddlepaddle:latest-gpu $ docker run <span class="si">${</span><span class="nv">CUDA_SO</span><span class="si">}</span> <span class="si">${</span><span class="nv">DEVICES</span><span class="si">}</span> -it paddledev/paddlepaddle:latest-gpu
</pre></div> </pre></div>
</div> </div>
<p>进入Docker container后,运行 <code class="code docutils literal"><span class="pre">paddle</span> <span class="pre">version</span></code> 即可打印出PaddlePaddle的版本和构建 <p>进入Docker container后,运行 <code class="code docutils literal"><span class="pre">paddle</span> <span class="pre">version</span></code> 即可打印出PaddlePaddle的版本和构建
......
...@@ -56,44 +56,38 @@ var _hmt = _hmt || []; ...@@ -56,44 +56,38 @@ var _hmt = _hmt || [];
<div class="section" id="debubuntupaddlepaddle"> <div class="section" id="debubuntupaddlepaddle">
<h1>使用deb包在Ubuntu上安装PaddlePaddle<a class="headerlink" href="#debubuntupaddlepaddle" title="Permalink to this headline"></a></h1> <h1>使用deb包在Ubuntu上安装PaddlePaddle<a class="headerlink" href="#debubuntupaddlepaddle" title="Permalink to this headline"></a></h1>
<p>PaddlePaddle目前支持ubuntu 14.04版本使用deb包安装。更多的安装包PaddlePaddle会在近期提供。 <p>PaddlePaddle目前支持使用deb包安装。Paddle的 <code class="code docutils literal"><span class="pre">deb</span></code> 安装包在ubuntu 14.04中正确,但理论上支持其他的 debian 发行版。</p>
欢迎大家贡献各个发行版的安装包(例如,ubuntu,centos,debian,gentoo)。</p> <p>PaddlePaddle的ubuntu安装包分为四个版本,他们是 cpu、gpu、cpu-noavx、gpu-noavx 四个版本。其中 noavx 用于不支持AVX指令集的cpu。安装包的下载地址是: <a class="reference external" href="https://github.com/baidu/Paddle/releases/">https://github.com/baidu/Paddle/releases/</a></p>
<p>PaddlePaddle的ubuntu安装包分为两个版本,即CPU版本,和GPU版本,他们的下载地址是: <p>用户需要先将PaddlePaddle安装包下载到本地,然后执行如下 <code class="code docutils literal"><span class="pre">gdebi</span></code> 命令即可完成安装。</p>
<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> <div class="highlight-shell"><div class="highlight"><pre><span></span>gdebi paddle-*-cpu.deb
<p>需要注意的是,目前PaddlePaddle的安装包只支持 </pre></div>
<a class="reference external" href="https://en.wikipedia.org/wiki/Advanced_Vector_Extensions">AVX</a> </div>
指令集的X86 CPU。如果系统使用不支持 <a class="reference external" href="https://en.wikipedia.org/wiki/Advanced_Vector_Extensions">AVX</a> 指令集的CPU运行PaddlePaddle,那么需要从源码 <p>如果 <code class="code docutils literal"><span class="pre">gdebi</span></code> 没有安装,则需要使用 <code class="code docutils literal"><span class="pre">sudo</span> <span class="pre">apt-get</span> <span class="pre">install</span> <span class="pre">gdebi</span></code>, 来安装 <code class="code docutils literal"><span class="pre">gdebi</span></code></p>
编译PaddlePaddle,请参考 <a class="reference external" href="../cmake/index.html">编译文档</a></p> <p>或者使用下面一条命令安装.</p>
<p>用户需要先将PaddlePaddle安装包下载到本地,然后执行如下命令即可完成安装。</p>
<div class="highlight-shell"><div class="highlight"><pre><span></span>dpkg -i paddle-*-cpu.deb <div class="highlight-shell"><div class="highlight"><pre><span></span>dpkg -i paddle-*-cpu.deb
apt-get install -f apt-get install -f
</pre></div> </pre></div>
</div> </div>
<p><code class="code docutils literal"><span class="pre">dpkg</span> <span class="pre">-i</span></code> 的时候如果报一些依赖未找到的错误是正常的, <p><code class="code docutils literal"><span class="pre">dpkg</span> <span class="pre">-i</span></code> 的时候如果报一些依赖未找到的错误是正常的,
<code class="code docutils literal"><span class="pre">apt-get</span> <span class="pre">install</span> <span class="pre">-f</span></code> 里会继续安装 PaddlePaddle。</p> <code class="code docutils literal"><span class="pre">apt-get</span> <span class="pre">install</span> <span class="pre">-f</span></code> 里会继续安装 PaddlePaddle。</p>
<p>或者使用下面一条命令安装.</p>
<div class="highlight-shell"><div class="highlight"><pre><span></span>gdebi paddle-*-cpu.deb
</pre></div>
</div>
<p>如果 <code class="code docutils literal"><span class="pre">gdebi</span></code> 没有安装,则需要使用 <code class="code docutils literal"><span class="pre">sudo</span> <span class="pre">apt-get</span> <span class="pre">install</span> <span class="pre">gdebi</span></code>, 来安装 <code class="code docutils literal"><span class="pre">gdebi</span></code></p>
<p>需要注意的是,如果使用GPU版本的PaddlePaddle,请安装CUDA 7.5 和CUDNN 5到本地环境中, <p>需要注意的是,如果使用GPU版本的PaddlePaddle,请安装CUDA 7.5 和CUDNN 5到本地环境中,
并设置好对应的环境变量(LD_LIBRARY_PATH等等)。</p> 并设置好对应的环境变量(LD_LIBRARY_PATH等等)。</p>
<p>安装完成后,可以使用命令 <code class="code docutils literal"><span class="pre">paddle</span> <span class="pre">version</span></code> 查看安装后的paddle 版本。可能的输出为</p> <p>安装完成后,可以使用命令 <code class="code docutils literal"><span class="pre">paddle</span> <span class="pre">version</span></code> 查看安装后的paddle 版本。可能的输出为</p>
<div class="highlight-text"><div class="highlight"><pre><span></span>PaddlePaddle 0.8.0b1, compiled with <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">PaddlePaddle</span> <span class="mf">0.8</span><span class="o">.</span><span class="mb">0b1</span><span class="p">,</span> <span class="n">compiled</span> <span class="k">with</span>
with_avx: ON <span class="n">with_avx</span><span class="p">:</span> <span class="n">ON</span>
with_gpu: OFF <span class="n">with_gpu</span><span class="p">:</span> <span class="n">OFF</span>
with_double: OFF <span class="n">with_double</span><span class="p">:</span> <span class="n">OFF</span>
with_python: ON <span class="n">with_python</span><span class="p">:</span> <span class="n">ON</span>
with_rdma: OFF <span class="n">with_rdma</span><span class="p">:</span> <span class="n">OFF</span>
with_glog: ON <span class="n">with_glog</span><span class="p">:</span> <span class="n">ON</span>
with_gflags: ON <span class="n">with_gflags</span><span class="p">:</span> <span class="n">ON</span>
with_metric_learning: <span class="n">with_metric_learning</span><span class="p">:</span>
with_timer: OFF <span class="n">with_timer</span><span class="p">:</span> <span class="n">OFF</span>
with_predict_sdk: <span class="n">with_predict_sdk</span><span class="p">:</span>
</pre></div> </pre></div>
</div> </div>
<div class="section" id="id2"> <div class="section" id="id1">
<h2>可能遇到的问题<a class="headerlink" href="#id2" title="Permalink to this headline"></a></h2> <h2>可能遇到的问题<a class="headerlink" href="#id1" title="Permalink to this headline"></a></h2>
<div class="section" id="libcudart-so-libcudnn-so"> <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> <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> <p>安装完成PaddlePaddle后,运行 <code class="code docutils literal"><span class="pre">paddle</span> <span class="pre">train</span></code> 报错:</p>
...@@ -140,7 +134,7 @@ driver添加到LD_LIBRARY_PATH中。比较可能的命令如下。</p> ...@@ -140,7 +134,7 @@ driver添加到LD_LIBRARY_PATH中。比较可能的命令如下。</p>
<h3><a href="../../index.html">Table Of Contents</a></h3> <h3><a href="../../index.html">Table Of Contents</a></h3>
<ul> <ul>
<li><a class="reference internal" href="#">使用deb包在Ubuntu上安装PaddlePaddle</a><ul> <li><a class="reference internal" href="#">使用deb包在Ubuntu上安装PaddlePaddle</a><ul>
<li><a class="reference internal" href="#id2">可能遇到的问题</a><ul> <li><a class="reference internal" href="#id1">可能遇到的问题</a><ul>
<li><a class="reference internal" href="#libcudart-so-libcudnn-so">libcudart.so/libcudnn.so找不到</a></li> <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="#cuda-driver">CUDA Driver找不到</a></li>
<li><a class="reference internal" href="#config">config文件找不到</a></li> <li><a class="reference internal" href="#config">config文件找不到</a></li>
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册