The above command will compile PaddlePaddle and create a Dockerfile for building production image. All the generated files are in the build directory. "WITH_GPU" controls if the generated production image supports GPU. "WITH_AVX" controls if the generated production image supports AVX. "WITH_TEST" controls if the unit test will be generated.
and SSH to this container using password :code:`root`:
The second step is to run:
.. code-block:: bash
ssh -p 2202 root@localhost
docker build -t paddle:prod -f build/Dockerfile .
An advantage is that we can run the PaddlePaddle container on a
remote server and SSH to it from a laptop.
The above command will generate the production image by copying the compiled PaddlePaddle program into the image.
When developing PaddlePaddle, you can edit PaddlePaddle source code
from outside of docker container using your favoriate editor. To
<h2>Usage of CPU-only and GPU Images<aclass="headerlink"href="#usage-of-cpu-only-and-gpu-images"title="Permalink to this headline">¶</a></h2>
<p>For each version of PaddlePaddle, we release two types of Docker images:
development image and production image. Production image includes
CPU-only version and a CUDA GPU version and their no-AVX versions. We
put the docker images on <aclass="reference external"href="https://hub.docker.com/r/paddledev/paddle/">dockerhub.com</a>. You can find the
latest versions under “tags” tab at dockerhub.com</p>
<p>We package PaddlePaddle’s compile environment into a Docker image,
called the develop image, it contains all compiling tools that
PaddlePaddle needs. We package compiled PaddlePaddle program into a
Docker image as well, called the production image, it contains all
runtime environment that running PaddlePaddle needs. For each version
of PaddlePaddle, we release both of them. Production image includes
CPU-only version and a CUDA GPU version and their no-AVX versions.</p>
<p>We put the docker images on <aclass="reference external"href="https://hub.docker.com/r/paddledev/paddle/">dockerhub.com</a>. You can find the
latest versions under “tags” tab at dockerhub.com. If you are in
China, you can use our Docker image registry mirror to speed up the
download process. To use it, please replace all paddlepaddle/paddle in
the commands to docker.paddlepaddle.org/paddle.</p>
<olclass="arabic">
<li><pclass="first">Production images, this image might have multiple variants:</p>
<ulclass="simple">
...
...
@@ -359,49 +366,33 @@ python example.py
<h2>Develop PaddlePaddle or Train Model Using C++ API<aclass="headerlink"href="#develop-paddlepaddle-or-train-model-using-c-api"title="Permalink to this headline">¶</a></h2>
<p>We will be using PaddlePaddle development image since it contains all
<p>The above command will compile PaddlePaddle and create a Dockerfile for building production image. All the generated files are in the build directory. “WITH_GPU” controls if the generated production image supports GPU. “WITH_AVX” controls if the generated production image supports AVX. “WITH_TEST” controls if the unit test will be generated.</p>
PaddlePaddle目前唯一官方支持的运行的方式是Docker容器。因为Docker能在所有主要操作系统(包括Linux,Mac OS X和Windows)上运行。 请注意,您需要更改 `Dockers设置 <https://github.com/PaddlePaddle/Paddle/issues/627>`_ 才能充分利用Mac OS X和Windows上的硬件资源。
<p>PaddlePaddle目前唯一官方支持的运行的方式是Docker容器。因为Docker能在所有主要操作系统(包括Linux,Mac OS X和Windows)上运行。 请注意,您需要更改 <aclass="reference external"href="https://github.com/PaddlePaddle/Paddle/issues/627">Dockers设置</a> 才能充分利用Mac OS X和Windows上的硬件资源。</p>
docker run <spanclass="si">${</span><spanclass="nv">CUDA_SO</span><spanclass="si">}</span><spanclass="si">${</span><spanclass="nv">DEVICES</span><spanclass="si">}</span> -it paddledev/paddle:<version>-gpu