-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DOC CHANGE] Rerange Build docs & emphasize them in README.md (#151)
* Rerange Build docs & emphasize them in README.md * Rerange Build docs & emphasize them in README.md
- Loading branch information
Showing
10 changed files
with
234 additions
and
177 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
Docker installation guide | ||
========================== | ||
|
||
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. | ||
|
||
.. note:: | ||
|
||
The `Docker`_ image is the recommended way to run PaddlePaddle | ||
|
||
PaddlePaddle 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 can use :code:`docker pull ` to download images first, or just launch a container with :code:`docker run` \: | ||
|
||
.. 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: | ||
|
||
.. 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 {}:{}') | ||
docker run ${CUDA_SO} ${DEVICES} -it paddledev/paddle:gpu-latest | ||
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. | ||
If you use high performance nic, such as RDMA(RoCE 40GbE or IB 56GbE), Ethernet(10GbE), it is recommended to use config "-net = host". | ||
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: | ||
.. literalinclude:: ../../doc_cn/build_and_install/install/paddle_ssh.Dockerfile | ||
Then you can build an image with Dockerfile and launch a container: | ||
.. code-block:: 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: | ||
.. code-block:: bash | ||
ssh -p 8022 root@YOUR_HOST_MACHINE | ||
You can stop and delete the container as following: | ||
.. code-block:: bash | ||
# stop | ||
docker stop paddle_ssh_machine | ||
# delete | ||
docker rm paddle_ssh_machine |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
Debian Package installation guide | ||
================================= | ||
|
||
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. | ||
|
||
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 use :code:`gdebi` install. | ||
|
||
.. code-block:: bash | ||
gdebi paddle-*.deb | ||
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. | ||
|
||
.. 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. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,32 @@ | ||
编译与安装 | ||
======================== | ||
|
||
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:: | ||
:maxdepth: 1 | ||
:glob: | ||
|
||
源码下载(对内) <../build/internal/download_paddle_source_zh_cn.rst> | ||
使用Jumbo安装(对内) <../build/internal/install_from_jumbo.rst> | ||
从源码编译安装(对内) <../build/internal/build_from_source_zh_cn.rst> | ||
install/docker_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 |
Oops, something went wrong.