install_CentOS_en.md 6.8 KB
Newer Older
1
# **Install on CentOS**
2 3


4
## Environmental preparation
5

6 7 8 9 10
* **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)**
11

12
### Note
13

14 15
* 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
16

17
    * 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
18

19
        which python
20

21
    * 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
22

23
        which python3
24

25
* You need to confirm whether the version of Python meets the requirements
26

27
    * If you are using Python 2, use the following command to confirm that it is 2.7.15+
28

29
        python --version
30

31
    * If you are using Python 3, use the following command to confirm that it is 3.5.1+/3.6/3.7
32

33
        python3 --version
34

35
* It is required to confirm whether the version of pip meets the requirements. The version of pip is required to be 9.0.1+
36

37
    * If you are using Python 2
38

39
        python -m ensurepip
40

41
        python -m pip --version
42

43
    * If you are using Python 3
44

45
        python3 -m ensurepip
46

47
        python3 -m pip --version
48

49
* 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":
50

51
    * If you are using Python 2
52

53
        python -c "import platform;print(platform.architecture()[0]);print(platform.machine())"
54

55
    * If you are using Python 2
56

57
        python3 -c "import platform;print(platform.architecture()[0]);print(platform.machine())"
58

59
* The installation package provided by default requires computer support for MKL
60
* 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/install).
61

62
## Choose CPU/GPU
63

64
* If your computer doesn't have NVIDIA® GPU, please install the CPU version of PaddlePaddle
65

66
* If your computer has NVIDIA® GPU, please make sure that the following conditions are met and install the GPU version of PaddlePaddle
67

68 69 70
    * **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**
71

72
        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/)
73

74
* 如果您需要使用多卡环境请确保您已经正确安装nccl2,或者按照以下指令安装nccl2(这里提供的是CentOS 7,CUDA9,cuDNN7下nccl2的安装指令),更多版本的安装信息请参考NVIDIA[官方网站](https://developer.nvidia.com/nccl):
75 76


77 78 79 80
        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
81

82
## Installation method
83

84
There are five installation methods under CentOS system:
85

86 87 88 89 90
* 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)
91

92
Here is pip installation
93

94
## Installation steps
95

96 97 98 99 100 101
* 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`
102

103
You can[Verify installation succeeded or not](#check),if you have any questions, you can refer to [FAQ](./FAQ.html)
104 105


106
Note:
107

108
* 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
109 110


111
* `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)
112 113


114
* Download the latest stable installation package by default. For development installation package, please refer to [here](./Tables.html#ciwhls)
115

116 117
<a name="check"></a>
## ***Verify installation***
118

119
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()`
120

121
If `Your Paddle Fluid is installed succesfully!` appears, to verify that the installation was successful.
122 123 124 125


## ***How to uninstall***

126
Please use the following command to uninstall PaddlePaddle:
127

128
* ***CPU version of PaddlePaddle***: `python -m pip uninstall paddlepaddle` or `python3 -m pip uninstall paddlepaddle`
129

130
* ***GPU version of PaddlePaddle***: `python -m pip uninstall paddlepaddle-gpu` or `python3 -m pip uninstall paddlepaddle-gpu`