diff --git a/doc/fluid/install/Tables_en.md b/doc/fluid/install/Tables_en.md index a1b1d851f61fd5bf4f8104c75aca5f105e10569d..d1a9657254ee147360b60691124e79cd649db8bc 100644 --- a/doc/fluid/install/Tables_en.md +++ b/doc/fluid/install/Tables_en.md @@ -1,4 +1,3 @@ -*** # Appendix @@ -27,12 +26,18 @@ 4.8 / 5.4 recommends using devtools2 for CentOS + + + Clang (MacOS Only) + 9.0 and above + Usually use the clang version of MacOS 10.11 and above + - Python - 2.7.x. - depends on libpython2.7.so - apt install python-dev or yum install python-devel + Python(64 bit) + 2.7.x. or 3.5+.x + depends on libpython2.7.so or libpython3.5+.so + apt install python-dev or yum install python-devel if installing python3, please go to Python official website SWIG @@ -49,7 +54,7 @@ openblas any - + optional @@ -62,13 +67,13 @@ numpy >=1.12.0 - pip install numpy==1.14.0 + pip install numpy protobuf - 3.1.0 + >=3.1.0 - pip install protobuf==3.1.0 + pip install protobuf wheel @@ -88,12 +93,23 @@ optional + + setuptools + >= 28.0.0 + + + + + unrar + + + brew install unrar (For MacOS), apt-get install unrar (For Ubuntu) +

-***

## **Compile Option Table** @@ -113,16 +129,6 @@ Whether to support GPU ON - - WITH_C_API - Whether to compile CAPI - OFF - - - WITH_DOUBLE - Whether to use double precision floating point numeber - OFF - WITH_DSO whether to load CUDA dynamic libraries dynamically at runtime, instead of statically loading CUDA dynamic libraries. @@ -138,30 +144,11 @@ Whether the PYTHON interpreter is embedded ON - - WITH_STYLE_CHECK - Whether to perform code style checking at compile time - ON - WITH_TESTING Whether to turn on unit test OFF - - WITH_DOC - Whether to compile Chinese and English documents - OFF - - - WITH_SWIG_PY - Whether to compile PYTHON's SWIG interface, which can be used for predicting and customizing training - Auto - - WITH_GOLANG - Whether to compile the fault-tolerant parameter server of the go language - OFF - WITH_MKL Whether to use the MKL math library, if not,using OpenBLAS @@ -177,11 +164,6 @@ Whether to Compile with distributed version OFF - - WITH_RDMA - Whether to compile the relevant parts that supports RDMA - OFF - WITH_BRPC_RDMA Whether to use BRPC RDMA as RPC protocol @@ -193,13 +175,18 @@ OFF - DWITH_ANAKIN - Whether to Compile ANAKIN - OFF + + CUDA_ARCH_NAME + Compile only for current CUDA schema or not + All:Compile all supported CUDA architectures optional: Auto automatically recognizes the schema compilation of the current environment - - -

+ + + TENSORRT_ROOT + Specify TensorRT path + The default value under windows is '/', The default value under windows is '/usr/' + + **BLAS** @@ -223,7 +210,6 @@ PaddePaddle implements references to various BLAS/CUDA/cuDNN libraries by specif **Note**: The settings introduced here for these compilation options are only valid for the first cmake. If you want to reset it later, it is recommended to clean up the entire build directory ( rm -rf ) and then specify it. -***

## **Installation Package List** @@ -239,284 +225,362 @@ PaddePaddle implements references to various BLAS/CUDA/cuDNN libraries by specif - paddlepaddle==[version code] such as paddlepaddle==1.5.1 + paddlepaddle==[version code] such as paddlepaddle==1.7.1 Only support the corresponding version of the CPU PaddlePaddle, please refer to Pypi for the specific version. - paddlepaddle-gpu==1.5.1 - Using version 1.5.1 compiled with CUDA 9.0 and cuDNN 7 + paddlepaddle-gpu==[version code], such as paddlepaddle-gpu==1.7.1 + The default installation supports the PaddlePaddle installation package corresponding to [version number] of CUDA 10.0 and cuDNN 7 - paddlepaddle-gpu==1.5.1.post87 - Using version 1.5.1 compiled with CUDA 8.0 and cuDNN 7 + paddlepaddle-gpu==[version code].postXX, such as paddlepaddle-gpu==1.7.1.post97 + Installation package supporting the corresponding PaddlePaddle version of CUDA 9.0 and cuDNN 7

