Compile Dependency Table

Dependency package name Version Description Installation command
CMake 3.10, 3.11, 3.15, 3.16(Recommend),3.17 There is an official bug in version 3.12/3.13/3.14, please skip this version
GCC 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(64 bit) 2.7.x. or 3.5+.x depends on or apt install python-dev or yum install python-devel if installing python3, please go to Python official website
SWIG at least 2.0 apt install swig or yum install swig
wget any apt install wget or yum install wget
openblas any optional
pip at least 20.2.2 apt install python-pip or yum install Python-pip
numpy >=1.12.0 pip install numpy
protobuf >=3.1.0 pip install protobuf
wheel any pip install wheel
patchELF any apt install patchelf or read github patchELF official documentation
go >=1.8 optional
setuptools >= 28.0.0
unrar brew install unrar (For MacOS), apt-get install unrar (For Ubuntu)

Compile Option Table


PaddlePaddle supports two BLAS libraries, MKL and OpenBlAS. MKL is used by default. If you use MKL and the machine contains the AVX2 instruction set, you will also download the MKL-DNN math library, for details please refer to here.

If you close MKL, OpenBLAS will be used as the BLAS library.


PaddlePaddle automatically finds the CUDA and cuDNN libraries installed in the system for compilation and execution at compile time/runtime. Use the parameter -DCUDA_ARCH_NAME=Auto to specify to enable automatic detection of the SM architecture and speed up compilation.

PaddlePaddle can be compiled and run using any version after cuDNN v5.1, but try to keep the same version of cuDNN in the compiling and running processes. We recommend using the latest version of cuDNN.

Configure Compile Options

PaddePaddle implements references to various BLAS/CUDA/cuDNN libraries by specifying paths at compile time. When cmake compiles, it first searches the system paths ( /usr/liby and /usr/local/lib ) for these libraries, and also reads the relevant path variables for searching. Can be set by using the -D command, for example:


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

Option Description Default
WITH_GPU Whether to support GPU ON
WITH_AVX whether to compile PaddlePaddle binaries file containing the AVX instruction set ON
WITH_PYTHON Whether the PYTHON interpreter is embedded ON
WITH_TESTING Whether to turn on unit test OFF
WITH_MKL Whether to use the MKL math library, if not,using OpenBLAS ON
WITH_SYSTEM_BLAS Whether to use the system's BLAS OFF
WITH_DISTRIBUTE Whether to Compile with distributed version OFF
WITH_BRPC_RDMA Whether to use BRPC RDMA as RPC protocol OFF
ON_INFER Whether to turn on prediction optimization 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/'
Version Number Release Discription
paddlepaddle==[version code] such as paddlepaddle==2.0.0 Only support the corresponding version of the CPU PaddlePaddle, please refer to Pypi for the specific version.
paddlepaddle-gpu==[version code], such as paddlepaddle-gpu==2.0.0 The default installation supports the PaddlePaddle installation package corresponding to [version number] of CUDA 10.0 and cuDNN 7

You can find various distributions of PaddlePaddle-gpu in the Release 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==2.0.0 will install the installation package of PaddlePaddle that supports CUDA 10.0 and cuDNN 7 by default under Windows environment.

Multi-version whl package list - Release

