提交 0cecbbfc 编写于 作者: T Travis CI

Deploy to GitHub Pages: 76749f68

上级 2d45b245
......@@ -116,21 +116,21 @@ automatically runs the following commands:
.. code-block:: bash
docker build -t paddle:cpu -f paddle/scripts/docker/Dockerfile .
docker build -t paddle:gpu -f paddle/scripts/docker/Dockerfile.gpu .
docker build -t paddle:cpu -f paddle/scripts/docker/Dockerfile --build-arg BUILD_AND_INSTALL=ON .
docker build -t paddle:gpu -f paddle/scripts/docker/Dockerfile.gpu --build-arg BUILD_AND_INSTALL=ON .
To run the CPU-only image as an interactive container:
.. code-block:: bash
docker run -it --rm paddledev/paddle:cpu-latest /bin/bash
docker run -it --rm paddledev/paddle:0.10.0rc1-cpu /bin/bash
or, we can run it as a daemon container
.. code-block:: bash
docker run -d -p 2202:22 paddledev/paddle:cpu-latest
docker run -d -p 2202:22 paddledev/paddle:0.10.0rc1-cpu
and SSH to this container using password :code:`root`:
......@@ -152,7 +152,7 @@ to install CUDA driver and let Docker knows about it:
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 {}:{}')
docker run ${CUDA_SO} ${DEVICES} -it paddledev/paddle:gpu-latest
docker run ${CUDA_SO} ${DEVICES} -it paddledev/paddle:0.10.0rc1-gpu
Non-AVX Images
......@@ -194,7 +194,7 @@ container:
.. code-block:: bash
docker run -d --name paddle-cpu-doc paddle:cpu
docker run -d --name paddle-cpu-doc paddle:0.10.0rc1-cpu
docker run -d --volumes-from paddle-cpu-doc -p 8088:80 nginx
......
......@@ -277,8 +277,7 @@ ctest
</div>
</li>
<li><p class="first">Run PaddlePaddle Book under Docker Container</p>
<blockquote>
<div><p>The Jupyter Notebook is an open-source web application that allows
<p>The Jupyter Notebook is an open-source web application that allows
you to create and share documents that contain live code, equations,
visualizations and explanatory text in a single browser.</p>
<p>PaddlePaddle Book is an interactive Jupyter Notebook for users and developers.
......@@ -293,7 +292,6 @@ dig deeper into deep learning, PaddlePaddle Book definitely is your best choice.
</pre></div>
</div>
<p>That&#8217;s all. Enjoy your journey!</p>
</div></blockquote>
</li>
</ol>
</div>
......@@ -303,16 +301,16 @@ dig deeper into deep learning, PaddlePaddle Book definitely is your best choice.
CPU-only one and a CUDA GPU one. We do so by configuring
<a class="reference external" href="https://hub.docker.com/r/paddledev/paddle/">dockerhub.com</a>
automatically runs the following commands:</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>docker build -t paddle:cpu -f paddle/scripts/docker/Dockerfile .
docker build -t paddle:gpu -f paddle/scripts/docker/Dockerfile.gpu .
<div class="highlight-bash"><div class="highlight"><pre><span></span>docker build -t paddle:cpu -f paddle/scripts/docker/Dockerfile --build-arg <span class="nv">BUILD_AND_INSTALL</span><span class="o">=</span>ON .
docker build -t paddle:gpu -f paddle/scripts/docker/Dockerfile.gpu --build-arg <span class="nv">BUILD_AND_INSTALL</span><span class="o">=</span>ON .
</pre></div>
</div>
<p>To run the CPU-only image as an interactive container:</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>docker run -it --rm paddledev/paddle:cpu-latest /bin/bash
<div class="highlight-bash"><div class="highlight"><pre><span></span>docker run -it --rm paddledev/paddle:0.10.0rc1-cpu /bin/bash
</pre></div>
</div>
<p>or, we can run it as a daemon container</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>docker run -d -p <span class="m">2202</span>:22 paddledev/paddle:cpu-latest
<div class="highlight-bash"><div class="highlight"><pre><span></span>docker run -d -p <span class="m">2202</span>:22 paddledev/paddle:0.10.0rc1-cpu
</pre></div>
</div>
<p>and SSH to this container using password <code class="code docutils literal"><span class="pre">root</span></code>:</p>
......@@ -328,7 +326,7 @@ from a laptop.</p>
to install CUDA driver and let Docker knows about it:</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>
<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 <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/paddle:gpu-latest
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/paddle:0.10.0rc1-gpu
</pre></div>
</div>
</div>
......@@ -359,7 +357,7 @@ for users to browse and understand the C++ source code.</p>
<p>As long as we give the Paddle Docker container a name, we can run an
additional Nginx Docker container to serve the volume from the Paddle
container:</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>docker run -d --name paddle-cpu-doc paddle:cpu
<div class="highlight-bash"><div class="highlight"><pre><span></span>docker run -d --name paddle-cpu-doc paddle:0.10.0rc1-cpu
docker run -d --volumes-from paddle-cpu-doc -p <span class="m">8088</span>:80 nginx
</pre></div>
</div>
......
此差异已折叠。
......@@ -56,6 +56,26 @@ PaddlePaddle目前唯一官方支持的运行的方式是Docker容器。因为Do
cd /paddle/build
ctest
4. 在Docker容器中运行PaddlePaddle书籍
Jupyter Notebook是一个开源的web程序,大家可以通过它制作和分享带有代码、公式、图表、文字的交互式文档。用户可以通过网页浏览文档。
PaddlePaddle书籍是为用户和开发者制作的一个交互式的Jupyter Nodebook。
如果您想要更深入了解deep learning,PaddlePaddle书籍一定是您最好的选择。
当您进入容器内之后,只用运行以下命令:
.. code-block:: bash
jupyter notebook
然后在浏览器中输入以下网址:
.. code-block:: text
http://localhost:8888/
就这么简单,享受您的旅程!
纯CPU和GPU的docker镜像
----------------------
......@@ -64,20 +84,20 @@ PaddlePaddle目前唯一官方支持的运行的方式是Docker容器。因为Do
.. code-block:: bash
docker build -t paddle:cpu -f paddle/scripts/docker/Dockerfile .
docker build -t paddle:gpu -f paddle/scripts/docker/Dockerfile.gpu .
docker build -t paddle:cpu -f paddle/scripts/docker/Dockerfile --build-arg BUILD_AND_INSTALL=ON .
docker build -t paddle:gpu -f paddle/scripts/docker/Dockerfile.gpu --build-arg BUILD_AND_INSTALL=ON .
以交互容器方式运行纯CPU的镜像:
.. code-block:: bash
docker run -it --rm paddledev/paddle:cpu-latest /bin/bash
docker run -it --rm paddledev/paddle:0.10.0rc1-cpu /bin/bash
或者,可以以后台进程方式运行容器:
.. code-block:: bash
docker run -d -p 2202:22 paddledev/paddle:cpu-latest
docker run -d -p 2202:22 paddledev/paddle:0.10.0rc1-cpu
然后用密码 :code:`root` SSH进入容器:
......@@ -94,7 +114,7 @@ SSH方式的一个优点是我们可以从多个终端进入容器。比如,
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 {}:{}')
docker run ${CUDA_SO} ${DEVICES} -it paddledev/paddle:gpu-latest
docker run ${CUDA_SO} ${DEVICES} -it paddledev/paddle:0.10.0rc1-gpu
非AVX镜像
......@@ -128,7 +148,7 @@ Paddle的Docker镜像带有一个通过 `woboq code browser
.. code-block:: bash
docker run -d --name paddle-cpu-doc paddle:cpu
docker run -d --name paddle-cpu-doc paddle:0.10.0rc1-cpu
docker run -d --volumes-from paddle-cpu-doc -p 8088:80 nginx
接着我们就能够打开浏览器在 http://localhost:8088/paddle/ 浏览代码。
......@@ -260,21 +260,35 @@ ctest
</pre></div>
</div>
</li>
<li><p class="first">在Docker容器中运行PaddlePaddle书籍</p>
<p>Jupyter Notebook是一个开源的web程序,大家可以通过它制作和分享带有代码、公式、图表、文字的交互式文档。用户可以通过网页浏览文档。</p>
<p>PaddlePaddle书籍是为用户和开发者制作的一个交互式的Jupyter Nodebook。
如果您想要更深入了解deep learning,PaddlePaddle书籍一定是您最好的选择。</p>
<p>当您进入容器内之后,只用运行以下命令:</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>jupyter notebook
</pre></div>
</div>
<p>然后在浏览器中输入以下网址:</p>
<div class="highlight-text"><div class="highlight"><pre><span></span>http://localhost:8888/
</pre></div>
</div>
<p>就这么简单,享受您的旅程!</p>
</li>
</ol>
</div>
<div class="section" id="cpugpudocker">
<h2>纯CPU和GPU的docker镜像<a class="headerlink" href="#cpugpudocker" title="永久链接至标题"></a></h2>
<p>对于每一个PaddlePaddle版本,我们都会发布两个Docker镜像:纯CPU的和GPU的。我们通过设置 <a class="reference external" href="https://hub.docker.com/r/paddledev/paddle/">dockerhub.com</a> 自动运行以下两个命令:</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>docker build -t paddle:cpu -f paddle/scripts/docker/Dockerfile .
docker build -t paddle:gpu -f paddle/scripts/docker/Dockerfile.gpu .
<div class="highlight-bash"><div class="highlight"><pre><span></span>docker build -t paddle:cpu -f paddle/scripts/docker/Dockerfile --build-arg <span class="nv">BUILD_AND_INSTALL</span><span class="o">=</span>ON .
docker build -t paddle:gpu -f paddle/scripts/docker/Dockerfile.gpu --build-arg <span class="nv">BUILD_AND_INSTALL</span><span class="o">=</span>ON .
</pre></div>
</div>
<p>以交互容器方式运行纯CPU的镜像:</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>docker run -it --rm paddledev/paddle:cpu-latest /bin/bash
<div class="highlight-bash"><div class="highlight"><pre><span></span>docker run -it --rm paddledev/paddle:0.10.0rc1-cpu /bin/bash
</pre></div>
</div>
<p>或者,可以以后台进程方式运行容器:</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>docker run -d -p <span class="m">2202</span>:22 paddledev/paddle:cpu-latest
<div class="highlight-bash"><div class="highlight"><pre><span></span>docker run -d -p <span class="m">2202</span>:22 paddledev/paddle:0.10.0rc1-cpu
</pre></div>
</div>
<p>然后用密码 <code class="code docutils literal"><span class="pre">root</span></code> SSH进入容器:</p>
......@@ -285,7 +299,7 @@ docker build -t paddle:gpu -f paddle/scripts/docker/Dockerfile.gpu .
<p>以上方法在GPU镜像里也能用-只是请不要忘记按装CUDA驱动,以及告诉Docker:</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>
<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 <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/paddle:gpu-latest
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/paddle:0.10.0rc1-gpu
</pre></div>
</div>
</div>
......@@ -308,7 +322,7 @@ docker build --build-arg <span class="nv">WITH_AVX</span><span class="o">=</span
<h2>文档<a class="headerlink" href="#id1" title="永久链接至标题"></a></h2>
<p>Paddle的Docker镜像带有一个通过 <a class="reference external" href="https://github.com/woboq/woboq_codebrowser">woboq code browser</a> 生成的HTML版本的C++源代码,便于用户浏览C++源码。</p>
<p>只要在Docker里启动PaddlePaddle的时候给它一个名字,就可以再运行另一个Nginx Docker镜像来服务HTML代码:</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>docker run -d --name paddle-cpu-doc paddle:cpu
<div class="highlight-bash"><div class="highlight"><pre><span></span>docker run -d --name paddle-cpu-doc paddle:0.10.0rc1-cpu
docker run -d --volumes-from paddle-cpu-doc -p <span class="m">8088</span>:80 nginx
</pre></div>
</div>
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册