- - You can find various distributions of PaddlePaddle-gpu in [the Release History](https://pypi.org/project/paddlepaddle-gpu/#history). +> 'postxx' corresponds to CUDA and cuDNN versions, and the number before 'postxx' represents the version of Paddle + +Please note that: in the commands, paddlepaddle-gpu will install the installation package of PaddlePaddle that supports CUDA 10.0 and cuDNN 7 by default under Windows environment. -Please note that: paddlepaddle-gpu in windows, will download package compiled with CUDA 8.0 and cuDNN 7 -*** - +

-## Installation Mirrors and Introduction + +## **Multi-version whl package list - Release** +

- - + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Version Number Release Description Release Instruction cp27-cp27mu cp27-cp27m cp35-cp35m cp36-cp36m cp37-cp37m
hub.baidubce.com/paddlepaddle/paddle:latest The latest pre-installed image of the PaddlePaddle CPU version
hub.baidubce.com/paddlepaddle/paddle:latest-dev The latest PaddlePaddle development environment
hub.baidubce.com/paddlepaddle/paddle:[Version] Replace version with a specific version, preinstalled PaddlePaddle image in historical version
hub.baidubce.com/paddlepaddle/paddle:latest-gpu The latest pre-installed image of the PaddlePaddle GPU version
cpu-mkl + paddlepaddle-1.7.1-cp27-cp27mu-linux_x86_64.whl + paddlepaddle-1.7.1-cp27-cp27m-linux_x86_64.whl + paddlepaddle-1.7.1-cp35-cp35m-linux_x86_64.whl + paddlepaddle-1.7.1-cp36-cp36m-linux_x86_64.whl + paddlepaddle-1.7.1-cp37-cp37m-linux_x86_64.whl
cpu-openblas + paddlepaddle-1.7.1-cp27-cp27mu-linux_x86_64.whl paddlepaddle-1.7.1-cp27-cp27m-linux_x86_64.whl + paddlepaddle-1.7.1-cp35-cp35m-linux_x86_64.whl + paddlepaddle-1.7.1-cp36-cp36m-linux_x86_64.whl + paddlepaddle-1.7.1-cp37-cp37m-linux_x86_64.whl
cuda9-cudnn7-avx-openblas paddlepaddle_gpu-1.7.1-cp27-cp27mu-linux_x86_64.whl paddlepaddle_gpu-1.7.1-cp27-cp27m-linux_x86_64.whl paddlepaddle_gpu-1.7.1-cp35-cp35m-linux_x86_64.whl paddlepaddle_gpu-1.7.1-cp36-cp36m-linux_x86_64.whl paddlepaddle_gpu-1.7.1-cp37-cp37m-linux_x86_64.whl
cuda9-cudnn7-mkl paddlepaddle_gpu-1.7.1-cp27-cp27mu-linux_x86_64.whl paddlepaddle_gpu-1.7.1-cp27-cp27m-linux_x86_64.whl paddlepaddle_gpu-1.7.1-cp35-cp35m-linux_x86_64.whl paddlepaddle_gpu-1.7.1-cp36-cp36m-linux_x86_64.whl paddlepaddle_gpu-1.7.1-cp37-cp37m-linux_x86_64.whl
cuda10_cudnn7-mkl paddlepaddle_gpu-1.7.1-cp27-cp27mu-linux_x86_64.whl paddlepaddle_gpu-1.7.1-cp27-cp27m-linux_x86_64.whl paddlepaddle_gpu-1.7.1-cp35-cp35m-linux_x86_64.whl + paddlepaddle_gpu-1.7.1-cp36-cp36m-linux_x86_64.whl + paddlepaddle_gpu-1.7.1-cp37-cp37m-linux_x86_64.whl
win_cpu_mkl - + paddlepaddle-1.7.1-cp27-cp27m-win_amd64.whl + paddlepaddle-1.7.1-cp35-cp35m-win_amd64.whl + paddlepaddle-1.7.1-cp36-cp36m-win_amd64.whl + paddlepaddle-1.7.1-cp37-cp37m-win_amd64.whl
win_cuda9_cudnn7_mkl - + paddlepaddle_gpu-1.7.1-cp27-cp27m-win_amd64.whl + paddlepaddle_gpu-1.7.1-cp35-cp35m-win_amd64.whl + paddlepaddle_gpu-1.7.1-cp36-cp36m-win_amd64.whl + paddlepaddle_gpu-1.7.1-cp37-cp37m-win_amd64.whl
win_cuda10_cudnn7_mkl - + paddlepaddle_gpu-1.7.1-cp27-cp27m-win_amd64.whl + paddlepaddle_gpu-1.7.1-cp35-cp35m-win_amd64.whl + paddlepaddle_gpu-1.7.1-cp36-cp36m-win_amd64.whl + paddlepaddle_gpu-1.7.1-cp37-cp37m-win_amd64.whl
win_cpu_openblas - + paddlepaddle-1.7.1-cp27-cp27m-win_amd64.whl + paddlepaddle-1.7.1-cp35-cp35m-win_amd64.whl + paddlepaddle-1.7.1-cp36-cp36m-win_amd64.whl + paddlepaddle-1.7.1-cp37-cp37m-win_amd64.whl
win_cuda9_cudnn7_openblas - + paddlepaddle_gpu-1.7.1-cp27-cp27m-win_amd64.whl + paddlepaddle_gpu-1.7.1-cp35-cp35m-win_amd64.whl + paddlepaddle_gpu-1.7.1-cp36-cp36m-win_amd64.whl + paddlepaddle_gpu-1.7.1-cp37-cp37m-win_amd64.whl
mac_cpu - + paddlepaddle-1.7.1-cp27-cp27m-macosx_10_6_intel.whl + paddlepaddle-1.7.1-cp35-cp35m-macosx_10_6_intel.whl + paddlepaddle-1.7.1-cp36-cp36m-macosx_10_6_intel.whl + paddlepaddle-1.7.1-cp37-cp37m-macosx_10_6_intel.whl

+### Table instruction -You can find the docker image for each release of PaddlePaddle in the [DockerHub](https://hub.docker.com/r/paddlepaddle/paddle/tags/). +- Vertical axis -*** - -

+cpu-mkl: Support CPU training and prediction, use Intel MKL math library -## **Multi-version whl package list - Release** +cpu-openblas: Support CPU training and prediction, use openblas math library + +cuda9-cudnn7-openblas: Support GPU training and prediction, use openblas math library +cuda9_cudnn7-mkl: Support GPU training and prediction, use Intel MKL math library + +cuda10_cudnn7-mkl: Support GPU training and prediction, use Intel MKL math library + + +- Transverse axis + +Generally, it is similar to "cp27-cp27mu", in which: + +27:python tag, refers to python2. Similarly, there are "35", "36", "37", etc + +mu:refers to unicode version python, if it is m, refers to non Unicode version Python + +- Installation package naming rules + +Each installation package has a unique name. They are named according to the official rules of Python. The form is as follows: + +{distribution}-{version}(-{build tag})?-{python tag}-{abi tag}-{platform tag}.whl + +The build tag can be missing, and other parts cannot be missing + +distribution: wheel name + +version: Version, for example 0.14.0 (must be in numeric format) + +python tag: similar to 'py27', 'py2', 'py3', used to indicate the corresponding Python version + +abi tag: similar to 'cp33m', 'abi3', 'none' + +platform tag: similar to 'linux_x86_64', 'any' + + + +

+## **Multi-version whl package list - dev**

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Release Instruction cp27-cp27mu cp27-cp27m cp35-cp35m cp36-cp36m cp37-cp37m
cpu-mkl - paddlepaddle-1.5.1-cp27-cp27mu-linux_x86_64.whl - paddlepaddle-1.5.1-cp27-cp27m-linux_x86_64.whl - paddlepaddle-1.5.1-cp35-cp35m-linux_x86_64.whl - paddlepaddle-1.5.1-cp36-cp36m-linux_x86_64.whl - paddlepaddle-1.5.1-cp37-cp37m-linux_x86_64.whl
cpu-openblas - paddlepaddle-1.5.1-cp27-cp27mu-linux_x86_64.whl paddlepaddle-1.5.1-cp27-cp27m-linux_x86_64.whl - paddlepaddle-1.5.1-cp35-cp35m-linux_x86_64.whl - paddlepaddle-1.5.1-cp36-cp36m-linux_x86_64.whl - paddlepaddle-1.5.1-cp37-cp37m-linux_x86_64.whl
cuda8-cudnn7-openblas paddlepaddle_gpu-1.5.1-cp27-cp27mu-linux_x86_64.whl paddlepaddle_gpu-1.5.1-cp27-cp27m-linux_x86_64.whl paddlepaddle_gpu-1.5.1-cp35-cp35m-linux_x86_64.whl paddlepaddle_gpu-1.5.1-cp36-cp36m-linux_x86_64.whl paddlepaddle_gpu-1.5.1-cp37-cp37m-linux_x86_64.whl
cuda8-cudnn7-mkl paddlepaddle_gpu-1.5.1-cp27-cp27mu-linux_x86_64.whl paddlepaddle_gpu-1.5.1-cp27-cp27m-linux_x86_64.whl paddlepaddle_gpu-1.5.1-cp35-cp35m-linux_x86_64.whl paddlepaddle_gpu-1.5.1-cp36-cp36m-linux_x86_64.whl paddlepaddle_gpu-1.5.1-cp37-cp37m-linux_x86_64.whl
cuda9-cudnn7-mkl paddlepaddle_gpu-1.5.1-cp27-cp27mu-linux_x86_64.whl paddlepaddle_gpu-1.5.1-cp27-cp27m-linux_x86_64.whl paddlepaddle_gpu-1.5.1-cp35-cp35m-linux_x86_64.whl paddlepaddle_gpu-1.5.1-cp36-cp36m-linux_x86_64.whl paddlepaddle_gpu-1.5.1-cp37-cp37m-linux_x86_64.whl
cuda10_cudnn7-mkl paddlepaddle_gpu-1.5.1-cp27-cp27mu-linux_x86_64.whl paddlepaddle_gpu-1.5.1-cp27-cp27m-linux_x86_64.whl paddlepaddle_gpu-1.5.1-cp35-cp35m-linux_x86_64.whl - paddlepaddle_gpu-1.5.1-cp36-cp36m-linux_x86_64.whl - paddlepaddle_gpu-1.5.1-cp37-cp37m-linux_x86_64.whl
win_cpu_openblas - - paddlepaddle-1.5.1-cp27-cp27m-win_amd64.whl - paddlepaddle-1.5.1-cp35-cp35m-win_amd64.whl - paddlepaddle-1.5.1-cp36-cp36m-win_amd64.whl - paddlepaddle-1.5.1-cp37-cp37m-win_amd64.whl
win_cuda8_cudnn7_openblas - - paddlepaddle_gpu-1.5.1-cp27-cp27m-win_amd64.whl - paddlepaddle_gpu-1.5.1-cp35-cp35m-win_amd64.whl - paddlepaddle_gpu-1.5.1-cp36-cp36m-win_amd64.whl - paddlepaddle_gpu-1.5.1-cp37-cp37m-win_amd64.whl
win_cuda9_cudnn7_openblas - - paddlepaddle_gpu-1.5.1-cp27-cp27m-win_amd64.whl - paddlepaddle_gpu-1.5.1-cp35-cp35m-win_amd64.whl - paddlepaddle_gpu-1.5.1-cp36-cp36m-win_amd64.whl - paddlepaddle_gpu-1.5.1-cp37-cp37m-win_amd64.whl
mac_cpu - - paddlepaddle-1.5.1-cp27-cp27m-macosx_10_6_intel.whl - paddlepaddle-1.5.1-cp35-cp35m-macosx_10_6_intel.whl - paddlepaddle-1.5.1-cp36-cp36m-macosx_10_6_intel.whl - paddlepaddle-1.5.1-cp37-cp37m-macosx_10_6_intel.whl
version number cp27-cp27mu cp27-cp27m cp35-cp35m cp36-cp36m cp37-cp37m
cpu-mkl + paddlepaddle-latest-cp27-cp27mu-linux_x86_64.whl + paddlepaddle-latest-cp27-cp27m-linux_x86_64.whl + paddlepaddle-latest-cp35-cp35m-linux_x86_64.whl + paddlepaddle-latest-cp36-cp36m-linux_x86_64.whl + paddlepaddle-latest-cp37-cp37m-linux_x86_64.whl
cpu-openblas + paddlepaddle-latest-cp27-cp27mu-linux_x86_64.whl paddlepaddle-latest-cp27-cp27m-linux_x86_64.whl + paddlepaddle-latest-cp35-cp35m-linux_x86_64.whl + paddlepaddle-latest-cp36-cp36m-linux_x86_64.whl + paddlepaddle-latest-cp37-cp37m-linux_x86_64.whl
cuda9-cudnn7-openblas paddlepaddle_gpu-latest-cp27-cp27mu-linux_x86_64.whl paddlepaddle_gpu-latest-cp27-cp27m-linux_x86_64.whl paddlepaddle_gpu-latest-cp35-cp35m-linux_x86_64.whl paddlepaddle_gpu-latest-cp36-cp36m-linux_x86_64.whl paddlepaddle_gpu-latest-cp37-cp37m-linux_x86_64.whl
cuda9-cudnn7-mkl paddlepaddle_gpu-latest-cp27-cp27mu-linux_x86_64.whl paddlepaddle_gpu-latest-cp27-cp27m-linux_x86_64.whl paddlepaddle_gpu-latest-cp35-cp35m-linux_x86_64.whl paddlepaddle_gpu-latest-cp36-cp36m-linux_x86_64.whl paddlepaddle_gpu-latest-cp37-cp37m-linux_x86_64.whl
cuda10-cudnn7-mkl paddlepaddle_gpu-latest-cp27-cp27mu-linux_x86_64.whl paddlepaddle_gpu-latest-cp27-cp27m-linux_x86_64.whl paddlepaddle_gpu-latest-cp35-cp35m-linux_x86_64.whl + paddlepaddle_gpu-latest-cp36-cp36m-linux_x86_64.whl + paddlepaddle_gpu-latest-cp37-cp37m-linux_x86_64.whl

- +

- -## **Multi-version whl package list - dev** +## **Multi-version whl package list(gcc8.2)-develop** +

+ + + + + + + + + + + + + + + + + + + + + +
版本说明 cp27-cp27mu cp27-cp27m cp35-cp35m cp36-cp36m cp37-cp37m
cuda10.1-cudnn7-mkl + paddlepaddle_gpu-0.0.0-cp27-cp27mu-linux_x86_64.whl + paddlepaddle_gpu-0.0.0-cp27-cp27m-linux_x86_64.whl + paddlepaddle_gpu-0.0.0-cp35-cp35m-linux_x86_64.whl + paddlepaddle_gpu-0.0.0-cp36-cp36m-linux_x86_64.whl + paddlepaddle_gpu-0.0.0-cp37-cp37m-linux_x86_64.whl
+

+ +

+## **Multi-version whl package list(gcc8.2)-release**

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + +
Release Instruction cp27-cp27mu cp27-cp27m cp35-cp35m cp36-cp36m cp37-cp37m
cpu-mkl - paddlepaddle-latest-cp27-cp27mu-linux_x86_64.whl - paddlepaddle-latest-cp27-cp27m-linux_x86_64.whl - paddlepaddle-latest-cp35-cp35m-linux_x86_64.whl - paddlepaddle-latest-cp36-cp36m-linux_x86_64.whl - paddlepaddle-latest-cp37-cp37m-linux_x86_64.whl
cpu-openblas - paddlepaddle-latest-cp27-cp27mu-linux_x86_64.whl paddlepaddle-latest-cp27-cp27m-linux_x86_64.whl - paddlepaddle-latest-cp35-cp35m-linux_x86_64.whl - paddlepaddle-latest-cp36-cp36m-linux_x86_64.whl - paddlepaddle-latest-cp37-cp37m-linux_x86_64.whl
cuda8-cudnn7-openblas paddlepaddle_gpu-latest-cp27-cp27mu-linux_x86_64.whl paddlepaddle_gpu-latest-cp27-cp27m-linux_x86_64.whl paddlepaddle_gpu-latest-cp35-cp35m-linux_x86_64.whl paddlepaddle_gpu-latest-cp36-cp36m-linux_x86_64.whl paddlepaddle_gpu-latest-cp37-cp37m-linux_x86_64.whl
cuda8-cudnn7-mkl paddlepaddle_gpu-latest-cp27-cp27mu-linux_x86_64.whl paddlepaddle_gpu-latest-cp27-cp27m-linux_x86_64.whl paddlepaddle_gpu-latest-cp35-cp35m-linux_x86_64.whl paddlepaddle_gpu-latest-cp36-cp36m-linux_x86_64.whl paddlepaddle_gpu-latest-cp37-cp37m-linux_x86_64.whl
cuda9-cudnn7-mkl paddlepaddle_gpu-latest-cp27-cp27mu-linux_x86_64.whl paddlepaddle_gpu-latest-cp27-cp27m-linux_x86_64.whl paddlepaddle_gpu-latest-cp35-cp35m-linux_x86_64.whl paddlepaddle_gpu-latest-cp36-cp36m-linux_x86_64.whl paddlepaddle_gpu-latest-cp37-cp37m-linux_x86_64.whl
cuda10_cudnn7-mkl paddlepaddle_gpu-latest-cp27-cp27mu-linux_x86_64.whl paddlepaddle_gpu-latest-cp27-cp27m-linux_x86_64.whl paddlepaddle_gpu-latest-cp35-cp35m-linux_x86_64.whl - paddlepaddle_gpu-latest-cp36-cp36m-linux_x86_64.whl - paddlepaddle_gpu-latest-cp37-cp37m-linux_x86_64.whl
version instruction cp27-cp27mu cp27-cp27m cp35-cp35m cp36-cp36m cp37-cp37m
cuda10.1-cudnn7-mkl + paddlepaddle_gpu-1.7.1.gcc8.post107-cp27-cp27mu-linux_x86_64.whl + paddlepaddle_gpu-1.7.1.gcc8.post107-cp27-cp27m-linux_x86_64.whl + paddlepaddle_gpu-1.7.1.gcc8.post107-cp35-cp35m-linux_x86_64.whl + paddlepaddle_gpu-1.7.1.gcc8.post107-cp36-cp36m-linux_x86_64.whl + paddlepaddle_gpu-1.7.1.gcc8.post107-cp37-cp37m-linux_x86_64.whl

+

+ ## Execute the PaddlePaddle training program in Docker -*** Suppose you have written a PaddlePaddle program in the current directory (such as /home/work): `train.py` ( refer to [PaddlePaddleBook](https://github.com/PaddlePaddle/book/blob/develop/01.fit_a_line/README.cn.md) to write), you can start the training with the following command: @@ -541,7 +605,6 @@ Of course, you can also enter into the Docker container and execute or debug you ## Start PaddlePaddle Book tutorial with Docker -*** Use Docker to quickly launch a local Jupyter Notebook containing the PaddlePaddle official Book tutorial, which can be viewed on the web. PaddlePaddle Book is an interactive Jupyter Notebook for users and developers. If you want to learn more about deep learning, PaddlePaddle Book is definitely your best choice. You can read tutorials or create and share interactive documents with code, formulas, charts, and text. @@ -563,7 +626,6 @@ It's that simple and bon voyage! For further questions, please refer to the [FAQ

## Perform GPU training using Docker -*** In order to ensure that the GPU driver works properly in the image, we recommend using [nvidia-docker](https://github.com/NVIDIA/nvidia-docker) to run the image. Don't forget to install the latest GPU drivers on your physical machine in advance. @@ -579,13 +641,3 @@ In order to ensure that the GPU driver works properly in the image, we recommend ${DEVICES} -it hub.baidubce.com/paddlepaddle/paddle:latest-gpu - -**About AVX:** - -AVX is a set of CPU instructions that speeds up the calculation of PaddlePaddle. The latest PaddlePaddle Docker image is enabled by default for AVX compilation, so if your computer does not support AVX, you need to compile PaddlePaddle to no-avx version separately. - -The following instructions can check if the Linux computer supports AVX: - -`if cat /proc/cpuinfo | grep -i avx; then echo Yes; else echo No; fi` - -If the output is No, you need to choose a mirror that uses no-AVX. diff --git a/doc/fluid/install/compile/compile_CentOS_en.md b/doc/fluid/install/compile/compile_CentOS_en.md index 564ac3d4bdffbee586cd8f1c7f5748e4b82e39f8..81220c6ef342ae09c7ba084b285c8cb1756bf218 100644 --- a/doc/fluid/install/compile/compile_CentOS_en.md +++ b/doc/fluid/install/compile/compile_CentOS_en.md @@ -1,31 +1,54 @@ -*** # **Compile on CentOS from Source Code** -This instruction will show you how to compile PaddlePaddle on a 64-bit desktop or laptop and CentOS. The Centos systems we support must meet the following requirements: +## Environment preparation -* CentOS 7 / 6 (this involves whether the related tools can be installed normally) +* **CentOS version (64 bit)** + * **CentOS 6 (not recommended, no official support for compilation problems)** + * **CentOS 7 (GPU version supports CUDA 9.0/9.1/9.2/10.0/10.1 CUDA 9.1, only support single-card mode)** +* **Python version 2.7.15+/3.5.1+/3.6/3.7 (64 bit)** +* **pip or pip3 version 9.0.1+ (64 bit)** -## Determine which version to compile +## Choose CPU/GPU -* **Only PaddlePaddle for CPU is supported.** +* If your computer doesn't have NVIDIA® GPU, please install CPU version of PaddlePaddle -## Choose a compilation method +* If your computer has NVIDIA® GPU, and the following conditions are met,GPU version of PaddlePaddle is recommended. -We provide two compilation methods under the CentOS system: + * **CUDA toolkit 10.0 with cuDNN v7.3+(for multi card support, NCCL2.3.7 or higher)** + * **CUDA toolkit 9.0 with cuDNN v7.3+(for multi card support, NCCL2.3.7 or higher)** + * **Hardware devices with GPU computing power over 1.0** -* Docker source code compilation (the CentOS 6 / 7 GPU version is not supported) (this image already contains python2.7, python3.6, python3.7 environment) -* Direct native source code compilation (does not support all versions of CentOS 6 and GPU versions of CentOS 7) + You can refer to NVIDIA official documents for installation process and configuration method of CUDA and cudnn. Please refer to[CUDA](https://docs.nvidia.com/cuda/cuda-installation-guide-linux/),[cuDNN](https://docs.nvidia.com/deeplearning/sdk/cudnn-install/) -We recommend using **Docker for compilation** because we are installing both the tools and the configuration in a Docker image. This way, if you encounter problems, others can reproduce the problem to help. In addition, for developers accustomed to using Windows and MacOS, there is no need to configure a cross-compilation environment using Docker. It should be emphasized that Docker does not virtualize any hardware. The compiler tools running in the Docker container are actually running directly on the native CPU and operating system. The performance is the same as installing the compiler on the machine. +* * If you need to use multi card environment, please make sure that you have installed nccl2 correctly, or install nccl2 according to the following instructions (here is the installation instructions of nccl2 under ubuntu 16.04, CUDA9 and cuDNN7). For more version of installation information, please refer to NVIDIA[official website](https://developer.nvidia.com/nccl): -Also for those who can't install Docker for a variety of reasons, we also provide a way to **compile directly from sources**, but since the situation on host machine is more complicated, we only support specific systems. + wget http://developer.download.nvidia.com/compute/machine-learning/repos/rhel7/x86_64/nvidia-machine-learning-repo-rhel7-1.0.0-1.x86_64.rpm + rpm -i nvidia-machine-learning-repo-rhel7-1.0.0-1.x86_64.rpm + sudo apt-get install -y libnccl2=2.3.7-1+cuda9.0 libnccl-dev=2.3.7-1+cuda9.0 + yum update -y + yum install -y libnccl-2.3.7-2+cuda9.0 libnccl-devel-2.3.7-2+cuda9.0 libnccl-static-2.3.7-2+cuda9.0 -### ***Compile with Docker*** -In order to better use Docker and avoid problems, we recommend using **the highest version of Docker**. For details on **installing and using Docker**, please refer to the [official Docker documentation](https://docs.docker.com/install/). +## Installation steps -Once you have **properly installed Docker**, you can start **compiling PaddlePaddle with Docker**: +There are two compilation methods under CentOS system: + +* Compile with Docker(GPU version only supports CentOS 7) +* Local compilation (no official support for compilation problems under CentOS 6) + + +### **Compile with Docker** + +[Docker](https://docs.docker.com/install/) is an open source application container engine. Using docker, you can not only isolate the installation and use of paddlepaddle from the system environment, but also share GPU, network and other resources with the host + +Compiling PaddlePaddle with Docker,you need: + +- On the local host [Install Docker](https://hub.docker.com/search/?type=edition&offering=community) + +- To enable GPU support on Linux, please [Install nvidia-docker](https://github.com/NVIDIA/nvidia-docker) + +Please follow the steps below to install: 1. First select the path where you want to store PaddlePaddle, then use the following command to clone PaddlePaddle's source code from github to a folder named Paddle in the local current directory: @@ -33,28 +56,66 @@ Once you have **properly installed Docker**, you can start **compiling PaddlePad 2. Go to the Paddle directory: `cd Paddle` -3. Take advantage of the image we provided (with this command you don't have to download the image in advance): +3. Create and enter a Docker container that meets the compilation environment: + + * Compile CPU version of PaddlePaddle: + + + + `docker run --name paddle-test -v $PWD:/paddle --network=host -it hub.baidubce.com/paddlepaddle/paddle:latest-dev /bin/bash` + + > --name paddle-test names the Docker container you created as paddle-test; + + + > -v $PWD:/paddle mount the current directory to the /paddle directory in the docker container (PWD variable in Linux will be expanded to [absolute path](https://baike.baidu.com/item/绝对路径/481185) of the current path); + - `docker run --name paddle-test -v $PWD:/paddle --network=host -it` `hub.baidubce.com/paddlepaddle/paddle:latest-dev /bin/bash` + > -it keeps interaction with the host,`hub.baidubce.com/paddlepaddle/paddle:latest-dev` use the image named `hub.baidubce.com/paddlepaddle/paddle:latest-dev` to create Docker container, /bin/bash start the /bin/bash command after entering the container. + + + + * Compile GPU version of PaddlePaddle (only supports CentOS 7): + + + + `nvidia-docker run --name paddle-test -v $PWD:/paddle --network=host -it hub.baidubce.com/paddlepaddle/paddle:latest-dev /bin/bash` + + > --name paddle-test names the Docker container you created as paddle-test; + + + > -v $PWD:/paddle mount the current directory to the /paddle directory in the docker container (PWD variable in Linux will be expanded to [absolute path](https://baike.baidu.com/item/绝对路径/481185) of the current path); + + + + > -it keeps interaction with the host,`hub.baidubce.com/paddlepaddle/paddle:latest-dev` use the image named `hub.baidubce.com/paddlepaddle/paddle:latest-dev` to create Docker container, /bin/bash start the /bin/bash command after entering the container. + + + > Note: hub.baidubce.com/paddlepaddle/paddle:latest-dev internally install CUDA 8.0. - > `--name paddle-test` names the Docker container you created as paddle-test, `-v $PWD:/paddle` mounts the current directory to the /paddle directory in the Docker container (the PWD variable in Linux will expand to the current [Absolute path](https://baike.baidu.com/item/%E7%BB%9D%E5%AF%B9%E8%B7%AF%E5%BE%84/481185)), `-it` keeps interacting with the host, `hub.baidubce.com/paddlepaddle/paddle` creates a Docker container with an image called `hub.baidubce.com/paddlepaddle/paddle:latest-dev`, /bin/bash enters the container After starting the `/bin/bash` command. 4. After entering Docker, go to the paddle directory: `cd paddle` 5. Switch to a more stable version to compile: - `git checkout v1.1` + `git checkout [name of the branch]` + + For example: + + `git checkout release/1.5` + + Note: python3.6、python3.7 version started supporting from release/1.2 branch 6. Create and enter the /paddle/build path: `mkdir -p /paddle/build && cd /paddle/build` -7. Use the following command to install the dependencies: (For Python3: Please select the pip for the python version you wish to use, such as pip3.5, pip3.6) +7. Use the following command to install the dependencies: - For Python2: pip install protobuf==3.1.0 - For Python3: pip3.5 install protobuf==3.1.0 + For Python2: pip install protobuf + For Python3: pip3.5 install protobuf + Note: We used Python3.5 command as an example above, if the version of your Python is 3.6/3.7, please change Python3.5 in the commands to Python3.6/Python3.7 > Install protobuf 3.1.0 @@ -65,12 +126,16 @@ Once you have **properly installed Docker**, you can start **compiling PaddlePad 8. Execute cmake: > For details on the compilation options, see the [compilation options table](../Tables.html/#Compile). + > Please attention to modify parameters `-DPY_VERSION` for the version of Python you want to compile with, for example `-DPY_VERSION=3.5` means the version of python is 3.5.x * For users who need to compile the **CPU version PaddlePaddle**: - `cmake .. -DWITH_FLUID_ONLY=ON -DWITH_GPU=OFF -DWITH_TESTING=OFF -DCMAKE_BUILD_TYPE=Release` + `cmake .. -DPY_VERSION=3.5 -DWITH_GPU=OFF -DWITH_TESTING=OFF -DCMAKE_BUILD_TYPE=Release` - > We currently do not support the compilation of the GPU version PaddlePaddle under CentOS. + * For users who need to compile the **GPU version PaddlePaddle**: + `cmake .. -DPY_VERSION=3.5 -DWITH_GPU=ON -DWITH_TESTING=OFF -DCMAKE_BUILD_TYPE=Release` + + > We currently do not support the compilation of the GPU version PaddlePaddle under CentOS 6. 9. Execute compilation: @@ -80,30 +145,23 @@ Once you have **properly installed Docker**, you can start **compiling PaddlePad 10. After compiling successfully, go to the `/paddle/build/python/dist` directory and find the generated `.whl` package: `cd /paddle/build/python/dist` -11. Install the compiled `.whl` package on the current machine or target machine: (For Python3: Please select the pip corresponding to the python version you wish to use, such as pip3.5, pip3.6) - +11. Install the compiled `.whl` package on the current machine or target machine: - For Python2: pip install (whl package name) - For Python3: pip3.5 install (whl package name) + For Python2: pip install -U (whl package name) + For Python3: pip3.5 install -U (whl package name) + Note: For the command involving Python 3, we use Python 3.5 as an example above, if the version of your Python is 3.6/3.7, please change Python3.5 in the commands to Python3.6/Python3.7 -Now that you have successfully installed PaddlePaddle using Docker, you only need to run PaddlePaddle after entering the Docker container. For more Docker usage, please refer to the [official Docker documentation](https://docs.docker.com/). +Congratulations, now that you have successfully installed PaddlePaddle using Docker, you only need to run PaddlePaddle after entering the Docker container. For more Docker usage, please refer to the [official Docker documentation](https://docs.docker.com/). -> Notes: In order to reduce the size, `vim` is not installed in PaddlePaddle Docker image by default. You can edit the code in the container after executing `apt-get install -y vim` in the container. - -Congratulations, you have now completed the process of compiling PaddlePaddle using Docker. - - - -

-### *Local compilation* - -**Please strictly follow the order of the following instructions** +> Note: In order to reduce the size, `vim` is not installed in PaddlePaddle Docker image by default. You can edit the code in the container after executing `apt-get install -y vim` in the container. + +### **Local compilation** 1. Check that your computer and operating system meet the compilation standards we support: `uname -m && cat /etc/*release` -2. Update the source of `yum`: `yum update`, and add the necessary yum source: `yum install -y epel-release`, and install openCV in advance +2. Update the source of `yum`: `yum update`, and add the necessary yum source: `yum install -y epel-release`, and install [OpenCV](https://opencv.org/releases.html) in advance 3. Install the necessary tools `bzip2` and `make`: `yum install -y bzip2 `, `yum install -y make` @@ -143,11 +201,12 @@ Congratulations, you have now completed the process of compiling PaddlePaddle us 3. Find `virtualenvwrapper.sh`: `find / -name virtualenvwrapper.sh` (please find the corresponding Python version of `virtualenvwrapper.sh`) - 4. See the installation method in `virtualenvwrapper.sh`: `cat vitualenvwrapper.sh` + 4. See the installation method in `virtualenvwrapper.sh`: `cat vitualenvwrapper.sh`, this shell file describes the steps and commands - 5. Install `virtualwrapper` + 5. Install `virtualwrapper` as described in `virtualenvwrapper.sh` - 6. Create a virtual environment called `paddle-venv`: `mkvirtualenv paddle-venv` + 6. Set VIRTUALENVWRAPPER_PYTHON:`export VIRTUALENVWRAPPER_PYTHON=[python-lib-path]:$PATH` (here replace the last two levels content of [python-lib-path] with /bin/) + 7. Create virtual environment named `paddle-venv`: `mkvirtualenv paddle-venv` 5. Enter the virtual environment: `workon paddle-venv` @@ -156,7 +215,7 @@ Congratulations, you have now completed the process of compiling PaddlePaddle us * Here is the installation method for `patchELF`. Other dependencies can be installed using `yum install` or `pip install`/`pip3 install` followed by the name and version: `yum install patchelf` - > Users who can't use apt installation can refer to patchElF [github official documentation](https://gist.github.com/ruario/80fefd174b3395d34c14). + > Users who can't use apt installation can refer to patchElF github [official documentation](https://gist.github.com/ruario/80fefd174b3395d34c14). 7. Put the PaddlePaddle source cloned in the Paddle folder in the current directory and go to the Paddle directory: @@ -166,7 +225,11 @@ Congratulations, you have now completed the process of compiling PaddlePaddle us 8. Switch to a more stable release branch for compilation (support for Python 3.6 and 3.7 is added from the 1.2 branch): - - `git checkout release/1.2` + - `git checkout [name of target branch]` + + For example: + + `git checkout release/1.5` 9. And please create and enter a directory called build: @@ -179,30 +242,57 @@ Congratulations, you have now completed the process of compiling PaddlePaddle us * For users who need to compile the **CPU version PaddlePaddle**: - For Python2: cmake .. -DWITH_FLUID_ONLY=ON -DWITH_GPU=OFF -DWITH_TESTING=OFF -DCMAKE_BUILD_TYPE=Release + For Python2: cmake .. -DWITH_GPU=OFF -DWITH_TESTING=OFF -DCMAKE_BUILD_TYPE=Release For Python3: cmake .. -DPY_VERSION=3.5 -DPYTHON_INCLUDE_DIR=${PYTHON_INCLUDE_DIRS} \ - -DPYTHON_LIBRARY=${PYTHON_LIBRARY} -DWITH_FLUID_ONLY=ON -DWITH_GPU=OFF -DWITH_TESTING=OFF -DCMAKE_BUILD_TYPE=Release + -DPYTHON_LIBRARY=${PYTHON_LIBRARY} -DWITH_GPU=OFF -DWITH_TESTING=OFF -DCMAKE_BUILD_TYPE=Release > If you encounter `Could NOT find PROTOBUF (missing: PROTOBUF_LIBRARY PROTOBUF_INCLUDE_DIR)`, you can re-execute the cmake command. > Please note that the PY_VERSION parameter is replaced with the python version you need. + + * For users who need to compile the **GPU version PaddlePaddle**: + + 1. Please make sure that you have installed nccl2 correctly, or install nccl2 according to the following instructions (here is ubuntu 16.04, CUDA9, ncDNN7 nccl2 installation instructions), for more information on the installation information please refer to the [NVIDIA official website](https://developer.nvidia.com/nccl/nccl-download): + + i. `wget http://developer.download.nvidia.com/compute/machine-learning/repos/rhel7/x86_64/nvidia-machine-learning-repo-rhel7-1.0.0-1.x86_64.rpm` + + ii. `rpm -i nvidia-machine-learning-repo-rhel7-1.0.0-1.x86_64.rpm` + + iii. `yum install -y libnccl-2.3.7-2+cuda9.0 libnccl-devel-2.3.7-2+cuda9.0 libnccl-static-2.3.7-2+cuda9.0` + + 2. If you have already installed `nccl2` correctly, you can start cmake: *(For Python3: Please configure the correct python version for the PY_VERSION parameter)* + + For Python2: cmake .. -DWITH_GPU=ON -DWITH_TESTING=OFF -DCMAKE_BUILD_TYPE=Release + For Python3: cmake .. -DPYTHON_EXECUTABLE:FILEPATH=[您可执行的Python3的路径] -DPYTHON_INCLUDE_DIR:PATH=[之前的PYTHON_INCLUDE_DIRS] -DPYTHON_LIBRARY:FILEPATH=[之前的PYTHON_LIBRARY] -DWITH_GPU=ON -DWITH_TESTING=OFF -DCMAKE_BUILD_TYPE=Release + + + Note: For the command involving Python 3, we use Python 3.5 as an example above, if the version of your Python is 3.6/3.7, please change Python3.5 in the commands to Python3.6/Python3.7 + + + 11. Compile with the following command: `make -j$(nproc)` + > Use multicore compilation + + > If “Too many open files” error is displayed during compilation, please use the instruction ulimit -n 8192 to increase the number of files allowed to be opened by the current process. Generally speaking, 8192 can ensure the completion of compilation. + 12. After compiling successfully, go to the `/paddle/build/python/dist `directory and find the generated `.whl` package: `cd /paddle/build/python/dist` 13. Install the compiled `.whl` package on the current machine or target machine: - `Pip install (whl package name) `or `pip3 install (whl package name)` + `Pip install -U (whl package name) `or `pip3 install -U (whl package name)` Congratulations, now you have completed the process of compiling PaddlePaddle natively.

### ***Verify installation*** -After the installation is complete, you can use `python` to enter the Python interpreter and then use `import paddle.fluid` to verify that the installation was successful. +After the installation is complete, you can use `python` or `python3` to enter the Python interpreter and then use `import paddle.fluid as fluid` and then `fluid.install_check.run_check()` to verify that the installation was successful. + +If `Your Paddle Fluid is installed succesfully!` appears, it means the installation was successful.

### ***How to uninstall*** @@ -210,3 +300,6 @@ After the installation is complete, you can use `python` to enter the Python int Please use the following command to uninstall PaddlePaddle (users who use Docker to install PaddlePaddle should use the following command in the container containing PaddlePaddle. Please use the corresponding version of pip): * ***CPU version of PaddlePaddle***: `pip uninstall paddlepaddle` or `pip3 uninstall paddlepaddle` +* ***GPU version of PaddlePaddle***: `pip uninstall paddlepaddle-gpu` or `pip3 uninstall paddlepaddle-gpu` + +Users installing PaddlePaddle with Docker, please use above commands in the container involved PaddlePaddle and attention to use the corresponding version of Pip diff --git a/doc/fluid/install/compile/compile_MacOS_en.md b/doc/fluid/install/compile/compile_MacOS_en.md index 10fee4d91371764c39c6e32c075241105e35b404..b00557ea5f01cf9b611c2649d259941170b600b2 100644 --- a/doc/fluid/install/compile/compile_MacOS_en.md +++ b/doc/fluid/install/compile/compile_MacOS_en.md @@ -1,34 +1,33 @@ -*** # **Compile on MacOS from Source Code** -This instruction will show you how to compile PaddlePaddle on *64-bit desktops or laptops* and MacOS systems. The MacOS systems we support need to meet the following requirements: +## Environment preparation -* MacOS 10.12/10.13/10.14 (this involves whether the related tools can be installed normally) +* **MacOS version 10.11/10.12/10.13/10.14 (64 bit) (not support GPU version)** +* **Python version 2.7.15+/3.5.1+/3.6/3.7 (64 bit)** +* **pip or pip3 version 9.0.1+ (64 bit)** -## Determine which version to compile +## Choose CPU/GPU -* **Only PaddlePaddle for CPU is supported.** +* Currently, only PaddlePaddle for CPU is supported. -## Choose a compilation method +## Installation steps +There are two compilation methods in MacOS system: -Under the MacOS 10.12/10.13/10.14 system we offer 2 ways to compile: +* Compile with docker +* Local compilation -* Docker source compilation (this image already contains python2.7, python3.6, python3.7 environment) -* Direct source code compilation - - -We recommend **using Docker for compilation** because we are installing both the tools and the configuration in a Docker image. This way, if you encounter problems, others can reproduce the problem to help. In addition, for developers accustomed to using Windows and MacOS, there is no need to configure a cross-compilation environment using Docker. It should be emphasized that Docker does not virtualize any hardware. The compiler tools running in the Docker container are actually running directly on the native CPU and operating system. The performance is the same as installing the compiler on the machine. + +### ***Compile with Docker*** -Also for those who can't install Docker for a variety of reasons, we also provide a way to **compile directly from local sources**, but since the situation on this machine is more complicated, we only support specific systems. +[Docker](https://docs.docker.com/install/) is an open source application container engine. Using docker, you can not only isolate the installation and use of paddlepaddle from the system environment, but also share GPU, network and other resources with the host -

-### ***Compile with Docker*** +Compiling PaddlePaddle with Docker,you need: -In order to better use Docker and avoid problems, we recommend using **the highest version of Docker**. For details on **installing and using Docker**, please refer to the [official Docker documentation](https://docs.docker.com/install/). +- On the local host [Install Docker](https://hub.docker.com/search/?type=edition&offering=community) -> Please note that running Docker on MacOS requires logging in with your dockerID, otherwise an Authenticate Failed error will occur. +- Log in to Docker with Docker ID to avoid `Authenticate Failed` error -Once you have **properly installed Docker**, you can start **compiling PaddlePaddle with Docker**: +Please follow the steps below to install: 1. Enter the terminal of the Mac @@ -38,27 +37,40 @@ Once you have **properly installed Docker**, you can start **compiling PaddlePad 3. Go to the Paddle directory: `cd Paddle` -4. Take advantage of the image we provided (with this command you don't have to download the image in advance): +4. Create and enter a Docker container that meets the compilation environment: - `docker run --name paddle-test -v $PWD:/paddle --network=host -it` `hub.baidubce.com/paddlepaddle/paddle:latest-dev /bin/bash` + `docker run --name paddle-test -v $PWD:/paddle --network=host -it hub.baidubce.com/paddlepaddle/paddle:latest-dev /bin/bash` - > --name paddle-test Name the Docker container you created as paddle-test, -v $PWD:/paddle mount the current directory to the /paddle directory in the Docker container (the PWD variable in Linux will expand to the current path's [Absolute path](https://baike.baidu.com/item/绝对路径/481185)), -it keeps interacting with the host, `hub.baidubce.com/paddlepaddle/paddle:latest-dev` creates a Docker container with a mirror named `hub.baidubce.com/paddlepaddle/paddle:latest-dev`, /bin /bash starts the /bin/bash command after entering the container. + > --name paddle-test name the Docker container you created as paddle-test, -5. After entering Docker, go to the paddle directory: `cd paddle` + > -v $PWD:/paddle mount the current directory to the /paddle directory in the Docker container (the PWD variable in Linux will expand to the current path's [Absolute path](https://baike.baidu.com/item/绝对路径/481185)), + + > -it keeps interacting with the host, `hub.baidubce.com/paddlepaddle/paddle:latest-dev` creates a Docker container with a mirror named `hub.baidubce.com/paddlepaddle/paddle:latest-dev`, /bin /bash starts the /bin/bash command after entering the container. + +5. After entering Docker, go to the paddle directory: + + `cd paddle` 6. Switch to a more stable version to compile: - `git checkout v1.1` + `git checkout [name of the branch]` + + For example: + + `git checkout release/1.5` + + Note: python3.6、python3.7 version started supporting from release/1.2 branch 7. Create and enter the /paddle/build path: `mkdir -p /paddle/build && cd /paddle/build` -8. Use the following command to install the dependencies: (For Python3: Please select the pip for the python version you wish to use, such as pip3.5, pip3.6) +8. Use the following command to install the dependencies: + For Python2: pip install protobuf==3.1.0 + For Python3: pip3.5 install protobuf==3.1.0 - For Python2: pip install protobuf==3.1.0 - For Python3: pip3.5 install protobuf==3.1.0 + Note: We used Python3.5 command as an example above, if the version of your Python is 3.6/3.7, please change Python3.5 in the commands to Python3.6/Python3.7 > Install protobuf 3.1.0. @@ -69,12 +81,13 @@ Once you have **properly installed Docker**, you can start **compiling PaddlePad 9. Execute cmake: > For details on the compilation options, see the [compilation options table](../Tables_en.html/#Compile). + > Please attention to modify parameters `-DPY_VERSION` for the version of Python you want to compile with, for example `-DPY_VERSION=3.5` means the version of python is 3.5.x * For users who need to compile the **CPU version PaddlePaddle**: - `cmake .. -DWITH_FLUID_ONLY=ON -DWITH_GPU=OFF -DWITH_TESTING=OFF -DCMAKE_BUILD_TYPE=Release` + `cmake .. -DPY_VERSION=3.5 -DWITH_GPU=OFF -DWITH_TESTING=OFF -DWITH_AVX=OFF -DCMAKE_BUILD_TYPE=Release` - > We currently do not support the compilation of the GPU version PaddlePaddle under CentOS. + > We currently do not support the compilation of the GPU version PaddlePaddle under CentOS. 10. Execute compilation: @@ -87,23 +100,22 @@ Once you have **properly installed Docker**, you can start **compiling PaddlePad 12. Install the compiled `.whl` package on the current machine or target machine: (For Python3: Please select the pip corresponding to the python version you wish to use, such as pip3.5, pip3.6) - For Python2: pip install (whl package name) - For Python3: pip3.5 install (whl package name) + For Python2: pip install -U (whl package name) + For Python3: pip3.5 install -U (whl package name) + Note: We used Python3.5 command as an example above, if the version of your Python is 3.6/3.7, please change Python3.5 in the commands to Python3.6/Python3.7 -Now that you have successfully installed PaddlePaddle using Docker, you only need to run PaddlePaddle after entering the Docker container. For more Docker usage, please refer to the [official Docker documentation](https://docs.docker.com/). +Congratulations, now that you have successfully installed PaddlePaddle using Docker, you only need to run PaddlePaddle after entering the Docker container. For more Docker usage, please refer to the [official Docker documentation](https://docs.docker.com/). > Note: In order to reduce the size, `vim` is not installed in PaddlePaddle Docker image by default. You can edit the code in the container after executing `apt-get install -y vim` in the container. -Congratulations, you have now completed the process of compiling PaddlePaddle using Docker. - - +

-### ***Native compilation*** +### ***Local compilation*** **Please strictly follow the order of the following instructions** -1. Check that your computer and operating system meet our supported compilation standards: `uname -m` and view the system version `about this Mac`. And install openCV in advance. +1. Check that your computer and operating system meet our supported compilation standards: `uname -m` and view the system version `about this Mac`. And install [OpenCV](https://opencv.org/releases.html) in advance. 2. Install python and pip: @@ -132,7 +144,7 @@ Congratulations, you have now completed the process of compiling PaddlePaddle us - d. Set PYTHON_INCLUDE_DIR: `export PYTHON_INCLUDE_DIRS=[python-include-path]` - - e. Set the system environment variable path: `export PATH=[python-bin-path]:$PATH` (here [python-bin-path] is the result of replacing the last two levels of [python-lib-path] with the path after /bin/ ) + - e. Set the system environment variable path: `export PATH=[python-bin-path]:$PATH` (here [python-bin-path] is the result of replacing the last two levels of [python-lib-path] with the path after /bin/) - f. Set the dynamic library link: `export LD_LIBRARY_PATH=[python-ld-path]` and `export DYLD_LIBRARY_PATH=[python-ld-path]` (here [python-ld-path] is the [python-bin-path]'s parent directory ) @@ -161,7 +173,13 @@ Congratulations, you have now completed the process of compiling PaddlePaddle us 7. Switch to a more stable release branch to compile: (Note that python 3.6, python 3.7 version are supported from the 1.2 branch) - `git checkout release/1.2` + `git checkout [name of the branch]` + + For example: + + `git checkout release/1.5` + + Note: python3.6、python3.7 version started supporting from release/1.2 branch 8. And please create and enter a directory called build: @@ -175,8 +193,8 @@ Congratulations, you have now completed the process of compiling PaddlePaddle us For Python2: cmake .. -DWITH_FLUID_ONLY=ON -DWITH_GPU=OFF -DWITH_TESTING=OFF -DCMAKE_BUILD_TYPE=Release - For Python3: cmake .. -DPY_VERSION=3.5 -DPYTHON_INCLUDE_DIR=${PYTHON_INCLUDE_DIRS} \-DPYTHON_LIBRARY=${PYTHON_LIBRARY} -DWITH_FLUID_ONLY=ON -DWITH_GPU=OFF -DWITH_TESTING=OFF -DCMAKE_BUILD_TYPE=Release - + For Python3: cmake .. -DPY_VERSION=3.5 -DPYTHON_INCLUDE_DIR=${PYTHON_INCLUDE_DIRS} \ + -DPYTHON_LIBRARY=${PYTHON_LIBRARY} -DWITH_FLUID_ONLY=ON -DWITH_GPU=OFF -DWITH_TESTING=OFF -DCMAKE_BUILD_TYPE=Release > ``-DPY_VERSION=3.5`` Please change to the Python version of the installation environment. @@ -188,7 +206,7 @@ Congratulations, you have now completed the process of compiling PaddlePaddle us 12. Install the compiled `.whl` package on the current machine or target machine: - `pip install (whl package name)` or `pip3 install (whl package name)` + `pip install -U (whl package name)` or `pip3 install -U (whl package name)` > If you have multiple python environments and pips installed on your computer, please see the [FAQ](../Tables.html/#MACPRO). @@ -197,7 +215,9 @@ Congratulations, now you have completed the process of compiling PaddlePaddle us

### ***Verify installation*** -After the installation is complete, you can use `python` to enter the Python interpreter and then use `import paddle.fluid` to verify that the installation was successful. +After the installation is complete, you can use `python` or `python3` to enter the Python interpreter and then use `import paddle.fluid as fluid` and then `fluid.install_check.run_check()` to verify that the installation was successful. + +If `Your Paddle Fluid is installed succesfully!` appears, it means the installation was successful.

### ***How to uninstall*** @@ -205,3 +225,5 @@ After the installation is complete, you can use `python` to enter the Python int Please use the following command to uninstall PaddlePaddle (users who use Docker to install PaddlePaddle should use the following command in the container containing PaddlePaddle. Please use the corresponding version of pip): * ***CPU version of PaddlePaddle***: `pip uninstall paddlepaddle` or `pip3 uninstall paddlepaddle` + +Users installing PaddlePaddle with Docker, please use above commands in the container involved PaddlePaddle and attention to use the corresponding version of Pip diff --git a/doc/fluid/install/compile/compile_Ubuntu_en.md b/doc/fluid/install/compile/compile_Ubuntu_en.md index 37f36b4c829382b71910497e65a9259bd6d58bed..d8104a3af529e12a47d939462300ae25c891fc09 100644 --- a/doc/fluid/install/compile/compile_Ubuntu_en.md +++ b/doc/fluid/install/compile/compile_Ubuntu_en.md @@ -1,109 +1,159 @@ -*** # **Compile on Ubuntu from Source Code** -This instruction describes how to compile PaddlePaddle on *64-bit desktops or laptops* and Ubuntu systems. The Ubuntu systems we support must meet the following requirements: +## Environment preparation -* Ubuntu 14.04/16.04/18.04 (this involves whether the related tools can be installed successfully) +* **Ubuntu version (64 bit)** + * **Ubuntu 14.04 (GPU version supports CUDA 10.0/10.1)** + * **Ubuntu 16.04 (GPU version supports CUDA 9.0/9.1/9.2/10.0/10.1)** + * **Ubuntu 18.04 (GPU version supports CUDA 10.0/10.1)** +* **Python version 2.7.15+/3.5.1+/3.6/3.7 (64 bit)** +* **pip or pip3 version 9.0.1+ (64 bit)** -## Determine which version to compile +## Choose CPU/GPU -* **CPU version of PaddlePaddle**, if your system does not have an NVIDIA® GPU, you must install this version. This version is easier than the GPU version. So even if you have a GPU on your computer, we recommend that you first install the CPU version of PaddlePaddle to check if your local environment is suitable. +* If your computer doesn't have NVIDIA® GPU, please install CPU version of PaddlePaddle -* **GPU version of PaddlePaddle**, in order to make the PaddlePaddle program run more quickly, we usually use the GPU to accelerate the PaddlePaddle program, but the GPU version of PaddlePaddle needs to have the NVIDIA® GPU that meets the following conditions (see NVIDIA for the specific installation process and configuration). Official documentation: [For CUDA](https://docs.nvidia.com/cuda/cuda-installation-guide-linux/), For [cuDNN](https://docs.nvidia.com/deeplearning/sdk/cudnn-install/)) +* If your computer has NVIDIA® GPU, and the following conditions are met,GPU version of PaddlePaddle is recommended. + * **CUDA toolkit 10.0 with cuDNN v7.3+(for multi card support, NCCL2.3.7 or higher)** + * **CUDA toolkit 9.0 with cuDNN v7.3+(for multi card support, NCCL2.3.7 or higher)** + * **CUDA toolkit 8.0 with cuDNN v7.1+(for multi card support, NCCL2.1.15-2.2.13)** + * **Hardware devices with GPU computing power over 1.0** - * *CUDA Toolkit 9.0 with cuDNN v7* - * *CUDA Toolkit 8.0 with cuDNN v7* - * *Hardware devices with GPU compute capability exceeding 1.0* + You can refer to NVIDIA official documents for installation process and configuration method of CUDA and cudnn. Please refer to[CUDA](https://docs.nvidia.com/cuda/cuda-installation-guide-linux/),[cuDNN](https://docs.nvidia.com/deeplearning/sdk/cudnn-install/) -## Choose a compilation method +* * If you need to use multi card environment, please make sure that you have installed nccl2 correctly, or install nccl2 according to the following instructions (here is the installation instructions of nccl2 under ubuntu 16.04, CUDA9 and cuDNN7). For more version of installation information, please refer to NVIDIA[official website](https://developer.nvidia.com/nccl): -Under Ubuntu's system we offer 2 ways to compile: -* Docker source compilation (this image already contains python2.7, python3.6, python3.7 environment) + wget https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64/nvidia-machine-learning-repo-ubuntu1604_1.0.0-1_amd64.deb + dpkg -i nvidia-machine-learning-repo-ubuntu1604_1.0.0-1_amd64.deb + sudo apt-get install -y libnccl2=2.3.7-1+cuda9.0 libnccl-dev=2.3.7-1+cuda9.0 -* Direct native source code compilation (does not support GPU version under ubuntu18.04) +## Installation steps -We recommend using **Docker for compilation** because we are installing both the tools and the configuration in a Docker image. This way, if you encounter problems, others can reproduce the problem to help. In addition, for developers accustomed to using Windows and MacOS, there is no need to configure a cross-compilation environment using Docker. Someone uses a virtual machine to analogize to Docker. It should be emphasized that Docker does not virtualize any hardware. The compiler tools running in the Docker container are actually running directly on the native CPU and operating system. The performance is the same as installing the compiler on the machine. +There are two compilation methods in Ubuntu system: -We also provide methods that can be **compiled from local source code**, but since the situation on host machine is more complicated, we only provide support for specific systems. +* Compile with docker (GPU version under Ubuntu 18.04 is not supported temporarily) +* Local compilation -

-## ***Compile with Docker*** + +### **Compile with docker** + +[Docker](https://docs.docker.com/install/) is an open source application container engine. Using docker, you can not only isolate the installation and use of paddlepaddle from the system environment, but also share GPU, network and other resources with the host + +Compiling PaddlePaddle with Docker,you need: -In order to better use Docker and avoid problems, we recommend using **the highest version of Docker**. For details on **installing and using Docker**, please refer to [the official Docker documentation](https://docs.docker.com/install/). +- On the local host [Install Docker](https://hub.docker.com/search/?type=edition&offering=community) -> Please note that to install and use the PaddlePaddle version that supports GPU, you must first install nvidia-docker +- To enable GPU support on Linux, please [Install nvidia-docker](https://github.com/NVIDIA/nvidia-docker) -Once you have **properly installed Docker**, you can start **compiling PaddlePaddle with Docker**: +Please follow the steps below to install: -1. First select the path where you want to store PaddlePaddle, then use the following command to clone PaddlePaddle's source code from github to a folder named Paddle in the local current directory: +1. First, select the path where you want to store PaddlePaddle, and then use the following command to clone the source code of PaddlePaddle from GitHub to the folder named Paddle under the current local directory: `git clone https://github.com/PaddlePaddle/Paddle.git` -2. Go to the Paddle directory: `cd Paddle` +2. Enter the Paddle Directory: `cd Paddle` + +3. Create and enter a Docker container that meets the compilation environment: + + * Compile CPU version of PaddlePaddle: + + + + `docker run --name paddle-test -v $PWD:/paddle --network=host -it hub.baidubce.com/paddlepaddle/paddle:latest-dev /bin/bash` + + > --name paddle-test names the Docker container you created as paddle-test; + + + > -v $PWD:/paddle mount the current directory to the /paddle directory in the docker container (PWD variable in Linux will be expanded to [absolute path](https://baike.baidu.com/item/绝对路径/481185) of the current path); + + + > -it keeps interaction with the host,`hub.baidubce.com/paddlepaddle/paddle:latest-dev` use the image named `hub.baidubce.com/paddlepaddle/paddle:latest-dev` to create Docker container, /bin/bash start the /bin/bash command after entering the container. + + + * Compile GPU version of PaddlePaddle: + + + + `nvidia-docker run --name paddle-test -v $PWD:/paddle --network=host -it hub.baidubce.com/paddlepaddle/paddle:latest-dev /bin/bash` + + > --name paddle-test names the Docker container you created as paddle-test; -3. Take advantage of the image we provided (with this command you don't have to download the image in advance): - `docker run --name paddle-test -v $PWD:/paddle --network=host -it hub.baidubce.com/paddlepaddle/paddle:latest-dev /bin/bash` + > -v $PWD:/paddle mount the current directory to the /paddle directory in the docker container (PWD variable in Linux will be expanded to [absolute path](https://baike.baidu.com/item/绝对路径/481185) of the current path); - > --name paddle-test names the Docker container you created as paddle-test, -v $PWD:/paddle mounts the current directory to the /paddle directory in the Docker container (the PWD variable in Linux will expand to the current path's [absolute path](https://baike.baidu.com/item/%E7%BB%9D%E5%AF%B9%E8%B7%AF%E5%BE%84/481185)), -it keeps interacting with the host, `hub.baidubce.com/paddlepaddle/paddle:latest-dev` creates a Docker container with a mirror named `hub.baidubce.com/paddlepaddle/paddle:latest-dev`, /bin /bash Starts the /bin/bash command after entering the container. -4. After entering Docker, go to the paddle directory: `cd paddle` + > -it keeps interaction with the host,`hub.baidubce.com/paddlepaddle/paddle:latest-dev` use the image named `hub.baidubce.com/paddlepaddle/paddle:latest-dev` to create Docker container, /bin/bash start the /bin/bash command after entering the container. -5. Switch to a more stable release branch to compile: (Note that python 3.6, python 3.7 version are supported from the 1.2 branch) - `git checkout release/1.2` + > Note: hub.baidubce.com/paddlepaddle/paddle:latest-dev internally install CUDA 8.0. -6. Create and enter the /paddle/build path: +4. After entering Docker, enter the Paddle Directory: + + `cd paddle` + +5. Switch to a more stable release branch for compilation: + + `git checkout [name of the branch]` + + For example: + + `git checkout release/1.5` + + Note: python3.6、python3.7 version started supporting from release/1.2 branch + +6. Create and enter /paddle/build Directory: `mkdir -p /paddle/build && cd /paddle/build` -7. Use the following command to install the dependencies: (For Python3: Please select the pip for the python version you wish to use, such as pip3.5, pip3.6) +7. Use the following command to install dependencies: - For Python2: pip install protobuf==3.1.0 - For Python3: pip3.5 install protobuf==3.1.0 + For Python2: pip install protobuf + For Python3: pip3.5 install protobuf + Note: We used Python3.5 command as an example above, if the version of your Python is 3.6/3.7, please change Python3.5 in the commands to Python3.6/Python3.7 - > Install protobuf 3.1.0. + > Install protobuf `apt install patchelf` - > Installing patchelf, PatchELF is a small and useful program for modifying the dynamic linker and RPATH of ELF executables. + > Install patchelf + This is a small but useful program, it can be used to modify dynamic linker and RPATH of ELF executable -8. Execute cmake: +8. Execute cmake: - > For the meaning of the specific compiling options, [compilation options table](../Tables.html/#Compile) is your resort. Please note that the parameter `-DPY_VERSION` is the python version used in your current environment. + > For the specific meaning of compilation options, you can read [Compile options table](../Tables.html#Compile) - * For users who need to compile the **CPU version PaddlePaddle**: + > Please attention to modify parameters `-DPY_VERSION` for the version of Python you want to compile with, for example `-DPY_VERSION=3.5` means the version of python is 3.5.x - `cmake .. -DPY_VERSION=3.5 -DWITH_FLUID_ONLY=ON -DWITH_GPU=OFF -DWITH_TESTING=OFF -DCMAKE_BUILD_TYPE=Release` + * Compile**CPU version of PaddlePaddle**: - * For users who need to compile the **GPU version PaddlePaddle**: + `cmake .. -DPY_VERSION=3.5 -DWITH_GPU=OFF -DWITH_TESTING=OFF -DCMAKE_BUILD_TYPE=Release` - `cmake .. -DPY_VERSION=3.5 -DWITH_FLUID_ONLY=ON -DWITH_GPU=ON -DWITH_TESTING=OFF -DCMAKE_BUILD_TYPE=Release` + * Compile**GPU version of PaddlePaddle**: -9. Execute compilation: + `cmake .. -DPY_VERSION=3.5 -DWITH_GPU=ON -DWITH_TESTING=OFF -DCMAKE_BUILD_TYPE=Release` + +9. Execute compiling: `make -j$(nproc)` > Use multicore compilation -10. After compiling successfully, go to the `/paddle/build/python/dist` directory and find the generated `.whl` package: `cd /paddle/build/python/dist` +10. after compiling successful, enter `/paddle/build/python/dist` Directory and find generated `.whl` package: `cd /paddle/build/python/dist` -11. Install the compiled `.whl` package on the current machine or target machine: (For Python3: Please select the pip corresponding to the python version you wish to use, such as pip3.5, pip3.6) +11. Install the compiled `.whl` package on the current machine or target machine: - For Python2: pip install (whl package name) - For Python3: pip3.5 install (whl package name) + For Python2: pip install -U(whl package name) + For Python3: pip3.5 install -U(whl package name) + Note: For the command involving Python 3, we use Python 3.5 as an example above, if the version of your Python is 3.6/3.7, please change Python3.5 in the commands to Python3.6/Python3.7 -Now that you have successfully installed PaddlePaddle using Docker, you only need to run PaddlePaddle after entering the Docker container. For more Docker usage, please refer to the [official Docker documentation](https://docs.docker.com/). +Congratulations, now you have completed the compilation and installation of PaddlePaddle. You only need to enter the Docker container and run PaddlePaddle to start using. For more Docker usage, please refer to [official docker documentation](https://docs.docker.com) > Note: In order to reduce the size, `vim` is not installed in PaddlePaddle Docker image by default. You can edit the code in the container after executing `apt-get install -y vim` in the container. -Congratulations, you have now completed the process of compiling PaddlePaddle using Docker. - - -

+ ### ***Local compilation*** **Please strictly follow the following instructions step by step** @@ -114,26 +164,29 @@ Congratulations, you have now completed the process of compiling PaddlePaddle us 3. We support compiling and installing with virtualenv. First, create a virtual environment called `paddle-venv` with the following command: - * a. Install Python-dev: (Please install python3.x-dev that matches the current environment python version) + * a. Install Python-dev: (Please note that gcc4.8 is not supported in python2.7 under Ubuntu 16.04, please use gcc5.4 to compile Paddle) For Python2: apt install python-dev For Python3: apt install python3.5-dev - * b. Install pip: (Please ensure that pip version is 9.0.1 and above ): (Please note that the version corresponding to python3 is modified) + * b. Install pip: (Please ensure that pip version is 9.0.1 and above ): For Python2: apt install python-pip For Python3: apt-get udpate && apt-get install -y software-properties-common && add-apt-repository ppa:deadsnakes/ppa && apt install curl && curl https://bootstrap.pypa.io/get-pip. Py -o - | python3.5 && easy_install pip - * c. Install the virtual environment `virtualenv` and `virtualenvwrapper` and create a virtual environment called `paddle-venv` (please note the python version) : + * c. Install the virtual environment `virtualenv` and `virtualenvwrapper` and create a virtual environment called `paddle-venv` : - 1. `apt install virtualenv` or `pip install virtualenv` or `pip3 install virtualenv` + 1. `apt install virtualenv` or `pip install virtualenv` or `pip3 install virtualenv` 2. `apt install virtualenvwrapper` or `pip install virtualenvwrapper` or `pip3 install virtualenvwrapper` 3. Find `virtualenvwrapper.sh`: `find / -name virtualenvwrapper.sh` 4. (Only for Python3) Set the interpreter path for the virtual environment: `export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3.5` - 5. See the installation method in `virtualenvwrapper.sh`: `cat virtualenvwrapper.sh` + 5. See the installation method in `virtualenvwrapper.sh`: `cat virtualenvwrapper.sh`, this shell file describes the steps and commands 6. Install `virtualwrapper` according to the installation method in `virtualenvwrapper.sh` - 7. Create a virtual environment called `paddle-venv`: `mkvirtualenv paddle-venv` + 7. Set VIRTUALENVWRAPPER_PYTHON:`export VIRTUALENVWRAPPER_PYTHON=[python-lib-path]:$PATH` (Here, replace the last two directories of [python-lib-path] with /bin/) + 8. Create a virtual environment called `paddle-venv`: `mkvirtualenv paddle-venv` + + Note: for the above commands involving Python 3, we use Python 3.5 as an example. If your Python version is 3.6 / 3.7, please change Python 3.5 in the above commands to Python 3.6 / Python 3.7 4. Enter the virtual environment: `workon paddle-venv` @@ -155,6 +208,10 @@ Congratulations, you have now completed the process of compiling PaddlePaddle us - `git checkout [name of target branch]` + For example: + + `git checkout release/1.5` + 8. And please create and enter a directory called build: `mkdir build && cd build` @@ -185,12 +242,16 @@ Congratulations, you have now completed the process of compiling PaddlePaddle us For Python3: cmake .. -DPY_VERSION=3.5 -DWITH_FLUID_ONLY=ON -DWITH_GPU=ON -DWITH_TESTING=OFF -DCMAKE_BUILD_TYPE=Release - > `-DPY_VERSION=3.5` Please change to the Python version of the installation environment + Note: We used Python3.5 command as an example above, if the version of your Python is 3.6/3.7, please change Python3.5 in the commands to Python3.6/Python3.7 10. Compile with the following command: `make -j$(nproc)` + > compile using multi-core + + > If “Too many open files” error is displayed during compilation, please use the instruction ulimit -n 8192 to increase the number of files allowed to be opened by the current process. Generally speaking, 8192 can ensure the completion of compilation. + 11. After compiling successfully, go to the `/paddle/build/python/dist `directory and find the generated `.whl` package: `cd /paddle/build/python/dist` 12. Install the compiled `.whl` package on the current machine or target machine: @@ -202,12 +263,16 @@ Congratulations, now you have completed the process of compiling PaddlePaddle na

### ***Verify installation*** -After the installation is complete, you can use `python` or `python3` to enter the Python interpreter and then use `import paddle.fluid` to verify that the installation was successful. +After the installation is complete, you can use `python` or `python3` to enter the Python interpreter and then use `import paddle.fluid as fluid` and then `fluid.install_check.run_check()` to verify that the installation was successful. + +If `Your Paddle Fluid is installed succesfully!` appears, it means the installation was successful.

### ***How to uninstall*** -Please use the following command to uninstall PaddlePaddle (users who use Docker to install PaddlePaddle should use the following command in the container containing PaddlePaddle. Please use the corresponding version of pip): +Please use the following command to uninstall PaddlePaddle: - ***CPU version of PaddlePaddle***: `pip uninstall paddlepaddle` or `pip3 uninstall paddlepaddle` - ***GPU version of PaddlePaddle***: `pip uninstall paddlepaddle-gpu` or `pip3 uninstall paddlepaddle-gpu` + +Users installing PaddlePaddle with Docker, please use above commands in the container involved PaddlePaddle and attention to use the corresponding version of Pip diff --git a/doc/fluid/install/index_en.rst b/doc/fluid/install/index_en.rst index e2025870be74dd7810eb72cf3a7d9a69b329924f..c8c6fd0258275c7bbaa380651ed7299d662c1eab 100644 --- a/doc/fluid/install/index_en.rst +++ b/doc/fluid/install/index_en.rst @@ -3,37 +3,529 @@ Installation Manuals ====================== -The manuals will guide you to install and build PaddlePaddle on your 64-bit desktop or laptop. +The manuals will guide you to build and install PaddlePaddle on your 64-bit desktop or laptop. -The versions of Python currently supported: Python 2.7-3.7 +1. Operating system requirements: +============================ -PaddlePaddle currently supports the following environments: +* Windows 7 / 8 / 10, Pro/Enterprise +* Ubuntu 14.04 / 16.04 / 18.04 +* CentOS 6 / 7 +* MacOS 10.11 / 10.12 / 10.13 / 10.14 +* 64-bit operating system is required -* *Ubuntu 14.04 /16.04 /18.04* -* *CentOS 7 / 6* -* *MacOS 10.11 / 10.12 / 10.13 / 10.14* -* *Windows7 / 8/ 10(Pro/Enterprise)* +2. Processor requirements: +============================ +* Processor supports MKL +* The processor architecture is x86_64(or called x64, Intel 64, AMD64). Currently, PaddlePaddle does not support arm64. -Please make sure your environment meets the conditions above. -And the installation assumes your computer possesses 64-bit operating system, and AVX instruction set is supported by the processor, otherwise you should use the version of :code:`no_avx` in `whl package list - Dev `_ . +3. Version requirements of python and pip: +============================ +* Python 2 requires version 2.7.15+ +* Python 3 requires version 3.5.1+/3.6/3.7 +* Python needs pip, and pip requires version 9.0.1+ +* Python and pip requires 64-bit -- If you are planning to use `pip `_ to install PaddlePaddle, please type the following commands directly: +4. PaddlePaddle's support for GPU: +================================= -:code:`pip install paddlepaddle` (latest CPU version of PaddlePaddle) +* Currently, **PaddlePaddle** only supports **CUDA** driver of **NVIDIA** graphics card. +* You need to install `cuDNN `_ , and version 7.3+ is required(For CUDA9/10) +* If you need GPU multi-card mode, you need to install `NCCL 2 `_ -:code:`pip install paddlepaddle-gpu` (latest GPU version of PaddlePaddle) + * Only Ubuntu/CentOS support NCCL 2 +* You need to install `CUDA `_ , depending on your system, there are different requirements for CUDA version: -:code:`pip install paddlepaddle==[pip version]` + * Windows install GPU version - where [pip version] can be looked up in `PyPi.org `_ + * Windows 7 / 8 / 10 support CUDA 9.0 / 10.0 single-card mode, but don't support CUDA 9.1/9.2/10.1 + * don't support install using **nvidia-docker** + * Ubuntu install GPU version -- If you are planning to use `docker `_ to install PaddlePaddle, please type the following commands directly: + * Ubuntu 14.04 supports CUDA 10.0/10.1, but doesn't support CUDA 9.0/9.1/9.2 + * Ubuntu 16.04 supports CUDA 9.0/9.1/9.2/10.0/10.1 + * Ubuntu 18.04 supports CUDA 10.0/10.1, but doesn't support CUDA 9.0/9.1/9.2 + * If you install using **nvidia-docker** , it supports CUDA 9.0/9.1/9.2/10.0/10.1 + * CentOS install GPU version -:code:`docker run --name [Name of container] -it -v $PWD:/paddle paddlepaddle/paddle:[docker version] /bin/bash` + * If you install using native **pip** : - where [docker version] can be looked up in `DockerHub `_ + * CentOS 7 supports CUDA 9.0/9.1/9.2/10.0/10.1, CUDA 9.1 supports single-card mode only + * CentOS 6 supports CUDA 9.0/9.1/9.2/10.0/10.1 single-card mode + * If you compile and install using native source code: + + * CentOS 7 supports CUDA 9.0/9.1/9.2/10.0/10.1, CUDA 9.1 supports single-card mode only + * CentOS 6 is not recommended, we don't provide official support in case of compilation problems + * If you install using **nvidia-docker** , CentOS 7 supports CUDA 9.0/9.1/9.2/10.0/10.1 + * MacOS isn't supported: PaddlePaddle has no GPU support in Mac OS platform + +Please make sure your environment meets the above conditions. If you have other requirements, please refer to `Appendix `_ . + +5. PaddlePaddle's support for NCCL: +================================= + +* Support for Windows + + * not support NCCL +* Support for Ubuntu + + * Ubuntu 14.04: + + * support NCCL v2.4.2-v2.4.8 under CUDA10.1 + * support NCCL v2.3.7-v2.4.8 under CUDA10.0 + * Ubuntu 16.04: + + * support NCCL v2.4.2-v2.4.8 under CUDA10.1 + * support NCCL v2.3.7-v2.4.8 under CUDA10.0/9.2/9.0 + * support NCCL v2.1.15 under CUDA9.1 + * Ubuntu 18.04: + + * support v2.4.2-v2.4.8 under CUDA10.1 + * support NCCL v2.3.7-v2.4.8 under CUDA10.0 +* Support for CentOS + + * CentOS 6: not support NCCL + * CentOS 7: + + * support NCCL v2.4.2-v2.4.8 under CUDA10.1 + * support NCCL v2.3.7-v2.4.8 under CUDA10.0/9.2/9.0 +* Support for MacOS + + * not support NCCL + + +The first way to install: use pip to install +================================ + +You can choose any of the four ways to install: "use pip to install", "use Conda to install", "use Docker to install", "compiling from the source code" + +This section describes how to use pip to install. + +1. You need to confirm that your operating system meets the requirements listed above + +2. You need to confirm that your processor meets the requirements listed above + +3. Confirm that the Python where you need to install PaddlePaddle is your expected location, because your computer may have multiple Python + + If you are using Python 2, use the following command to output Python path. Depending on your environment, you may need to replace Python in all command lines in the description with specific Python path + + In the Windows environment, the command to output Python path is: + + :: + + where python + + In the MacOS/Linux environment, the command to output Python path is: + + :: + + which python + + If you are using Python 3, use the following command to output Python path. Depending on your environment, you may need to replace Python in all command lines in the description with specific Python path + + In the Windows environment, the command to output Python path is: + + :: + + where python3 + + In the MacOS/Linux environment, the command to output Python path is: + + :: + + which python3 + +4. Check the version of Python + + If you are using Python 2,confirm it is 2.7.15+ using command + :: + + python --version + + If you are using Python 3,confirm it is 3.5.1+/3.6/3.7 using command + :: + + python3 --version + +5. Check the version of pip and confirm it is 9.0.1+ + + If you are using Python 2 + :: + + python -m ensurepip + python -m pip --version + + If you are using Python 3 + :: + + python3 -m ensurepip + python3 -m pip --version + +6. Confirm that Python and pip is 64 bit,and the processor architecture is x86_64(or called x64、Intel 64、AMD64)architecture. Currently, PaddlePaddle doesn't support arm64 architecture. The first line below outputs "64bit", and the second line outputs "x86_64", "x64" or "AMD64" : + + If you use Python 2 + :: + + python -c "import platform;print(platform.architecture()[0]);print(platform.machine())" + + If you use Python 3 + :: + + python3 -c "import platform;print(platform.architecture()[0]);print(platform.machine())" + +7. If you want to use `pip `_ to install PaddlePaddle, you can use the command below directly: + + (1). **CPU version** : If you only want to install CPU version, please refer to command below + + If you are using Python 2, command to install CPU version is: + :: + + python -m pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple + + or + + python -m pip install paddlepaddle -i https://pypi.tuna.tsinghua.edu.cn/simple + + If you are using Python 3, command to install CPU version is: + :: + + python3 -m pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple + + or + + python3 -m pip install paddlepaddle -i https://pypi.tuna.tsinghua.edu.cn/simple + + (2). **GPU version** : If you only want to install GPU version, please refer to command below + + + Note: + + * You need to confirm that your GPU meets the requirements listed above + + If you are using Python2, please attention that PaddlePaddle installed through command below supports CUDA10.0 under Windows、Ubuntu、CentOS by default: + :: + + python -m pip install paddlepaddle-gpu -i https://mirror.baidu.com/pypi/simple + + or + + python -m pip install paddlepaddle-gpu -i https://pypi.tuna.tsinghua.edu.cn/simple + + If you are using Python 2, CUDA 9, cuDNN 7.3+, command to install GPU version: + :: + + python -m pip install paddlepaddle-gpu==1.7.1.post97 -i https://mirror.baidu.com/pypi/simple + + or + + python -m pip install paddlepaddle-gpu==1.7.1.post97 -i https://pypi.tuna.tsinghua.edu.cn/simple + + If you are using Python 2, CUDA 10.0, cuDNN 7.3+, command to install GPU version: + :: + + python -m pip install paddlepaddle-gpu==1.7.1.post107 -i https://mirror.baidu.com/pypi/simple + + or + + python -m pip install paddlepaddle-gpu==1.7.1.post107 -i https://pypi.tuna.tsinghua.edu.cn/simple + + If you are using Python 3, please change **python** in the above command to **python3** and install. + +8. Verify installation + + After the installation is complete, you can use `python` or `python3` to enter the Python interpreter and then use `import paddle.fluid as fluid` and then `fluid.install_check.run_check()` to verify that the installation was successful. + + If `Your Paddle Fluid is installed succesfully!` appears, it means the installation was successful. + + +9. For more information to help, please refer to: + + `install under Ubuntu `_ + + `install under CentOS `_ + + `install under MacOS `_ + + `install under Windows `_ + + +The second way to install: use Conda to install +================================ + +You can choose any of the four ways to install: "use pip to install", "use Conda to install", "use Docker to install", "compiling from the source code" + +This section describes how to use Conda to install. + +1. You need to confirm that your operating system meets the requirements listed above + +2. You need to confirm that your processor meets the requirements listed above + +3. Confirm that the Python where you need to install PaddlePaddle is your expected location, because your computer may have multiple Python + + +3. For domestic users unable to connect to the official source of anaconda, you can add Tsinghua source for installation according to the following command. + + :: + + conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ + conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/ + conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/ + conda config --set show_channel_urls yes + +4. If you need to create a new Conda virtual environment specifically for Paddle to use (the environment name after --name, you can choose by yourself): + + If you are using Python2 under Window + + :: + + conda create --name paddle python=2.7 + activate paddle + + If you are using Python2 under MacOS/Linux + + :: + + conda create --name paddle python=2.7 + conda activate paddle + + If you are using Python3 under Window, note: python3 version can be 3.5.1+/3.6/3.7 + + :: + + conda create --name paddle python=3.7 + activate paddle + + If you are using Python3 under MacOS/Linux, note: python3 version can be 3.5.1+/3.6/3.7 + + :: + + conda create --name paddle python=3.7 + conda activate paddle + +5. Confirm that the Python where you need to install PaddlePaddle is your expected location, because your computer may have multiple Python, enter Anaconda's command-line terminal, enter the following instructions to confirm the Python location + + If you use Python 2, use the following command to output Python path. Depending on your environment, you may need to replace Python in all command lines in the description with specific Python path + + In the Windows environment, the command to output Python path is: + + :: + + where python + + In the MacOS/Linux environment, the command to output Python path is: + + :: + + which python + + If you use Python 3, use the following command to output Python path. Depending on your environment, you may need to replace Python3 in all command lines in the description with Python or specific Python path + + In the Windows environment, the command to output Python path is: + + :: + + where python3 + + In the MacOS/Linux environment, the command to output Python path is: + + :: + + which python3 + +6. Check the version of Python + + If you are using Python 2, use the following command to confirm it is 2.7.15+ + :: + + python --version + + If you are using Python 3, use the following command to confirm it is 3.5.1+/3.6/3.7 + :: + + python3 --version + +7. Check the version of pip and confirm it is 9.0.1+ + + If you are using Python 2 + :: + + python -m ensurepip + python -m pip --version + + If you are using Python 3 + :: + + python3 -m ensurepip + python3 -m pip --version + +8. Confirm Python and pip is 64 bit, and the processor architecture is x86_64(or called x64,Intel 64,AMD64) architecture. Currently, PaddlePaddle doesn't support arm64 architecture. The first line below outputs "64bit", and the second line outputs "x86_64", "x64" or "AMD64": + + If you are using Python 2 + :: + + python -c "import platform;print(platform.architecture()[0]);print(platform.machine())" + + If you are using Python 3 + :: + + python3 -c "import platform;print(platform.architecture()[0]);print(platform.machine())" + +9. If you want to use Conda to install PaddlePaddle, you can directly use commands below: + + (1). **CPU version** :If you just want to install the CPU version, please refer to the following command installation + + :: + + conda install paddlepaddle + + + (2). **GPU version** :If you just want to install the GPU version, please refer to the following command installation + + Note: + + * You need to confirm that your GPU meets the requirements listed above + + If you are using CUDA 8,cuDNN 7.1+, the command to install GPU version: + :: + + conda install paddlepaddle-gpu cudatoolkit=8.0 + + If you are using CUDA 9,cuDNN 7.3+, the command to install GPU version: + :: + + conda install paddlepaddle-gpu cudatoolkit=9.0 + + + If you are using CUDA 10.0,cuDNN 7.3+, the command to install GPU version:: + :: + + conda install paddlepaddle-gpu cudatoolkit=10.0 + +10. Verify installation + + After the installation is complete, you can use `python` or `python3` to enter the Python interpreter and then use `import paddle.fluid as fluid` and then `fluid.install_check.run_check()` to verify that the installation was successful. + + If `Your Paddle Fluid is installed succesfully!` appears, it means the installation was successful. + + +11. For more information to help, please refer to: + + `install under conda `_ + + +The third way to install: use Docker to install +================================ + +You can choose any of the four ways to install: "use pip to install", "use Conda to install", "use Docker to install", "compiling from the source code" + +This section describes how to use Docker to install. + +If you want to use `docker `_ to install PaddlePaddle, you can use command below: + +1. **CPU version** + + (1). At first you need to install `docker `_ + + Note: + + * CentOS 6 not support docker installation + + * processor need supporting MKL + + (2). Pull the image of the preinstalled PaddlePaddle: + :: + + docker pull hub.baidubce.com/paddlepaddle/paddle:1.7.1 + + (3). Use the image to build and enter the Docker container: + :: + + docker run --name paddle -it -v dir1:dir2 hub.baidubce.com/paddlepaddle/paddle:1.7.1 /bin/bash + + > --name [Name of container] set the name of Docker; + + > -it The parameter indicates that the container has been operated interactively with the local machine; + + > -v Parameter is used to share files between the host and the container. dir1 is the host directory and dir2 is the directory mounted inside the container. Users can customize their own mounting directory by setting dir1 and dir2.For example, $PWD:/paddle specifies to mount the current path of the host (PWD variable in Linux will expand to the absolute path of the current path) to the /paddle directory inside the container; + + > hub.baidubce.com/paddlepaddle/paddle:1.7.1 is the image name you need to use;/bin/bash is the command to be executed in Docker + +2. **GPU version** + + (1). At first you need to install `nvidia-docker `_ + + Note: + + * processor need supporting MKL + + * Your computer needs to have NVIDIA graphics card supporting CUDA driver + + * You need to install `cuDNN `_ ,version requires 7.3+(For CUDA9/10), 7.1+(For CUDA 8) + + * If you need GPU multi-card mode, you need to install `NCCL 2 `_ + + * Only Ubuntu/CentOS support NCCL 2 technology + + * You need to install `CUDA `_ , depending on your system, there are different requirements for CUDA version: + + * Ubuntu/CentOS 7 ,if you use nvidia-docker to install, CUDA 8.0/9.0/9.1/9.2/10.0 is supported + + * Windows/MacOS/CentOS 6 not support nvidia-docker to install + + + (2). Pull the image that supports CUDA 10.0, cuDNN 7.3 + pre installed PaddlePaddle: + :: + + nvidia-docker pull hub.baidubce.com/paddlepaddle/paddle:1.7.1-gpu-cuda10.0-cudnn7 + + (3). Use the image to build and enter the docker container: + :: + + nvidia-docker run --name paddle -it -v dir1:dir2 hub.baidubce.com/paddlepaddle/paddle:1.7.1-gpu-cuda10.0-cudnn7 /bin/bash + + > --name [Name of container] set name of Docker; + + > -it The parameter indicates that the container has been operated interactively with the local machine; + + > -v Parameter is used to share files between the host and the container. dir1 is the host directory and dir2 is the directory mounted inside the container. Users can customize their own mounting directory by setting dir1 and dir2.For example, $PWD:/paddle specifies to mount the current path of the host (PWD variable in Linux will expand to the absolute path of the current path) to the /paddle directory inside the container; + + > hub.baidubce.com/paddlepaddle/paddle:1.7.1 is the image name you need to use;/bin/bash is the command to be executed in Docker + + Or if you need the version supporting **CUDA 9**, replace **cuda10.0** of the above command with **cuda9.0** + +3. If your machine is not in China's mainland , you can pull the image directly from DockerHub: + + :: + + docker run --name paddle -it -v dir1:dir2 paddlepaddle/paddle:1.7.1 /bin/bash + + > --name [Name of container] set name of Docker; + + > -it The parameter indicates that the container has been operated interactively with the local machine; + + > -v Parameter is used to share files between the host and the container. dir1 is the host directory and dir2 is the directory mounted inside the container. Users can customize their own mounting directory by setting dir1 and dir2.For example, $PWD:/paddle specifies to mount the current path of the host (PWD variable in Linux will expand to the absolute path of the current path) to the /paddle directory inside the container; + + > paddlepaddle/paddle:1.7.1 is the image name you need to use;/bin/bash is the command to be executed in docker + +4. Verify installation + + After the installation is complete, you can use `python` or `python3` to enter the Python interpreter and then use `import paddle.fluid as fluid` and then `fluid.install_check.run_check()` to verify that the installation was successful. + + If `Your Paddle Fluid is installed succesfully!` appears, it means the installation was successful. + + +5. For more help, refer to: + + `use Docker to install `_ + + +The fourth way to install: compile and install with source code +==================================== + +- If you use PaddlePaddle only, we suggest you to choose one of the three installation methods **pip**, **conda**, **docker** to install. +- If you need to develop PaddlePaddle, please refer to `compile from source code `_ .. toctree:: :hidden: @@ -43,5 +535,6 @@ And the installation assumes your computer possesses 64-bit operating system, an install_MacOS_en.md install_Windows_en.md install_Conda_en.md + install_Docker_en.md compile/fromsource_en.rst Tables_en.md diff --git a/doc/fluid/install/install_CentOS_en.md b/doc/fluid/install/install_CentOS_en.md index d0105c04793bcd61e8bcce43841105702c74bea6..078e8b003c3bf10240a69309758cef8f9437423b 100644 --- a/doc/fluid/install/install_CentOS_en.md +++ b/doc/fluid/install/install_CentOS_en.md @@ -1,148 +1,130 @@ -*** - # **Install on CentOS** -This note will show you how to install PaddlePaddle on a *64-bit desktop or laptop* and CentOS. The CentOS system we support needs to meet the following requirements: - -Please note: Attempts on other systems may cause the installation to fail. Please ensure that your environment meets the conditions. The installation we provide by default requires your computer processor to support the AVX instruction set. Otherwise, please select the version of `no_avx` in [the latest Release installation package list](./Tables.html/#ciwhls-release). - -Under CentOS you can use `cat /proc/cpuinfo | grep avx` to check if your processor supports the AVX instruction set. - -* CentOS 6 / 7 - -## Determine which version to install - -* Only PaddlePaddle for CPU is supported. If your computer does not have an NVIDIA® GPU, you can only install this version. If your computer has a GPU, it is recommended that you install the CPU version of PaddlePaddle first to check if your local environment is suitable. - -* PaddlePaddle with GPU support, in order to make the PaddlePaddle program run more quickly, we accelerate the PaddlePaddle program through the GPU, but the GPU version of PaddlePaddle needs to have the NVIDIA® GPU that meets the following conditions (see the NVIDIA official for the specific installation process and configuration). Documentation: [For CUDA](https://docs.nvidia.com/cuda/cuda-installation-guide-linux/), [For cuDNN](https://docs.nvidia.com/deeplearning/sdk/cudnn-install/)) - - * *CUDA Toolkit 9.0 with cuDNN v7* - * *CUDA Toolkit 8.0 with cuDNN v7* - * *Hardware devices with GPU compute capability exceeding 1.0* - -## Choose an installation method +## Environmental preparation -We offer 4 installation methods under the CentOS system: +* **CentOS Version(64 bit)** + * **CentOS 6 (GPU version supports CUDA 9.0/9.1/9.2/10.0/10.1, only supports single card)** + * **CentOS 7 (GPU version supports CUDA 9.0/9.1/9.2/10.0/10.1, CUDA 9.1 only supports single card)** +* **Python version 2.7.15+/3.5.1+/3.6/3.7 (64 bit)** +* **pip or pip3 version 9.0.1+ (64 bit)** -* Pip installation -* Docker installation (the GPU version is not supported) (the version of python in the image is 2.7) -* Source code compilation and installation (all versions of CentOS 6 and GPU version of CentOS 7 are not supported) -* Docker source compilation and installation (not supported for GPU version) (Python version 2.7, 3.5, 3.6, 3.7 in image) +### Note -**With pip installation** (the easiest way to install), we offer you a pip installation method, but it depends more on your native environment and may have some issues related to your local environment. +* You can use`uname -m && cat /etc/*release` to view the local operating system and bit information +* Confirm that the Python where you need to install PaddlePaddle is your expected location, because your computer may have multiple Python -**Use Docker for installation** (the safest way to install), because we are installing the tools and configuration in a Docker image so that if something goes wrong, others can reproduce the problem for help. In addition, for developers accustomed to using Windows and MacOS, there is no need to configure a cross-compilation environment using Docker. It should be emphasized that Docker does not virtualize any hardware. The compiler tools running in the Docker container are actually run directly on the native CPU and operating system. The performance is the same as installing the compiler on the machine. + * If you are using Python 2, use the following command to output Python path. Depending on the environment, you may need to replace Python in all command lines in the description with specific Python path -Compile and install from [**source**](#ct_source) and [**use Docker**](#ct_docker). This is a process of compiling the PaddlePaddle source code into a binary file and then installing the binary file. Compared with the binary form of PaddlePaddle that has been successfully tested and compiled for you, this manual compilation is more complicated, and we will answer you in detail at the end of this tutorial. + which python + * If you are using Python 3, use the following command to output Python path. Depending on your environment, you may need to replace Python 3 in all command lines in the instructions with Python or specific Python path -

-## ***Install PaddlePaddle using pip*** + which python3 -First, we use the following commands to check if **the environment of this machine** is suitable for installing PaddlePaddle: +* You need to confirm whether the version of Python meets the requirements -`Uname -m && cat /etc/*release` + * If you are using Python 2, use the following command to confirm that it is 2.7.15+ -> The above command will display the operating system and processing bits of the machine. Please make sure your computer is consistent with the requirements of this tutorial. + python --version -Second, your computer needs to meet the following requirements: + * If you are using Python 3, use the following command to confirm that it is 3.5.1+/3.6/3.7 -* Python2.7.x (devel), Pip >= 9.0.1 + python3 --version - > CentOS6 needs to compile Python 2.7 into a [shared library](./FAQ.html/#FAQ). +* It is required to confirm whether the version of pip meets the requirements. The version of pip is required to be 9.0.1+ -* Python3.5+.x (devel), Pip3 >= 9.0.1 + * If you are using Python 2 - > You may have installed pip on your CentOS. Please use pip -V to confirm that we recommend using pip 9.0.1 or higher to install. + python -m ensurepip - Update the source of yum: `yum update` and install the extension source to install pip: `yum install -y epel-release` + python -m pip --version - Use the following command to install or upgrade Python and pip to the required version: + * If you are using Python 3 + python3 -m ensurepip - - For Python2: `sudo yum install python-devel python-pip` - - For Python3: (Please refer to the official Python installation, and pay attention to whether the python3 version is consistent with the python version corresponding to the pip3 command. If there are multiple python3 versions, please specify the pip version such as pip3.7, or add soft link from pip3 to the python version you use. ) + python3 -m pip --version +* You need to confirm that Python and pip are 64bit, and the processor architecture is x86_64(or called x64、Intel 64、AMD64). Currently, paddlepaddle does not support arm64 architecture. The first line below outputs "64bit", and the second line outputs "x86_64", "x64" or "AMD64": + * If you are using Python 2 + python -c "import platform;print(platform.architecture()[0]);print(platform.machine())" - > Even if you already have `Python` in your environment, you need to install the `python develop` package. + * If you are using Python 2 -Here's how to install PaddlePaddle: + python3 -c "import platform;print(platform.architecture()[0]);print(platform.machine())" -1. Use pip install to install PaddlePaddle: +* The installation package provided by default requires computer support for MKL +* If you do not know the machine environment, please download and use[Quick install script](https://fast-install.bj.bcebos.com/fast_install.sh), for instructions please refer to[here](https://github.com/PaddlePaddle/FluidDoc/tree/develop/doc/fluid/beginners_guide/install/install_script.md)。 - * For users who need **the CPU version PaddlePaddle**: `pip install paddlepaddle` or `pip3 install paddlepaddle` +## Choose CPU/GPU - * For users who need **the GPU version PaddlePaddle**: `pip install paddlepaddle-gpu` or `pip3 install paddlepaddle-gpu` +* If your computer doesn't have NVIDIA® GPU, please install the CPU version of PaddlePaddle - > 1 . In order to prevent problem "nccl.h cannot be found", please first install nccl2 according to the instructions of [NVIDIA official website](https://developer.nvidia.com/nccl/nccl-download). +* If your computer has NVIDIA® GPU, please make sure that the following conditions are met and install the GPU version of PaddlePaddle - > 2 . If you do not specify the pypi package version number, we will by default provide you with a version of PaddlePaddle that supports Cuda 9/cuDNN v7. + * **CUDA toolkit 10.0 with cuDNN v7.3+(for multi card support, NCCL2.3.7 or higher)** + * **CUDA toolkit 9.0 with cuDNN v7.3+(for multi card support, NCCL2.3.7 or higher)** + * **Hardware devices with GPU computing power over 1.0** - * For users with `Cannot uninstall 'six'.` problems, the probable reason is the existing Python installation issues in your system. In this case, use `pip install paddlepaddle --ignore-installed six`(CPU) or `pip install paddlepaddle-gpu -- Ignore-installed six` (GPU) to resolve. + You can refer to NVIDIA official documents for installation process and configuration method of CUDA and cudnn. Please refer to [CUDA](https://docs.nvidia.com/cuda/cuda-installation-guide-linux/),[cuDNN](https://docs.nvidia.com/deeplearning/sdk/cudnn-install/) - * For users with **other requirements**: `pip install paddlepaddle==[version number]` or `pip3 install paddlepaddle==[version number]` +* 如果您需要使用多卡环境请确保您已经正确安装nccl2,或者按照以下指令安装nccl2(这里提供的是CentOS 7,CUDA9,cuDNN7下nccl2的安装指令),更多版本的安装信息请参考NVIDIA[官方网站](https://developer.nvidia.com/nccl): - > For `the version number`, please refer to [the latest Release installation package list](./Tables.html/#whls). If you need to obtain and install **the latest PaddlePaddle development branch**, you can download and install the latest whl installation package and c-api development package from [the latest dev installation package list](./Tables.html/#ciwhls) or our [CI system](https://paddleci.ngrok.io/project.html?projectId=Manylinux1&tab=projectOverview). To log in, click on "Log in as guest". -Now you have completed the process of installing PaddlePaddle via `pip install`. + wget http://developer.download.nvidia.com/compute/machine-learning/repos/rhel7/x86_64/nvidia-machine-learning-repo-rhel7-1.0.0-1.x86_64.rpm + rpm -i nvidia-machine-learning-repo-rhel7-1.0.0-1.x86_64.rpm + yum update -y + yum install -y libnccl-2.3.7-2+cuda9.0 libnccl-devel-2.3.7-2+cuda9.0 libnccl-static-2.3.7-2+cuda9.0 +## Installation method -

-## *Install using Docker* +There are five installation methods under CentOS system: -In order to better use Docker and avoid problems, we recommend using **the highest version of Docker**. For details on installing and using Docker, please refer to [the official Docker documentation](https://docs.docker.com/install/). +* pip installation(recommend) +* [Conda Installation](./install_Conda_en.html) +* [Docker Installation](./install_Docker_en.html) +* [Compile From Source Code](./compile/compile_CentOS_en.html#ct_source) +* [Compile From Docker Source Code](./compile/compile_CentOS_en.html#ct_docker) -> Please note that to install and use the PaddlePaddle version that supports GPU, you must first install [nvidia-docker](https://github.com/NVIDIA/nvidia-docker). +Here is pip installation -Once you have **properly installed Docker**, you can start **installing PaddlePaddle with Docker**. +## Installation steps -1. Use the following command to pull the image we pre-installed for PaddlePaddle: +* CPU version of PaddlePaddle: + * For Python 2: `python -m pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple` or `python -m pip install paddlepaddle -i https://pypi.tuna.tsinghua.edu.cn/simple` + * For Python 3: `python3 -m pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple` or `python3 -m pip install paddlepaddle -i https://pypi.tuna.tsinghua.edu.cn/simple` +* GPU version of PaddlePaddle: + * For Python 2: `python -m pip install paddlepaddle-gpu -i https://mirror.baidu.com/pypi/simple` 或 `python -m pip install paddlepaddle-gpu -i https://pypi.tuna.tsinghua.edu.cn/simple` + * For Python 3: `python3 -m pip install paddlepaddle-gpu -i https://mirror.baidu.com/pypi/simple` 或 `python3 -m pip install paddlepaddle-gpu -i https://pypi.tuna.tsinghua.edu.cn/simple` - * For users who need a **CPU version of PaddlePaddle**, use the following command to pull the image we pre-installed for your *PaddlePaddle For CPU*: +You can[Verify installation succeeded or not](#check),if you have any questions, you can refer to [FAQ](./FAQ.html) - `Docker pull hub.baidubce.com/paddlepaddle/paddle: 1.2` - * You can also pull any of our Docker images by following the instructions below: +Note: - `Docker pull hub.baidubce.com/paddlepaddle/paddle:[tag]` +* If it is python2.7, it is recommended to use the `python` command; if it is python3.x, it is recommended to use the 'python3' command - > (Please replace [tag] with the contents of [the mirror table](./Tables.html/#dockers)) +* `python -m pip install paddlepaddle-gpu -i https://pypi.tuna.tsinghua.edu.cn/simple` This command will install the PaddlePaddle that supports CUDA 10.0 cuDNN v7. If you have different requirements for CUDA or cuDNN version, you can use `python -m pip install paddlepaddle-gpu==[Version number] -i https://pypi.tuna.tsinghua.edu.cn/simple` or `python3 -m pip install paddlepaddle-gpu==[version] -i https://pypi.tuna.tsinghua.edu.cn/simple` command to install. For version number, you can see[here](https://pypi.org/project/paddlepaddle-gpu#history), for the correspondence between paddlepaddle and CUDA, cuDNN version, please see [installation package list](./Tables.html#whls) -2. Use the following command to build from the already pulled image and enter the Docker container: - `Docker run --name [Name of container] -it -v $PWD:/paddle /bin/bash` +* Download the latest stable installation package by default. For development installation package, please refer to [here](./Tables.html#ciwhls) - > In the above command, --name [Name of container] sets the name of the Docker; the -it parameter indicates that the container is running interactively with the host machine; -v $PWD:/paddle specifies the current path (the PWD variable in Linux will expand to [The absolute path](https://baike.baidu.com/item/%E7%BB%9D%E5%AF%B9%E8%B7%AF%E5%BE%84/481185) of the current path ) which is mounted to the /paddle directory inside the container; `` specifies the name of the image to use, if you need to use our image please use `hub.baidubce.com/paddlepaddle/paddle:[tag]`. Note: The meaning of the tag is the same as the second step. /bin/bash is the command to be executed in Docker. - -3. (Optional: When you need to enter the Docker container a second time) re-enter the PaddlePaddle container with the following command: - - `Docker start [Name of container]` - - > start the container created previously - - `Docker attach [Name of container]` - - > Enter the started container in the last step. - -Now that you have successfully installed PaddlePaddle using Docker, you only need to run PaddlePaddle after entering the Docker container. For more Docker usage, please refer to [the official Docker documentation](https://docs.docker.com/). - -> Note: In order to reduce the size, `vim` is not installed in PaddlePaddle Docker image by default. You can edit the code in the container after executing `apt-get install -y vim` in the container. + +## ***Verify installation*** +After the installation is complete, you can use `python` or `python3` to enter the Python interpreter and then use `import paddle.fluid` and `fluid.install_check.run_check()` -

-## ***Verify installation*** +If `Your Paddle Fluid is installed succesfully!` appears, to verify that the installation was successful. -After the installation is complete, you can use `python` or `python3` to enter the Python interpreter and then use `import paddle.fluid` to verify that the installation was successful. -

## ***How to uninstall*** -Please use the following command to uninstall PaddlePaddle (users who use Docker to install PaddlePaddle should use the following command in the container containing PaddlePaddle. Please use the corresponding version of pip): +Please use the following command to uninstall PaddlePaddle: -* ***CPU version of PaddlePaddle***: `pip uninstall paddlepaddle` or `pip3 uninstall paddlepaddle` +* ***CPU version of PaddlePaddle***: `python -m pip uninstall paddlepaddle` or `python3 -m pip uninstall paddlepaddle` -* ***GPU version of PaddlePaddle***: `pip uninstall paddlepaddle-gpu` or `pip3 uninstall paddlepaddle-gpu` +* ***GPU version of PaddlePaddle***: `python -m pip uninstall paddlepaddle-gpu` or `python3 -m pip uninstall paddlepaddle-gpu` diff --git a/doc/fluid/install/install_Docker_en.md b/doc/fluid/install/install_Docker_en.md new file mode 100644 index 0000000000000000000000000000000000000000..c7971302a1f7fa4e393c03c8dc9fb3e771bac176 --- /dev/null +++ b/doc/fluid/install/install_Docker_en.md @@ -0,0 +1,125 @@ +# **Docker Installation** + +[Docker](https://docs.docker.com/install/) is an open source application container engine. Using docker, you can not only isolate the installation and use of paddlepaddle from the system environment, but also share GPU, network and other resources with the host + +## Environment preparation + +- Currently supported system types, please see [Installation instruction](./index_cn.html), please note that Docker is not currently supported in CentOS 6 + +- On the local host [Install Docker](https://hub.docker.com/search/?type=edition&offering=community) + +- To enable GPU support on Linux, please [Install nvidia-docker](https://github.com/NVIDIA/nvidia-docker) + +## Installation steps + +1. Pull PaddlePaddle image + + * CPU version of PaddlePaddle: `docker pull hub.baidubce.com/paddlepaddle/paddle:[version number]` + + * GPU version of PaddlePaddle: `docker pull hub.baidubce.com/paddlepaddle/paddle:[version number]-gpu-cuda9.0-cudnn7` + + If your machine is not in mainland China, you can pull the image directly from DockerHub: + + * CPU version of PaddlePaddle: `docker pull paddlepaddle/paddle:[version number]` + + * GPU version of PaddlePaddle: `docker pull paddlepaddle/paddle:[version number]-gpu-cuda9.0-cudnn7` + + After `:', please fill in the PaddlePaddle version number, such as the current version. For more details, please refer to [image profile](#dockers), in the above example, `cuda9.0-cudnn7` is only for illustration. you can see [DockerHub](https://hub.docker.com/r/paddlepaddle/paddle/tags/) to get the image that matches your machine. + +2. Build and enter Docker container + + * Use CPU version of PaddlePaddle: + + + + `docker run --name [Name of container] -it -v $PWD:/paddle /bin/bash` + + > --name [Name of container] set name of Docker; + + + > -it The parameter indicates that the container has been operated interactively with the local machine; + + + > -v $PWD:/paddle specifies to mount the current path of the host (PWD variable in Linux will expand to the absolute path of the current path) to the /paddle directory inside the container; + + > `` Specify the name of the image to be used. You can view it through the 'docker images' command. /bin/Bash is the command to be executed in Docker + + + * Use GPU version of PaddlePaddle: + + + + `nvidia-docker run --name [Name of container] -it -v $PWD:/paddle /bin/bash` + + > --name [Name of container] set name of Docker; + + + > -it The parameter indicates that the container has been operated interactively with the local machine; + + + > -v $PWD:/paddle specifies to mount the current path of the host (PWD variable in Linux will expand to the absolute path of the current path) to the /paddle directory inside the container; + + > `` Specify the name of the image to be used. You can view it through the 'docker images' command. /bin/Bash is the command to be executed in Docker + + +Now you have successfully used Docker to install PaddlePaddle. For more information about using Docker, see[Docker official documents](https://docs.docker.com) + + +

+### **Introduction to mirror images** +

+ + + + + + + + + + + + + + + + + + + + + + + + + +
Mirror source Mirror description
hub.baidubce.com/paddlepaddle/paddle:[Version] Install pecified version of PaddlePaddle
hub.baidubce.com/paddlepaddle/paddle:latest Install development version of PaddlePaddle。Note: This release may contain features and unstable features that have not yet been released, so it is not recommended for regular users or production environments.
hub.baidubce.com/paddlepaddle/paddle:latest-gpu Install development of PaddlePaddle(support GPU). Note: This release may contain features and unstable features that have not yet been released, so it is not recommended for regular users or production environments.
hub.baidubce.com/paddlepaddle/paddle:latest-dev Install the latest development environment of PaddlePaddle
+

+ +You can find the docker mirroring of the published versions of PaddlePaddle in [DockerHub](https://hub.docker.com/r/paddlepaddle/paddle/tags/). +### Note + +* Python version in the image is 2.7 +* In order to reduce the size, `vim` is not installed in PaddlePaddle Docker image by default. You can edit the code in the container after executing `apt-get install -y vim` in the container. + +### 补充说明 + +* When you need to enter the docker container for the second time, use the following command: +``` + #Container created before startup + docker start [Name of container] + + #Enter the starting container + docker attach [Name of container] +``` +* If you are a newcomer to Docker, you can refer to the materials on the Internet for learning, such as [Docker tutorial](http://www.runoob.com/docker/docker-hello-world.html) + +## How to uninstall + +After entering the Docker container, execute the following command: + +* **CPU version of PaddlePaddle**: `pip uninstall paddlepaddle` + +* **GPU version of PaddlePaddle**: `pip uninstall paddlepaddle-gpu` + +Or delete the docker container directly through `docker rm [Name of container]` \ No newline at end of file diff --git a/doc/fluid/install/install_Ubuntu_en.md b/doc/fluid/install/install_Ubuntu_en.md index 0a3e230c688ff82edd7d6f2179ddd64730d17296..2983ad15a931914081eab00528bba5346c2756cd 100644 --- a/doc/fluid/install/install_Ubuntu_en.md +++ b/doc/fluid/install/install_Ubuntu_en.md @@ -1,153 +1,125 @@ -*** - # **Install on Ubuntu** -This instruction describes how to install PaddlePaddle on a *64-bit desktop or laptop* and Ubuntu system. The Ubuntu systems we support must meet the following requirements: - -Please note: Attempts on other systems may cause the installation to fail. Please ensure that your environment meets the conditions. The installation we provide by default requires your computer processor to support the AVX instruction set. Otherwise, please select the version of `no_avx` in the [latest Release installation package list](./Tables_en.html/#ciwhls-release). - -Under Ubuntu, you can use `cat /proc/cpuinfo | grep avx` to check if your processor supports the AVX instruction set. - -* Ubuntu 14.04 /16.04 /18.04 - -## Determine which version to install - -* PaddlePaddle for CPU is supported. If your computer does not have an NVIDIA® GPU, you can only install this version. If your computer has a GPU, it is also recommended that you install the CPU version of PaddlePaddle first to check if your local environment is suitable. - -* PaddlePaddle for GPU is supported. In order to make the PaddlePaddle program run more quickly, we accelerate the PaddlePaddle program through the GPU, but the GPU version of the PaddlePaddle needs to have the NVIDIA® GPU that meets the following conditions (see the NVIDIA official documentation for the specific installation process and configuration: [For CUDA](https://docs.nvidia.com/cuda/cuda-installation-guide-linux/), [For cuDNN](https://docs.nvidia.com/deeplearning/sdk/cudnn-install/)) +## Environment preparation - * *CUDA Toolkit 9.0 with cuDNN v7* - * *CUDA Toolkit 8.0 with cuDNN v7* - * *Hardware devices with GPU computing power exceeding 1.0* +* **Ubuntu version (64 bit)** + * **Ubuntu 14.04 (GPU version supports CUDA 10.0/10.1)** + * **Ubuntu 16.04 (GPU version supports CUDA 9.0/9.1/9.2/10.0/10.1)** + * **Ubuntu 18.04 (GPU version supports CUDA 10.0/10.1)** +* **Python version 2.7.15+/3.5.1+/3.6/3.7 (64 bit)** +* **pip or pip3 version 9.0.1+ (64 bit)** +### Note -## Choose an installation method - -Under the Ubuntu system, we offer 4 installation methods: - -* Pip installation -* Docker installation (the version of python in the image is 2.7) -* Source code compilation and installation -* Docker source code compilation and installation (the python version in the image is 2.7, 3.5, 3.6, 3.7) - +* You can use `uname -m && cat /etc/*release` view the operating system and digit information of the machine +* Confirm that the Python where you need to install PaddlePaddle is your expected location, because your computer may have multiple Python -**With pip installation** (the easiest way to install), we offer you a pip installation method, but it depends more on your native environment and may have some issues related to your local environment. + * If you are using Python 2, use the following command to output Python path. Depending on the environment, you may need to replace Python in all command lines in the description with specific Python path -**Use Docker for installation** (the safest way to install), because we have installed the tools and configuration in a Docker image so that if something goes wrong, others can reproduce the problem for help. In addition, for developers accustomed to using Windows and MacOS, there is no need to configure a cross-compilation environment using Docker. It should be emphasized that Docker does not virtualize any hardware. The compiler tools running in the Docker container are actually running directly on the native CPU and operating system. The performance is the same as installing the compiler on the machine. - -Compile and install from [**source**](#ubt_source) and [**use Docker**](#ubt_docker). This is a process of compiling the PaddlePaddle source code into a binary file and then installing the binary file. Compared to the binary PaddlePaddle that has been successfully tested and compiled for you, the manual compilation is more complicated, we will answer you in detail at the end of the description. - -

-### ***Install using pip*** + which python + * If you are using Python 3, use the following command to output Python path. Depending on the environment, you may need to replace Python 3 in all command lines in the description with Python or specific Python path -First, we use the following commands to **check if the environment of this machine** is suitable for installing PaddlePaddle: + which python3 - uname -m && cat /etc/*release +* You need to confirm that the version of Python meets the requirements + * If you are using Python 2,use the following command to confirm it is 2.7.15+ ->The above command will display the operating system and processing bits of the machine. Please make sure your computer is consistent with the requirements of this tutorial. + python --version -Second, your computer needs to meet any of the following requirements: + * If you are using Python 3,use the following command to confirm it is 3.5.1+/3.6/3.7 -* Python2.7.x (dev), Pip >= 9.0.1 -* Python3.5+.x (dev), Pip3 >= 9.0.1 + python3 --version ->You may have installed pip on your Ubuntu. Please use pip -V or pip3 -V to confirm its version is the recommended pip 9.0.1 or higher. +* You need to confirm that the version of pip meets the requirements, pip version is required 9.0.1+ - Update apt source: `apt update` + * If you are using Python 2 -Use the following command to install or upgrade Python and pip to the required version: (pip and dev installation in python3.6, python3.7 differs greatly across different Ubuntu versions, thus the steps are omitted here) + python -m ensurepip - - For python2: `sudo apt install python-dev python-pip` + python -m pip --version - - For python3.5: `sudo apt install python3.5-dev and curl https://bootstrap.pypa.io/get-pip.py -o - | python3.5 && easy_install pip` + * If you are using Python 3 - - For python3.6, python3.7: We assumed that python3.6 (3.7) and the corresponding versions of dev and pip3 are properly installed by yourself. + python3 -m ensurepip + python3 -m pip --version ->Even if you already have Python 2 or Python 3 in your environment, you need to install Python-dev or Python 3.5 (3.6, 3.7) -dev. +* Confirm that Python and pip is 64 bit,and the processor architecture is x86_64(or called x64、Intel 64、AMD64)architecture. Currently, PaddlePaddle doesn't support arm64 architecture. The first line below outputs "64bit", and the second line outputs "x86_64", "x64" or "AMD64" : -Now let's install PaddlePaddle: + * If you are using Python 2 + python -c "import platform;print(platform.architecture()[0]);print(platform.machine())" + * If you are using Python 3 -1. Use pip install to install PaddlePaddle + python3 -c "import platform;print(platform.architecture()[0]);print(platform.machine())" +* The installation package provided by default requires computer support for MKL +* If you do not know the machine environment, please download and use[Quick install script](https://fast-install.bj.bcebos.com/fast_install.sh), please refer to[here](https://github.com/PaddlePaddle/FluidDoc/tree/develop/doc/fluid/beginners_guide/install/install_script.md). - * For users who need **the CPU version PaddlePaddle**: `pip install paddlepaddle` or `pip3 install paddlepaddle` +## Choose CPU/GPU - * For users who need **the GPU version PaddlePaddle**: `pip install paddlepaddle-gpu` or `pip3 install paddlepaddle-gpu` +* If your computer doesn't have NVIDIA® GPU, please install CPU version of PaddlePaddle - > 1.In order to prevent problem "nccl.h cannot be found", please first install nccl2 according to the following command (here is ubuntu 16.04, CUDA9, ncDNN v7 nccl2 installation instructions), for more information about the installation information, please refer to [the NVIDIA official website](https://developer.nvidia.com/nccl/nccl-download): +* If your computer has NVIDIA® GPU, and meet the following conditions, we command you to install PaddlePaddle + * **CUDA toolkit 10.0 with cuDNN v7.3+(for multi card support, NCCL2.3.7 or higher)** + * **CUDA toolkit 9.0 with cuDNN v7.3+(for multi card support, NCCL2.3.7 or higher)** + * **Hardware devices with GPU computing power over 1.0** - i. `Wget http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64/nvidia-machine-learning-repo-ubuntu1604_1.0.0-1_amd64.deb` - ii. `dpkg -i nvidia-machine- Learning-repo-ubuntu1604_1.0.0-1_amd64.deb` - iii. `sudo apt-get install -y libnccl2=2.2.13-1+cuda9.0 libnccl-dev=2.2.13-1+cuda9.0` - > 2.If you do not specify the pypi package version number, we will by default provide you with a version of PaddlePaddle that supports Cuda 9/cuDNN v7. + You can refer to NVIDIA official documents for installation process and configuration method of CUDA and cudnn. Please refer to[CUDA](https://docs.nvidia.com/cuda/cuda-installation-guide-linux/),[cuDNN](https://docs.nvidia.com/deeplearning/sdk/cudnn-install/) - * For users with `Cannot uninstall 'six'.` problems, the probable reason is the existing Python installation issues in your system. In this case, use `pip install paddlepaddle --ignore-installed six`(CPU) or `pip install paddlepaddle-gpu -- Ignore-installed six` (GPU) to resolve. +* If you need to use multi card environment, please make sure that you have installed nccl2 correctly, or install nccl2 according to the following instructions (here is the installation instructions of nccl2 under ubuntu 16.04, CUDA9 and cuDNN7). For more version of installation information, please refer to NVIDIA[official website](https://developer.nvidia.com/nccl): - * For users with **other requirements**: `pip install paddlepaddle==[version number]` or `pip3 install paddlepaddle==[version number]` - > For `the version number`, please refer to [the latest Release installation package list](./Tables.html/#whls). If you need to obtain and install **the latest PaddlePaddle development branch**, you can download and install the latest whl installation package and c-api development package from [the latest dev installation package list](./Tables.html/#ciwhls) or our [CI system](https://paddleci.ngrok.io/project.html?projectId=Manylinux1&tab=projectOverview). To log in, click on "Log in as guest". + wget https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64/nvidia-machine-learning-repo-ubuntu1604_1.0.0-1_amd64.deb + dpkg -i nvidia-machine-learning-repo-ubuntu1604_1.0.0-1_amd64.deb + sudo apt-get install -y libnccl2=2.3.7-1+cuda9.0 libnccl-dev=2.3.7-1+cuda9.0 -Now you have completed the process of installing PaddlePaddle using `pip install`. +## Choose an installation method -

-### ***Install using Docker*** - -In order to better use Docker and avoid problems, we recommend using **the highest version of Docker**. For details on **installing and using Docker**, please refer to [the official Docker documentation](https://docs.docker.com/install/). - -> Please note that to install and use the PaddlePaddle version that supports GPU, you must first install [nvidia-docker](https://github.com/NVIDIA/nvidia-docker) - -If Docker is **properly installed**, you can start **installing PaddlePaddle using Docker**. - -1. Use the following command to pull the image we pre-installed for PaddlePaddle: - - * For users who need **a CPU version of PaddlePaddle**, use the following command to pull the image we pre-installed for your *PaddlePaddle For CPU*: - - `Docker pull hub.baidubce.com/paddlepaddle/paddle: 1.2` - - * For users who need **a GPU version of PaddlePaddle**, use the following command to pull the image we pre-installed for your *PaddlePaddle For GPU*: - - `Docker pull hub.baidubce.com/paddlepaddle/paddle:1.2-gpu-cuda9.0-cudnn7` - - * You can also pull any of our Docker images by following the instructions below: - - `Docker pull hub.baidubce.com/paddlepaddle/paddle:[tag]` +Under the Ubuntu system, we offer 5 installation methods: - > (Please replace [tag] with the contents of [the mirror table](https://github.com/PaddlePaddle/FluidDoc/blob/develop/doc/fluid/beginners_guide/install/Tables.html/#dockers)) +* Pip installation (recommended) +* [Conda安装](./install_Conda.html) +* [Docker installation](./install_Docker.html) +* [Source code compilation and installation](./compile/compile_Ubuntu.html#ubt_source) +* [Docker source code compilation and installation](./compile/compile_Ubuntu.html#ubt_docker) -2. Use the following command to build from the already pulled image and enter the Docker container: +We will introduce pip installation here. - `Docker run --name [Name of container] -it -v $PWD:/paddle /bin/bash` +## Installation steps - > In the above command, --name [Name of container] sets the name of the Docker; the `-it` parameter indicates that the container is running interactively with the host machine; -v $PWD:/paddle specifies the current path (the PWD variable in Linux will expand to The absolute path of the current path) is mounted to the /paddle directory inside the container; `` specifies the name of the image to use, if you need to use our image please use `hub.baidubce.com/paddlepaddle/paddle:[tag]`. Note: The meaning of tag is the same as the second step; /bin/bash is the command to be executed in Docker. +* CPU version of PaddlePaddle: + * For Python 2: `python -m pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple` or `python -m pip install paddlepaddle -i https://pypi.tuna.tsinghua.edu.cn/simple` + * For Python 3: `python3 -m pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple` or `python3 -m pip install paddlepaddle -i https://pypi.tuna.tsinghua.edu.cn/simple` -3. (Optional: When you need to enter the Docker container a second time) re-enter the PaddlePaddle container with the following command: +* GPU version PaddlePaddle: + * For Python 2: `python -m pip install paddlepaddle-gpu -i https://mirror.baidu.com/pypi/simple` or `python -m pip install paddlepaddle-gpu -i https://pypi.tuna.tsinghua.edu.cn/simple` + * For Python 3: `python3 -m pip install paddlepaddle-gpu -i https://mirror.baidu.com/pypi/simple` or `python3 -m pip install paddlepaddle-gpu -i https://pypi.tuna.tsinghua.edu.cn/simple` - `Docker start [Name of container]` +You can [verify whether the installation is successful](#check), if you have any questions please see [FAQ](./FAQ.html) - > start the container created previously. +Note: - `Docker attach [Name of container]` +* For python2.7, we recommend to use `python` command; For python3.x, we recommend to use `python3` command. - > Enter the started container. +* `python -m pip install paddlepaddle-gpu -i https://pypi.tuna.tsinghua.edu.cn/simple` This command will install PaddlePaddle supporting CUDA 10.0 cuDNN v7, if you have different requirement to the version of CUDA or cuDNN, you can use `python -m pip install paddlepaddle-gpu==[version number] -i https://pypi.tuna.tsinghua.edu.cn/simple` or `python3 -m pip install paddlepaddle-gpu==[version number] -i https://pypi.tuna.tsinghua.edu.cn/simple` command to install, for version number please see[version number](https://pypi.org/project/paddlepaddle-gpu#history), for correspondence between paddlepaddle and CUDA and cuDNN version, please see [Installation package list](./Tables.html#whls) -Now that you have successfully installed PaddlePaddle using Docker, you only need to run PaddlePaddle after entering the Docker container. For more Docker usage, please refer to [the official Docker documentation](https://docs.docker.com/). ->Note: In order to reduce the size, `vim` is not installed in PaddlePaddle Docker image by default. You can edit the code in the container after executing `apt-get install -y vim` in the container. +* Download the latest stable installation package by default. For development installation package, please refer to[here](./Tables.html#ciwhls) +

## ***Verify installation*** -After the installation is complete, you can use `python` or `python3` to enter the python interpreter and then use `import paddle.fluid` to verify that the installation was successful. - + After the installation is complete, you can use `python` or `python3` to enter the Python interpreter and then use `import paddle.fluid as fluid` and then `fluid.install_check.run_check()` to verify that the installation was successful. + If `Your Paddle Fluid is installed succesfully!` appears, it means the installation was successful.

## ***How to uninstall***