Release Instruction cp27-cp27mu cp27-cp27m cp35-cp35m cp36-cp36m cp37-cp37m cp38-cp38
cpu-mkl paddlepaddle-2.0.0-cp27-cp27mu-linux_x86_64.whl - paddlepaddle-2.0.0-cp35-cp35m-linux_x86_64.whl paddlepaddle-2.0.0-cp36-cp36m-linux_x86_64.whl paddlepaddle-2.0.0-cp37-cp37m-linux_x86_64.whl paddlepaddle-2.0.0-cp38-cp38-linux_x86_64.whl
cuda9.0-cudnn7-mkl paddlepaddle_gpu-2.0.0.post90-cp27-cp27mu-linux_x86_64.whl - paddlepaddle_gpu-2.0.0.post90-cp35-cp35m-linux_x86_64.whl paddlepaddle_gpu-2.0.0.post90-cp36-cp36m-linux_x86_64.whl paddlepaddle_gpu-2.0.0.post90-cp37-cp37m-linux_x86_64.whl paddlepaddle_gpu-2.0.0.post90-cp38-cp38-linux_x86_64.whl
cuda10.0-cudnn7-mkl paddlepaddle_gpu-2.0.0.post100-cp27-cp27mu-linux_x86_64.whl - paddlepaddle_gpu-2.0.0.post100-cp35-cp35m-linux_x86_64.whl paddlepaddle_gpu-2.0.0.post100-cp36-cp36m-linux_x86_64.whl paddlepaddle_gpu-2.0.0.post100-cp37-cp37m-linux_x86_64.whl paddlepaddle_gpu-2.0.0.post100-cp38-cp38-linux_x86_64.whl
cuda10.1_cudnn7-mkl paddlepaddle_gpu-2.0.0.post101-cp27-cp27mu-linux_x86_64.whl - paddlepaddle_gpu-2.0.0.post101-cp35-cp35m-linux_x86_64.whl paddlepaddle_gpu-2.0.0.post101-cp36-cp36m-linux_x86_64.whl paddlepaddle_gpu-2.0.0.post101-cp37-cp37m-linux_x86_64.whl paddlepaddle_gpu-2.0.0.post101-cp38-cp38-linux_x86_64.whl
cuda10.2_cudnn7-mkl paddlepaddle_gpu-2.0.0-cp27-cp27mu-linux_x86_64.whl - paddlepaddle_gpu-2.0.0-cp35-cp35m-linux_x86_64.whl paddlepaddle_gpu-2.0.0-cp36-cp36m-linux_x86_64.whl paddlepaddle_gpu-2.0.0-cp37-cp37m-linux_x86_64.whl paddlepaddle_gpu-2.0.0-cp38-cp38-linux_x86_64.whl
cuda11.0-cudnn8-mkl paddlepaddle_gpu-2.0.0.post110-cp27-cp27mu-linux_x86_64.whl - paddlepaddle_gpu-2.0.0.post110-cp35-cp35m-linux_x86_64.whl paddlepaddle_gpu-2.0.0.post110-cp36-cp36m-linux_x86_64.whl paddlepaddle_gpu-2.0.0.post110-cp37-cp37m-linux_x86_64.whl paddlepaddle_gpu-2.0.0.post110-cp38-cp38-linux_x86_64.whl
cuda10.0-cudnn7.6-trt6.0.1.5 - - - paddlepaddle_gpu-2.0.0.post100-cp36-cp36m-linux_x86_64.whl - -
cuda10.1-cudnn7.6-trt6.0.1.5 paddlepaddle_gpu-2.0.0.post101-cp27-cp27mu-linux_x86_64.whl - - paddlepaddle_gpu-2.0.0.post101-cp36-cp36m-linux_x86_64.whl - -
cuda10.2-cudnn8.0-trt7.1.3 paddlepaddle_gpu-2.0.0-cp27-cp27mu-linux_x86_64.whl - - paddlepaddle_gpu-2.0.0-cp36-cp36m-linux_x86_64.whl - -
2.0.0-nv-jetson-jetpack4.3-all paddlepaddle_gpu-2.0.0-cp27-cp27mu-linux_aarch64.whl - - paddlepaddle_gpu-2.0.0-cp36-cp36m-linux_aarch64.whl - -
2.0.0-nv-jetson-jetpack4.3-nano paddlepaddle_gpu-2.0.0-cp27-cp27mu-linux_aarch64.whl - - paddlepaddle_gpu-2.0.0-cp36-cp36m-linux_aarch64.whl - -
2.0.0-nv-jetson-jetpack4.3-tx2 paddlepaddle_gpu-2.0.0-cp27-cp27mu-linux_aarch64.whl - - paddlepaddle_gpu-2.0.0-cp36-cp36m-linux_aarch64.whl - -
2.0.0-nv-jetson-jetpack4.3-xavier paddlepaddle_gpu-2.0.0-cp27-cp27mu-linux_aarch64.whl - - paddlepaddle_gpu-2.0.0-cp36-cp36m-linux_aarch64.whl - -
win-cpu-mkl-avx - paddlepaddle-2.0.0-cp27-cp27m-win_amd64.whl paddlepaddle-2.0.0-cp35-cp35m-win_amd64.whl paddlepaddle-2.0.0-cp36-cp36m-win_amd64.whl paddlepaddle-2.0.0-cp37-cp37m-win_amd64.whl paddlepaddle-2.0.0-cp38-cp38-win_amd64.whl
win-cpu-mkl-noavx - paddlepaddle-2.0.0-cp27-cp27m-win_amd64.whl - - - -
win-cpu-openblas-avx - paddlepaddle-2.0.0-cp27-cp27m-win_amd64.whl - paddlepaddle-2.0.0-cp36-cp36m-win_amd64.whl - -
win-cpu-openblas-noavx - paddlepaddle-2.0.0-cp27-cp27m-win_amd64.whl - - - -
win-cuda9.0-cudnn7-mkl-avx - paddlepaddle_gpu-2.0.0-cp27-cp27m-win_amd64.whl paddlepaddle_gpu-2.0.0-cp35-cp35m-win_amd64.whl paddlepaddle_gpu-2.0.0-cp36-cp36m-win_amd64.whl paddlepaddle_gpu-2.0.0-cp37-cp37m-win_amd64.whl paddlepaddle_gpu-2.0.0-cp38-cp38m-win_amd64.whl
win-cuda9.0-cudnn7-mkl-noavx - paddlepaddle_gpu-2.0.0-cp27-cp27m-win_amd64.whl - - - -
win-cuda9.0-cudnn7-openblas-avx - paddlepaddle_gpu-2.0.0-cp27-cp27m-win_amd64.whl - paddlepaddle_gpu-2.0.0-cp36-cp36m-win_amd64.whl - -
win-cuda9.0-cudnn7-openblas-noavx - paddlepaddle_gpu-2.0.0-cp27-cp27m-win_amd64.whl - - - -
win-cuda10.0-cudnn7-mkl-avx - paddlepaddle_gpu-2.0.0-cp27-cp27m-win_amd64.whl paddlepaddle_gpu-2.0.0-cp35-cp35m-win_amd64.whl paddlepaddle_gpu-2.0.0-cp36-cp36m-win_amd64.whl paddlepaddle_gpu-2.0.0-cp37-cp37m-win_amd64.whl paddlepaddle_gpu-2.0.0-cp38-cp38m-win_amd64.whl
win-cuda10.0-cudnn7-mkl-noavx - paddlepaddle_gpu-2.0.0-cp27-cp27m-win_amd64.whl - - - -
win-cuda10.1-cudnn7-mkl-avx - paddlepaddle_gpu-2.0.0-cp27-cp27m-win_amd64.whl paddlepaddle_gpu-2.0.0-cp35-cp35m-win_amd64.whl paddlepaddle_gpu-2.0.0-cp36-cp36m-win_amd64.whl paddlepaddle_gpu-2.0.0-cp37-cp37m-win_amd64.whl paddlepaddle_gpu-2.0.0-cp38-cp38m-win_amd64.whl
win-cuda10.1-cudnn7-mkl-noavx - paddlepaddle_gpu-2.0.0-cp27-cp27m-win_amd64.whl - - - -
win-cuda10.2-cudnn7-mkl-avx - paddlepaddle_gpu-2.0.0-cp27-cp27m-win_amd64.whl paddlepaddle_gpu-2.0.0-cp35-cp35m-win_amd64.whl paddlepaddle_gpu-2.0.0-cp36-cp36m-win_amd64.whl paddlepaddle_gpu-2.0.0-cp37-cp37m-win_amd64.whl paddlepaddle_gpu-2.0.0-cp37-cp37m-win_amd64.whl
win-cuda10.2-cudnn7-mkl-noavx - paddlepaddle_gpu-2.0.0-cp27-cp27m-win_amd64.whl - - - -
win-cuda11.0-cudnn8-mkl-avx - - paddlepaddle_gpu-2.0.0-cp35-cp35m-win_amd64.whl paddlepaddle_gpu-2.0.0-cp36-cp36m-win_amd64.whl paddlepaddle_gpu-2.0.0-cp37-cp37m-win_amd64.whl paddlepaddle_gpu-2.0.0-cp38-cp38m-win_amd64.whl
mac_cpu - paddlepaddle-2.0.0-cp27-cp27m-macosx_10_6_intel.whl paddlepaddle-2.0.0-cp35-cp35m-macosx_10_6_intel.whl paddlepaddle-2.0.0-cp36-cp36m-macosx_10_6_intel.whl paddlepaddle-2.0.0-cp37-cp37m-macosx_10_6_intel.whl paddlepaddle-2.0.0-cp38-cp38-macosx_10_14_x86_64.whl

Table instruction

  • Vertical axis

cpu-mkl: Support CPU 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’

Execute the PaddlePaddle training program in Docker

Suppose you have written a PaddlePaddle program in the current directory (such as /home/work): ( refer to PaddlePaddleBook to write), you can start the training with the following command:

cd /home/work
docker run -it -v $PWD:/work /work/

In the above commands, the -it parameter indicates that the container has been run interactively; -v $PWD:/work specifies that the current path (the absolute path where the PWD variable in Linux will expand to the current path) is mounted to the :/work directory inside the container: specifies the container to be used; finally /work/ is the command executed inside the container, ie. the training program.

Of course, you can also enter into the Docker container and execute or debug your code interactively:

docker run -it -v $PWD:/work /bin/bash
cd /work

**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 (which installs vim for you) in the container.

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.

We provide a Docker image that can run the PaddlePaddle Book directly, running directly:

docker run -p 8888:8888

Domestic users can use the following image source to speed up access:

docker run -p 8888:8888

Then enter the following URL in your browser:


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 to run the image. Don’t forget to install the latest GPU drivers on your physical machine in advance.

Nvidia-docker run -it -v $PWD:/work /bin/bash

Note: If you don’t have nvidia-docker installed, you can try the following to mount the CUDA library and Linux devices into the Docker container:

export CUDA_SO="$(\ls /usr/lib64/libcuda* | xargs -I{} echo '-v {}:{}') \
$(\ls /usr/lib64/libnvidia* | xargs -I{} echo '-v {}:{}')"
export DEVICES=$(\ls /dev/nvidia* | xargs -I{} echo '--device {}:{}')
docker run ${CUDA_SO} \
${DEVICES} -it