diff --git a/docs/install/FAQ.md b/docs/install/FAQ.md index 0cc2ecf46ac..137bc321ecd 100644 --- a/docs/install/FAQ.md +++ b/docs/install/FAQ.md @@ -63,9 +63,9 @@ > 是的。我们的 Docker image 运行一个 [Bash 脚本](https://github.com/PaddlePaddle/Paddle/blob/develop/paddle/scripts/paddle_build.sh)。这个脚本调用`make -j$(nproc)` 来启动和 CPU 核一样多的进程来并行编译。 -- 在 Windows/macOS 上编译很慢? +- 在 Windows/MacOS 上编译很慢? - > Docker 在 Windows 和 macOS 都可以运行。不过实际上是运行在一个 Linux 虚拟机上。可能需要注意给这个虚拟机多分配一些 CPU 和内存,以保证编译高效。具体做法请参考[issue627](https://github.com/PaddlePaddle/Paddle/issues/627)。 + > Docker 在 Windows 和 MacOS 都可以运行。不过实际上是运行在一个 Linux 虚拟机上。可能需要注意给这个虚拟机多分配一些 CPU 和内存,以保证编译高效。具体做法请参考[issue627](https://github.com/PaddlePaddle/Paddle/issues/627)。 - 磁盘不够? @@ -89,7 +89,7 @@ -- macOS 下安装 PaddlePaddle 后 import paddle.fluid 出现`Fatal Python error: PyThreadState_Get: no current thread running`错误 +- MacOS 下安装 PaddlePaddle 后 import paddle.fluid 出现`Fatal Python error: PyThreadState_Get: no current thread running`错误 - For Python2.7.x (install by brew): 请使用`export LD_LIBRARY_PATH=/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7 && export DYLD_LIBRARY_PATH=/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7` - For Python2.7.x (install by Python.org): 请使用`export LD_LIBRARY_PATH=/Library/Frameworks/Python.framework/Versions/2.7 && export DYLD_LIBRARY_PATH=/Library/Frameworks/Python.framework/Versions/2.7` diff --git a/docs/install/FAQ_en.md b/docs/install/FAQ_en.md index 3aae1e0abbb..7e0da11d2a5 100644 --- a/docs/install/FAQ_en.md +++ b/docs/install/FAQ_en.md @@ -59,7 +59,7 @@ - Why use Docker? - > Installing the tools and configurations in a Docker image standardizes the build environment. 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. + > Installing the tools and configurations in a Docker image standardizes the build environment. 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. - Can I choose not to use Docker? @@ -86,9 +86,9 @@ > If you develop with your own computer, you will naturally have admin privileges (sudo). If you are developing from a public computer, you need to ask the administrator to install and configure Docker. In addition, the PaddlePaddle project is working hard to support other container technologies that don't require sudo, such as rkt. -- Is compiling slow on Windows/macOS? +- Is compiling slow on Windows/MacOS? - > Docker runs on both Windows and macOS. However, it is actually running on a Linux virtual machine. It may be necessary to pay attention to allocate more CPU and memory to this virtual machine to ensure efficient compilation. Please refer to [issue627](https://github.com/PaddlePaddle/Paddle/issues/627) for details. + > Docker runs on both Windows and MacOS. However, it is actually running on a Linux virtual machine. It may be necessary to pay attention to allocate more CPU and memory to this virtual machine to ensure efficient compilation. Please refer to [issue627](https://github.com/PaddlePaddle/Paddle/issues/627) for details. - Not enough disk? @@ -109,7 +109,7 @@ > The main reason for this problem is that your graphics card driver is lower than the corresponding CUDA version. Please ensure that your graphics card driver supports the CUDA version used. -- `Fatal Python error: PyThreadState_Get: no current thread running` error occurs when importing paddle.fluid after installing PaddlePaddle on macOS. +- `Fatal Python error: PyThreadState_Get: no current thread running` error occurs when importing paddle.fluid after installing PaddlePaddle on MacOS. - For Python2.7.x (install by brew): Please use `export LD_LIBRARY_PATH=/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7 && export DYLD_LIBRARY_PATH=/usr/ Local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7` diff --git a/docs/install/Tables.md b/docs/install/Tables.md index fa709dcb140..8600cad40fc 100644 --- a/docs/install/Tables.md +++ b/docs/install/Tables.md @@ -1,6 +1,98 @@ # 附录 + + +## **飞桨支持的 Nvidia GPU 架构及安装方式** +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GPU 架构 Compute Capability 对应 GPU 硬件型号 请下载以下 CUDA 版本的飞桨安装包
Fermi sm_20 GeForce 400, 500, 600, GT-630 不支持
Kepler sm_30 GeForce 700, GT-730 不支持
Kepler sm_35 Tesla K40 CUDA10
Kepler sm_37 Tesla K80 CUDA10
Maxwell sm_50 Tesla/Quadro M series CUDA10、CUDA11
Maxwell sm_52 Quadro M6000 , GeForce 900, GTX-970, GTX-980, GTX Titan X CUDA10、CUDA11
Pascal sm_60 Quadro GP100, Tesla P100, DGX-1 CUDA10、CUDA11
Pascal sm_61 GTX 1080, GTX 1070, GTX 1060, GTX 1050, GTX 1030 (GP108), GT 1010 (GP108) Titan Xp, Tesla P40, Tesla P4 CUDA10、CUDA11
Volta sm_70 DGX-1 with Volta, Tesla V100, GTX 1180 (GV104), Titan V, Quadro GV100 CUDA10、CUDA11
Turing sm_75 GTX/RTX Turing – GTX 1660 Ti, RTX 2060, RTX 2070, RTX 2080, Titan RTX, Quadro RTX 4000, Quadro RTX 5000, Quadro RTX 6000, Quadro RTX 8000, Quadro T1000/T2000, Tesla T4 CUDA10、CUDA11
Ampere sm_80 NVIDIA A100, GA100, NVIDIA DGX-A100 CUDA11
Ampere sm_86 Tesla GA10x cards, RTX Ampere – RTX 3080, GA102 – RTX 3090, RTX A2000, A3000, RTX A4000, A5000, A6000, NVIDIA A40, GA106 – RTX 3060, GA104 – RTX 3070, GA107 – RTX 3050, RTX A10, RTX A16, RTX A40, A2 Tensor Core GPU CUDA11、CUDA11.2(推荐)
+

+ +

+ ## **编译依赖表**

@@ -27,9 +119,9 @@ - Clang (macOS Only) + Clang (MacOS Only) 9.0 及以上 - 通常使用 macOS 10.11 及以上的系统对应的 Clang 版本即可 + 通常使用 MacOS 10.11 及以上的系统对应的 Clang 版本即可 @@ -102,7 +194,7 @@ unrar - brew install rar (For macOS), apt-get install unrar (For Ubuntu) + brew install unrar (For MacOS), apt-get install unrar (For Ubuntu) @@ -228,11 +320,11 @@ PaddePaddle 通过编译时指定路径来实现引用各种 BLAS/CUDA/cuDNN 库 - paddlepaddle==[版本号] 例如 paddlepaddle==2.2.1 + paddlepaddle==[版本号] 例如 paddlepaddle==2.3.2 只支持 CPU 对应版本的 PaddlePaddle,具体版本请参见Pypi - paddlepaddle-gpu==[版本号] 例如 paddlepaddle-gpu==2.2.1 + paddlepaddle-gpu==[版本号] 例如 paddlepaddle-gpu==2.3.2 默认安装支持 CUDA 10.2 和 cuDNN 7 的对应[版本号]的 PaddlePaddle 安装包 @@ -242,7 +334,7 @@ PaddePaddle 通过编译时指定路径来实现引用各种 BLAS/CUDA/cuDNN 库 您可以在 [Release History](https://pypi.org/project/paddlepaddle-gpu/#history) 中找到 PaddlePaddle-gpu 的各个发行版本。 > 其中`postXX` 对应的是 CUDA 和 cuDNN 的版本,`postXX`之前的数字代表 Paddle 的版本 -需要注意的是,命令中 paddlepaddle-gpu==2.2.1 在 windows 环境下,会默认安装支持 CUDA 10.2 和 cuDNN 7 的对应[版本号]的 PaddlePaddle 安装包 +需要注意的是,命令中 paddlepaddle-gpu==2.3.2 在 windows 环境下,会默认安装支持 CUDA 10.2 和 cuDNN 7 的对应[版本号]的 PaddlePaddle 安装包

@@ -258,195 +350,257 @@ PaddePaddle 通过编译时指定路径来实现引用各种 BLAS/CUDA/cuDNN 库 cp37-cp37m cp38-cp38 cp39-cp39 + cp310-cp310 cpu-mkl-avx - paddlepaddle-2.2.1-cp36-cp36m-linux_x86_64.whl - paddlepaddle-2.2.1-cp37-cp37m-linux_x86_64.whl - paddlepaddle-2.2.1-cp38-cp38-linux_x86_64.whl - paddlepaddle-2.2.1-cp39-cp39-linux_x86_64.whl + paddlepaddle-2.3.2-cp36-cp36m-linux_x86_64.whl + paddlepaddle-2.3.2-cp37-cp37m-linux_x86_64.whl + paddlepaddle-2.3.2-cp38-cp38-linux_x86_64.whl + paddlepaddle-2.3.2-cp39-cp39-linux_x86_64.whl + paddlepaddle-2.3.2-cp310-cp310-linux_x86_64.whl cpu-openblas-avx - - - paddlepaddle-2.2.1-cp38-cp38-linux_x86_64.whl + paddlepaddle-2.3.2-cp38-cp38-linux_x86_64.whl + - - cpu-mkl-noavx - - - paddlepaddle-2.2.1-cp38-cp38-linux_x86_64.whl + paddlepaddle-2.3.2-cp38-cp38-linux_x86_64.whl + - - cpu-openblas-noavx - - - paddlepaddle-2.2.1-cp38-cp38-linux_x86_64.whl + paddlepaddle-2.3.2-cp38-cp38-linux_x86_64.whl + - - cuda10.1-cudnn7-mkl-gcc5.4-avx - - paddlepaddle_gpu-2.2.1.post101-cp36-cp36m-linux_x86_64.whl - - paddlepaddle_gpu-2.2.1.post101-cp37-cp37m-linux_x86_64.whl - - paddlepaddle_gpu-2.2.1.post101-cp38-cp38-linux_x86_64.whl - - paddlepaddle_gpu-2.2.1.post101-cp39-cp39-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2.post101-cp36-cp36m-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2.post101-cp37-cp37m-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2.post101-cp38-cp38-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2.post101-cp39-cp39-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2.post101-cp310-cp310-linux_x86_64.whl cuda10.1-cudnn7-mkl-gcc5.4-noavx - - - - paddlepaddle_gpu-2.2.1.post101-cp38-cp38-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2.post101-cp38-cp38-linux_x86_64.whl + - - cuda10.2-cudnn7-mkl-gcc8.2-avx - - paddlepaddle_gpu-2.2.1-cp36-cp36m-linux_x86_64.whl - - paddlepaddle_gpu-2.2.1-cp37-cp37m-linux_x86_64.whl - - paddlepaddle_gpu-2.2.1-cp38-cp38-linux_x86_64.whl - - paddlepaddle_gpu-2.2.1-cp39-cp39-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2-cp36-cp36m-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2-cp37-cp37m-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2-cp38-cp38-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2-cp39-cp39-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2-cp310-cp310-linux_x86_64.whl cuda10.2-cudnn7-mkl-gcc8.2-noavx - - - - paddlepaddle_gpu-2.2.1-cp38-cp38-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2-cp38-cp38-linux_x86_64.whl + - - cuda11.0-cudnn8.0-mkl-gcc8.2-avx - - paddlepaddle_gpu-2.2.1.post110-cp36-cp36m-linux_x86_64.whl - - paddlepaddle_gpu-2.2.1.post110-cp37-cp37m-linux_x86_64.whl - - paddlepaddle_gpu-2.2.1.post110-cp38-cp38-linux_x86_64.whl - - paddlepaddle_gpu-2.2.1.post110-cp39-cp39-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2.post110-cp36-cp36m-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2.post110-cp37-cp37m-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2.post110-cp38-cp38-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2.post110-cp39-cp39-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2.post110-cp310-cp310-linux_x86_64.whl cuda11.1-cudnn8.1-mkl-gcc8.2-avx - - paddlepaddle_gpu-2.2.1.post111-cp36-cp36m-linux_x86_64.whl - - paddlepaddle_gpu-2.2.1.post111-cp37-cp37m-linux_x86_64.whl - - paddlepaddle_gpu-2.2.1.post111-cp38-cp38-linux_x86_64.whl - - paddlepaddle_gpu-2.2.1.post111-cp39-cp39-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2.post111-cp36-cp36m-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2.post111-cp37-cp37m-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2.post111-cp38-cp38-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2.post111-cp39-cp39-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2.post111-cp310-cp310-linux_x86_64.whl cuda11.2-cudnn8.1-mkl-gcc8.2-avx - - paddlepaddle_gpu-2.2.1.post112-cp36-cp36m-linux_x86_64.whl - - paddlepaddle_gpu-2.2.1.post112-cp37-cp37m-linux_x86_64.whl - - paddlepaddle_gpu-2.2.1.post112-cp38-cp38-linux_x86_64.whl - - paddlepaddle_gpu-2.2.1.post112-cp39-cp39-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2.post112-cp36-cp36m-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2.post112-cp37-cp37m-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2.post112-cp38-cp38-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2.post112-cp39-cp39-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2.post112-cp310-cp310-linux_x86_64.whl + + + cuda11.6-cudnn8.4-mkl-gcc8.2-avx + + paddlepaddle_gpu-2.3.2.post116-cp36-cp36m-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2.post116-cp37-cp37m-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2.post116-cp38-cp38-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2.post116-cp39-cp39-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2.post116-cp310-cp310-linux_x86_64.whl macos-cpu-openblas - - paddlepaddle-2.2.1-cp36-cp36m-macosx_10_6_intel.whl - - paddlepaddle-2.2.1-cp37-cp37m-macosx_10_6_intel.whl - - paddlepaddle-2.2.1-cp38-cp38-macosx_10_14_x86_64.whl - - paddlepaddle-2.2.1-cp39-cp39-macosx_10_14_x86_64.whl + + paddlepaddle-2.3.2-cp36-cp36m-macosx_10_6_intel.whl + + paddlepaddle-2.3.2-cp37-cp37m-macosx_10_6_intel.whl + + paddlepaddle-2.3.2-cp38-cp38-macosx_10_14_x86_64.whl + + paddlepaddle-2.3.2-cp39-cp39-macosx_10_14_x86_64.whl + + paddlepaddle-2.3.2-cp310-cp310-macosx_10_14_universal2.whl + + + macos-cpu-openblas-m1 + - + - + + paddlepaddle-2.3.2-cp38-cp38-macosx_11_0_arm64.whl + + paddlepaddle-2.3.2-cp39-cp39-macosx_11_0_arm64.whl + + paddlepaddle-2.3.2-cp310-cp310-macosx_11_0_arm64.whl win-cpu-mkl-avx - paddlepaddle-2.2.1-cp36-cp36m-win_amd64.whl - paddlepaddle-2.2.1-cp37-cp37m-win_amd64.whl - paddlepaddle-2.2.1-cp38-cp38-win_amd64.whl - paddlepaddle-2.2.1-cp39-cp39-win_amd64.whl + paddlepaddle-2.3.2-cp36-cp36m-win_amd64.whl + paddlepaddle-2.3.2-cp37-cp37m-win_amd64.whl + paddlepaddle-2.3.2-cp38-cp38-win_amd64.whl + paddlepaddle-2.3.2-cp39-cp39-win_amd64.whl + paddlepaddle-2.3.2-cp310-cp310-win_amd64.whl win-cpu-mkl-noavx - - - paddlepaddle-2.2.1-cp38-cp38-win_amd64.whl + paddlepaddle-2.3.2-cp38-cp38-win_amd64.whl + - - win-cpu-openblas-avx - - - paddlepaddle-2.2.1-cp38-cp38-win_amd64.whl + paddlepaddle-2.3.2-cp38-cp38-win_amd64.whl + - - win-cpu-openblas-noavx - - - paddlepaddle-2.2.1-cp38-cp38-win_amd64.whl + paddlepaddle-2.3.2-cp38-cp38-win_amd64.whl + - - win-cuda10.1-cudnn7-mkl-vs2017-avx - paddlepaddle_gpu-2.2.1.post101-cp36-cp36m-win_amd64.whl - paddlepaddle_gpu-2.2.1.post101-cp37-cp37m-win_amd64.whl - paddlepaddle_gpu-2.2.1.post101-cp38-cp38-win_amd64.whl - paddlepaddle_gpu-2.2.1.post101-cp39-cp39-win_amd64.whl + paddlepaddle_gpu-2.3.2.post101-cp36-cp36m-win_amd64.whl + paddlepaddle_gpu-2.3.2.post101-cp37-cp37m-win_amd64.whl + paddlepaddle_gpu-2.3.2.post101-cp38-cp38-win_amd64.whl + paddlepaddle_gpu-2.3.2.post101-cp39-cp39-win_amd64.whl + paddlepaddle_gpu-2.3.2.post101-cp310-cp310-win_amd64.whl win-cuda10.1-cudnn7-mkl-vs2017-noavx - - - paddlepaddle_gpu-2.2.1.post101-cp38-cp38-win_amd64.whl + paddlepaddle_gpu-2.3.2.post101-cp38-cp38-win_amd64.whl + - - win-cuda10.2-cudnn7-mkl-vs2017-avx - paddlepaddle_gpu-2.2.1.post102-cp36-cp36m-win_amd64.whl - paddlepaddle_gpu-2.2.1.post102-cp37-cp37m-win_amd64.whl - paddlepaddle_gpu-2.2.1.post102-cp38-cp38-win_amd64.whl - paddlepaddle_gpu-2.2.1.post102-cp39-cp39-win_amd64.whl + paddlepaddle_gpu-2.3.2-cp36-cp36m-win_amd64.whl + paddlepaddle_gpu-2.3.2-cp37-cp37m-win_amd64.whl + paddlepaddle_gpu-2.3.2-cp38-cp38-win_amd64.whl + paddlepaddle_gpu-2.3.2-cp39-cp39-win_amd64.whl + paddlepaddle_gpu-2.3.2-cp310-cp310-win_amd64.whl win-cuda10.2-cudnn7-mkl-vs2017-noavx - - paddlepaddle_gpu-2.2.1.post102-cp37-cp37m-win_amd64.whl - paddlepaddle_gpu-2.2.1.post102-cp38-cp38-win_amd64.whl + paddlepaddle_gpu-2.3.2-cp37-cp37m-win_amd64.whl + paddlepaddle_gpu-2.3.2-cp38-cp38-win_amd64.whl + - - win-cuda11.0-cudnn8.0-mkl-vs2017-avx - paddlepaddle_gpu-2.2.1.post110-cp36-cp36m-win_amd64.whl - paddlepaddle_gpu-2.2.1.post110-cp37-cp37m-win_amd64.whl - paddlepaddle_gpu-2.2.1.post110-cp38-cp38-win_amd64.whl - paddlepaddle_gpu-2.2.1.post110-cp39-cp39-win_amd64.whl + paddlepaddle_gpu-2.3.2.post110-cp36-cp36m-win_amd64.whl + paddlepaddle_gpu-2.3.2.post110-cp37-cp37m-win_amd64.whl + paddlepaddle_gpu-2.3.2.post110-cp38-cp38-win_amd64.whl + paddlepaddle_gpu-2.3.2.post110-cp39-cp39-win_amd64.whl + paddlepaddle_gpu-2.3.2.post110-cp310-cp310-win_amd64.whl win-cuda11.1-cudnn8.1-mkl-vs2017-avx - paddlepaddle_gpu-2.2.1.post111-cp36-cp36m-win_amd64.whl - paddlepaddle_gpu-2.2.1.post111-cp37-cp37m-win_amd64.whl - paddlepaddle_gpu-2.2.1.post111-cp38-cp38-win_amd64.whl - paddlepaddle_gpu-2.2.1.post111-cp39-cp39-win_amd64.whl + paddlepaddle_gpu-2.3.2.post111-cp36-cp36m-win_amd64.whl + paddlepaddle_gpu-2.3.2.post111-cp37-cp37m-win_amd64.whl + paddlepaddle_gpu-2.3.2.post111-cp38-cp38-win_amd64.whl + paddlepaddle_gpu-2.3.2.post111-cp39-cp39-win_amd64.whl + paddlepaddle_gpu-2.3.2.post111-cp310-cp310-win_amd64.whl win-cuda11.2-cudnn8.2-mkl-vs2017-avx - paddlepaddle_gpu-2.2.1.post112-cp36-cp36m-win_amd64.whl - paddlepaddle_gpu-2.2.1.post112-cp37-cp37m-win_amd64.whl - paddlepaddle_gpu-2.2.1.post112-cp38-cp38-win_amd64.whl - paddlepaddle_gpu-2.2.1.post112-cp39-cp39-win_amd64.whl + paddlepaddle_gpu-2.3.2.post112-cp36-cp36m-win_amd64.whl + paddlepaddle_gpu-2.3.2.post112-cp37-cp37m-win_amd64.whl + paddlepaddle_gpu-2.3.2.post112-cp38-cp38-win_amd64.whl + paddlepaddle_gpu-2.3.2.post112-cp39-cp39-win_amd64.whl + paddlepaddle_gpu-2.3.2.post112-cp310-cp310-win_amd64.whl + + + win-cuda11.6-cudnn8.4-mkl-vs2017-avx + paddlepaddle_gpu-2.3.2.post116-cp36-cp36m-win_amd64.whl + paddlepaddle_gpu-2.3.2.post116-cp37-cp37m-win_amd64.whl + paddlepaddle_gpu-2.3.2.post116-cp38-cp38-win_amd64.whl + paddlepaddle_gpu-2.3.2.post116-cp39-cp39-win_amd64.whl + paddlepaddle_gpu-2.3.2.post116-cp310-cp310-win_amd64.whl diff --git a/docs/install/Tables_en.md b/docs/install/Tables_en.md index e77772efa7e..baaf34ac758 100644 --- a/docs/install/Tables_en.md +++ b/docs/install/Tables_en.md @@ -28,9 +28,9 @@ - Clang (macOS Only) + Clang (MacOS Only) 9.0 and above - Usually use the clang version of macOS 10.11 and above + Usually use the clang version of MacOS 10.11 and above @@ -103,7 +103,7 @@ unrar - brew install rar (For macOS), apt-get install unrar (For Ubuntu) + brew install unrar (For MacOS), apt-get install unrar (For Ubuntu) @@ -200,7 +200,7 @@ PaddlePaddle can be compiled and run using any version after cuDNN v5.1, but try 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: -> `cmake .. -DWITH_GPU=ON -DWITH_TESTING=OFF -DCUDNN_ROOT=/opt/cudnnv5` +> `Cmake .. -DWITH_GPU=ON -DWITH_TESTING=OFF -DCUDNN_ROOT=/opt/cudnnv5` **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. @@ -220,11 +220,11 @@ PaddePaddle implements references to various BLAS/CUDA/cuDNN libraries by specif - paddlepaddle==[version code] such as paddlepaddle==2.2.1 + paddlepaddle==[version code] such as paddlepaddle==2.3.2 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.2.1 + paddlepaddle-gpu==[version code], such as paddlepaddle-gpu==2.3.2 The default installation supports the PaddlePaddle installation package corresponding to [version number] of CUDA 10.2 and cuDNN 7 @@ -234,7 +234,7 @@ PaddePaddle implements references to various BLAS/CUDA/cuDNN libraries by specif 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==2.2.1 will install the installation package of PaddlePaddle that supports CUDA 10.2 and cuDNN 7 by default under Windows environment. +Please note that: in the commands, paddlepaddle-gpu==2.3.2 will install the installation package of PaddlePaddle that supports CUDA 10.2 and cuDNN 7 by default under Windows environment. @@ -252,195 +252,257 @@ Please note that: in the commands, paddlepaddle-gpu==2.2.1 will i cp37-cp37m cp38-cp38 cp39-cp39 + cp310-cp310 cpu-mkl-avx - paddlepaddle-2.2.1-cp36-cp36m-linux_x86_64.whl - paddlepaddle-2.2.1-cp37-cp37m-linux_x86_64.whl - paddlepaddle-2.2.1-cp38-cp38-linux_x86_64.whl - paddlepaddle-2.2.1-cp39-cp39-linux_x86_64.whl + paddlepaddle-2.3.2-cp36-cp36m-linux_x86_64.whl + paddlepaddle-2.3.2-cp37-cp37m-linux_x86_64.whl + paddlepaddle-2.3.2-cp38-cp38-linux_x86_64.whl + paddlepaddle-2.3.2-cp39-cp39-linux_x86_64.whl + paddlepaddle-2.3.2-cp310-cp310-linux_x86_64.whl cpu-openblas-avx - - - paddlepaddle-2.2.1-cp38-cp38-linux_x86_64.whl + paddlepaddle-2.3.2-cp38-cp38-linux_x86_64.whl + - - cpu-mkl-noavx - - - paddlepaddle-2.2.1-cp38-cp38-linux_x86_64.whl + paddlepaddle-2.3.2-cp38-cp38-linux_x86_64.whl + - - cpu-openblas-noavx - - - paddlepaddle-2.2.1-cp38-cp38-linux_x86_64.whl + paddlepaddle-2.3.2-cp38-cp38-linux_x86_64.whl + - - cuda10.1-cudnn7-mkl-gcc5.4-avx - - paddlepaddle_gpu-2.2.1.post101-cp36-cp36m-linux_x86_64.whl - - paddlepaddle_gpu-2.2.1.post101-cp37-cp37m-linux_x86_64.whl - - paddlepaddle_gpu-2.2.1.post101-cp38-cp38-linux_x86_64.whl - - paddlepaddle_gpu-2.2.1.post101-cp39-cp39-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2.post101-cp36-cp36m-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2.post101-cp37-cp37m-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2.post101-cp38-cp38-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2.post101-cp39-cp39-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2.post101-cp310-cp310-linux_x86_64.whl cuda10.1-cudnn7-mkl-gcc5.4-noavx - - - - paddlepaddle_gpu-2.2.1.post101-cp38-cp38-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2.post101-cp38-cp38-linux_x86_64.whl + - - cuda10.2-cudnn7-mkl-gcc8.2-avx - - paddlepaddle_gpu-2.2.1-cp36-cp36m-linux_x86_64.whl - - paddlepaddle_gpu-2.2.1-cp37-cp37m-linux_x86_64.whl - - paddlepaddle_gpu-2.2.1-cp38-cp38-linux_x86_64.whl - - paddlepaddle_gpu-2.2.1-cp39-cp39-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2-cp36-cp36m-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2-cp37-cp37m-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2-cp38-cp38-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2-cp39-cp39-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2-cp310-cp310-linux_x86_64.whl cuda10.2-cudnn7-mkl-gcc8.2-noavx - - - - paddlepaddle_gpu-2.2.1-cp38-cp38-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2-cp38-cp38-linux_x86_64.whl + - - cuda11.0-cudnn8.0-mkl-gcc8.2-avx - - paddlepaddle_gpu-2.2.1.post110-cp36-cp36m-linux_x86_64.whl - - paddlepaddle_gpu-2.2.1.post110-cp37-cp37m-linux_x86_64.whl - - paddlepaddle_gpu-2.2.1.post110-cp38-cp38-linux_x86_64.whl - - paddlepaddle_gpu-2.2.1.post110-cp39-cp39-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2.post110-cp36-cp36m-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2.post110-cp37-cp37m-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2.post110-cp38-cp38-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2.post110-cp39-cp39-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2.post110-cp310-cp310-linux_x86_64.whl cuda11.1-cudnn8.1-mkl-gcc8.2-avx - - paddlepaddle_gpu-2.2.1.post111-cp36-cp36m-linux_x86_64.whl - - paddlepaddle_gpu-2.2.1.post111-cp37-cp37m-linux_x86_64.whl - - paddlepaddle_gpu-2.2.1.post111-cp38-cp38-linux_x86_64.whl - - paddlepaddle_gpu-2.2.1.post111-cp39-cp39-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2.post111-cp36-cp36m-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2.post111-cp37-cp37m-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2.post111-cp38-cp38-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2.post111-cp39-cp39-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2.post111-cp310-cp310-linux_x86_64.whl cuda11.2-cudnn8.1-mkl-gcc8.2-avx - - paddlepaddle_gpu-2.2.1.post112-cp36-cp36m-linux_x86_64.whl - - paddlepaddle_gpu-2.2.1.post112-cp37-cp37m-linux_x86_64.whl - - paddlepaddle_gpu-2.2.1.post112-cp38-cp38-linux_x86_64.whl - - paddlepaddle_gpu-2.2.1.post112-cp39-cp39-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2.post112-cp36-cp36m-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2.post112-cp37-cp37m-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2.post112-cp38-cp38-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2.post112-cp39-cp39-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2.post112-cp310-cp310-linux_x86_64.whl + + + cuda11.6-cudnn8.4-mkl-gcc8.2-avx + + paddlepaddle_gpu-2.3.2.post116-cp36-cp36m-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2.post116-cp37-cp37m-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2.post116-cp38-cp38-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2.post116-cp39-cp39-linux_x86_64.whl + + paddlepaddle_gpu-2.3.2.post116-cp310-cp310-linux_x86_64.whl macos-cpu-openblas - - paddlepaddle-2.2.1-cp36-cp36m-macosx_10_6_intel.whl - - paddlepaddle-2.2.1-cp37-cp37m-macosx_10_6_intel.whl - - paddlepaddle-2.2.1-cp38-cp38-macosx_10_14_x86_64.whl - - paddlepaddle-2.2.1-cp39-cp39-macosx_10_14_x86_64.whl + + paddlepaddle-2.3.2-cp36-cp36m-macosx_10_6_intel.whl + + paddlepaddle-2.3.2-cp37-cp37m-macosx_10_6_intel.whl + + paddlepaddle-2.3.2-cp38-cp38-macosx_10_14_x86_64.whl + + paddlepaddle-2.3.2-cp39-cp39-macosx_10_14_x86_64.whl + + paddlepaddle-2.3.2-cp310-cp310-macosx_10_14_universal2.whl + + + macos-cpu-openblas-m1 + - + - + + paddlepaddle-2.3.2-cp38-cp38-macosx_11_0_arm64.whl + + paddlepaddle-2.3.2-cp39-cp39-macosx_11_0_arm64.whl + + paddlepaddle-2.3.2-cp310-cp310-macosx_11_0_arm64.whl win-cpu-mkl-avx - paddlepaddle-2.2.1-cp36-cp36m-win_amd64.whl - paddlepaddle-2.2.1-cp37-cp37m-win_amd64.whl - paddlepaddle-2.2.1-cp38-cp38-win_amd64.whl - paddlepaddle-2.2.1-cp39-cp39-win_amd64.whl + paddlepaddle-2.3.2-cp36-cp36m-win_amd64.whl + paddlepaddle-2.3.2-cp37-cp37m-win_amd64.whl + paddlepaddle-2.3.2-cp38-cp38-win_amd64.whl + paddlepaddle-2.3.2-cp39-cp39-win_amd64.whl + paddlepaddle-2.3.2-cp310-cp310-win_amd64.whl win-cpu-mkl-noavx - - - paddlepaddle-2.2.1-cp38-cp38-win_amd64.whl + paddlepaddle-2.3.2-cp38-cp38-win_amd64.whl + - - win-cpu-openblas-avx - - - paddlepaddle-2.2.1-cp38-cp38-win_amd64.whl + paddlepaddle-2.3.2-cp38-cp38-win_amd64.whl + - - win-cpu-openblas-noavx - - - paddlepaddle-2.2.1-cp38-cp38-win_amd64.whl + paddlepaddle-2.3.2-cp38-cp38-win_amd64.whl + - - win-cuda10.1-cudnn7-mkl-vs2017-avx - paddlepaddle_gpu-2.2.1.post101-cp36-cp36m-win_amd64.whl - paddlepaddle_gpu-2.2.1.post101-cp37-cp37m-win_amd64.whl - paddlepaddle_gpu-2.2.1.post101-cp38-cp38-win_amd64.whl - paddlepaddle_gpu-2.2.1.post101-cp39-cp39-win_amd64.whl + paddlepaddle_gpu-2.3.2.post101-cp36-cp36m-win_amd64.whl + paddlepaddle_gpu-2.3.2.post101-cp37-cp37m-win_amd64.whl + paddlepaddle_gpu-2.3.2.post101-cp38-cp38-win_amd64.whl + paddlepaddle_gpu-2.3.2.post101-cp39-cp39-win_amd64.whl + paddlepaddle_gpu-2.3.2.post101-cp310-cp310-win_amd64.whl win-cuda10.1-cudnn7-mkl-vs2017-noavx - - - paddlepaddle_gpu-2.2.1.post101-cp38-cp38-win_amd64.whl + paddlepaddle_gpu-2.3.2.post101-cp38-cp38-win_amd64.whl + - - win-cuda10.2-cudnn7-mkl-vs2017-avx - paddlepaddle_gpu-2.2.1.post102-cp36-cp36m-win_amd64.whl - paddlepaddle_gpu-2.2.1.post102-cp37-cp37m-win_amd64.whl - paddlepaddle_gpu-2.2.1.post102-cp38-cp38-win_amd64.whl - paddlepaddle_gpu-2.2.1.post102-cp39-cp39-win_amd64.whl + paddlepaddle_gpu-2.3.2-cp36-cp36m-win_amd64.whl + paddlepaddle_gpu-2.3.2-cp37-cp37m-win_amd64.whl + paddlepaddle_gpu-2.3.2-cp38-cp38-win_amd64.whl + paddlepaddle_gpu-2.3.2-cp39-cp39-win_amd64.whl + paddlepaddle_gpu-2.3.2-cp310-cp310-win_amd64.whl win-cuda10.2-cudnn7-mkl-vs2017-noavx - - paddlepaddle_gpu-2.2.1.post102-cp37-cp37m-win_amd64.whl - paddlepaddle_gpu-2.2.1.post102-cp38-cp38-win_amd64.whl + paddlepaddle_gpu-2.3.2-cp37-cp37m-win_amd64.whl + paddlepaddle_gpu-2.3.2-cp38-cp38-win_amd64.whl + - - win-cuda11.0-cudnn8.0-mkl-vs2017-avx - paddlepaddle_gpu-2.2.1.post110-cp36-cp36m-win_amd64.whl - paddlepaddle_gpu-2.2.1.post110-cp37-cp37m-win_amd64.whl - paddlepaddle_gpu-2.2.1.post110-cp38-cp38-win_amd64.whl - paddlepaddle_gpu-2.2.1.post110-cp39-cp39-win_amd64.whl + paddlepaddle_gpu-2.3.2.post110-cp36-cp36m-win_amd64.whl + paddlepaddle_gpu-2.3.2.post110-cp37-cp37m-win_amd64.whl + paddlepaddle_gpu-2.3.2.post110-cp38-cp38-win_amd64.whl + paddlepaddle_gpu-2.3.2.post110-cp39-cp39-win_amd64.whl + paddlepaddle_gpu-2.3.2.post110-cp310-cp310-win_amd64.whl win-cuda11.1-cudnn8.1-mkl-vs2017-avx - paddlepaddle_gpu-2.2.1.post111-cp36-cp36m-win_amd64.whl - paddlepaddle_gpu-2.2.1.post111-cp37-cp37m-win_amd64.whl - paddlepaddle_gpu-2.2.1.post111-cp38-cp38-win_amd64.whl - paddlepaddle_gpu-2.2.1.post111-cp39-cp39-win_amd64.whl + paddlepaddle_gpu-2.3.2.post111-cp36-cp36m-win_amd64.whl + paddlepaddle_gpu-2.3.2.post111-cp37-cp37m-win_amd64.whl + paddlepaddle_gpu-2.3.2.post111-cp38-cp38-win_amd64.whl + paddlepaddle_gpu-2.3.2.post111-cp39-cp39-win_amd64.whl + paddlepaddle_gpu-2.3.2.post111-cp310-cp310-win_amd64.whl win-cuda11.2-cudnn8.2-mkl-vs2017-avx - paddlepaddle_gpu-2.2.1.post112-cp36-cp36m-win_amd64.whl - paddlepaddle_gpu-2.2.1.post112-cp37-cp37m-win_amd64.whl - paddlepaddle_gpu-2.2.1.post112-cp38-cp38-win_amd64.whl - paddlepaddle_gpu-2.2.1.post112-cp39-cp39-win_amd64.whl + paddlepaddle_gpu-2.3.2.post112-cp36-cp36m-win_amd64.whl + paddlepaddle_gpu-2.3.2.post112-cp37-cp37m-win_amd64.whl + paddlepaddle_gpu-2.3.2.post112-cp38-cp38-win_amd64.whl + paddlepaddle_gpu-2.3.2.post112-cp39-cp39-win_amd64.whl + paddlepaddle_gpu-2.3.2.post112-cp310-cp310-win_amd64.whl + + + win-cuda11.6-cudnn8.4-mkl-vs2017-avx + paddlepaddle_gpu-2.3.2.post116-cp36-cp36m-win_amd64.whl + paddlepaddle_gpu-2.3.2.post116-cp37-cp37m-win_amd64.whl + paddlepaddle_gpu-2.3.2.post116-cp38-cp38-win_amd64.whl + paddlepaddle_gpu-2.3.2.post116-cp39-cp39-win_amd64.whl + paddlepaddle_gpu-2.3.2.post116-cp310-cp310-win_amd64.whl diff --git a/docs/install/compile/fromsource.rst b/docs/install/compile/fromsource.rst index 21ff48887a3..cff034ca124 100644 --- a/docs/install/compile/fromsource.rst +++ b/docs/install/compile/fromsource.rst @@ -2,7 +2,7 @@ **从源码编译** =========================== -.. toctree:: +.. toctree:: :maxdepth: 1 linux-compile.md @@ -11,4 +11,3 @@ arm-compile.md sw-compile.md zhaoxin-compile.md - mips-compile.md diff --git a/docs/install/compile/fromsource_en.rst b/docs/install/compile/fromsource_en.rst index 3e1592dc791..7f551994766 100644 --- a/docs/install/compile/fromsource_en.rst +++ b/docs/install/compile/fromsource_en.rst @@ -4,7 +4,7 @@ You can also choose to compile and install PaddlePaddle in the way of source code compilation. However, due to the diversity of the native environment, complicated problems may occur when compiling the source code, which may cause your installation to fail. In order to ensure your smooth installation, it is recommended that you prefer the normal installation method. -.. toctree:: +.. toctree:: linux-compile_en.md diff --git a/docs/install/compile/linux-compile.md b/docs/install/compile/linux-compile.md index 9d7372c36f3..b3b2190b319 100644 --- a/docs/install/compile/linux-compile.md +++ b/docs/install/compile/linux-compile.md @@ -4,11 +4,11 @@ * **Linux 版本 (64 bit)** * **CentOS 6 (不推荐,不提供编译出现问题时的官方支持)** - * **CentOS 7 (GPU 版本支持 CUDA 10.1/10.2/11.0/11.1/11.2)** + * **CentOS 7 (GPU 版本支持 CUDA 10.1/10.2/11.1/11.2/11.6)** * **Ubuntu 14.04 (不推荐,不提供编译出现问题时的官方支持)** - * **Ubuntu 16.04 (GPU 版本支持 CUDA 10.1/10.2/11.0/11.1/11.2)** - * **Ubuntu 18.04 (GPU 版本支持 CUDA 10.1/10.2/11.0/11.1/11.2)** -* **Python 版本 3.6/3.7/3.8/3.9 (64 bit)** + * **Ubuntu 16.04 (GPU 版本支持 CUDA 10.1/10.2/11.1/11.2/11.6)** + * **Ubuntu 18.04 (GPU 版本支持 CUDA 10.1/10.2/11.1/11.2/11.6)** +* **Python 版本 3.6/3.7/3.8/3.9/3.10 (64 bit)** ## 选择 CPU/GPU @@ -17,9 +17,9 @@ * 如果您的计算机有 NVIDIA® GPU,请确保满足以下条件以编译 GPU 版 PaddlePaddle * **CUDA 工具包 10.1/10.2 配合 cuDNN 7 (cuDNN 版本>=7.6.5, 如需多卡支持,需配合 NCCL2.7 及更高)** - * **CUDA 工具包 11.0 配合 cuDNN v8.0.4(如需多卡支持,需配合 NCCL2.7 及更高)** * **CUDA 工具包 11.1 配合 cuDNN v8.1.1(如需多卡支持,需配合 NCCL2.7 及更高)** * **CUDA 工具包 11.2 配合 cuDNN v8.1.1(如需多卡支持,需配合 NCCL2.7 及更高)** + * **CUDA 工具包 11.6 配合 cuDNN v8.4.0(如需多卡支持,需配合 NCCL2.7 及更高)** * **GPU 运算能力超过 3.5 的硬件设备** 您可参考 NVIDIA 官方文档了解 CUDA 和 CUDNN 的安装流程和配置方法,请见[CUDA](https://docs.nvidia.com/cuda/cuda-installation-guide-linux/),[cuDNN](https://docs.nvidia.com/deeplearning/sdk/cudnn-install/) @@ -129,13 +129,19 @@ cd Paddle cd /paddle ``` -#### 6. 切换到 develop 版本进行编译: +#### 6. 切换到较稳定版本下进行编译: ``` -git checkout develop +git checkout [分支名] ``` -注意:python3.6、python3.7 版本从 release/1.2 分支开始支持, python3.8 版本从 release/1.8 分支开始支持, python3.9 版本从 release/2.1 分支开始支持 +例如: + +``` +git checkout release/2.3 +``` + +注意:python3.6、python3.7 版本从 release/1.2 分支开始支持, python3.8 版本从 release/1.8 分支开始支持, python3.9 版本从 release/2.1 分支开始支持, python3.10 版本从 release/2.3 分支开始支持 #### 7. 创建并进入/paddle/build 路径下: @@ -151,7 +157,7 @@ mkdir -p /paddle/build && cd /paddle/build pip3.7 install protobuf ``` -注意:以上用 Python3.7 命令来举例,如您的 Python 版本为 3.6/3.8/3.9,请将上述命令中的 pip3.7 改成 pip3.6/pip3.8/pip3.9 +注意:以上用 Python3.7 命令来举例,如您的 Python 版本为 3.6/3.8/3.9/3.10,请将上述命令中的 pip3.7 改成 pip3.6/pip3.8/pip3.9/pip3.10 - 安装 patchelf,PatchELF 是一个小而实用的程序,用于修改 ELF 可执行文件的动态链接器和 RPATH。 @@ -203,7 +209,7 @@ pip3.7 install -U [whl 包的名字] ``` 注意: -以上用 Python3.7 命令来举例,如您的 Python 版本为 3.6/3.8/3.9,请将上述命令中的 pip3.7 改成 pip3.6/pip3.8/pip3.9。 +以上用 Python3.7 命令来举例,如您的 Python 版本为 3.6/3.8/3.9/3.10,请将上述命令中的 pip3.7 改成 pip3.6/pip3.8/pip3.9/pip3.10。 #### 恭喜,至此您已完成 PaddlePaddle 的编译安装。您只需要进入 Docker 容器后运行 PaddlePaddle,即可开始使用。更多 Docker 使用请参见[Docker 官方文档](https://docs.docker.com) @@ -219,7 +225,7 @@ uname -m && cat /etc/*release #### 2. 更新系统源 -* CentOS 环境 +* Centos 环境 更新`yum`的源: @@ -246,7 +252,7 @@ uname -m && cat /etc/*release * 如果您需要使用 GPU 多卡,请确保您已经正确安装 nccl2,或者按照以下指令安装 nccl2(这里提供的是 CUDA10.2,cuDNN7 下 nccl2 的安装指令,更多版本的安装信息请参考 NVIDIA[官方网站](https://developer.nvidia.com/nccl)): - * **CentOS 系统可以参考以下命令** + * **Centos 系统可以参考以下命令** ``` 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 @@ -280,7 +286,7 @@ uname -m && cat /etc/*release #### 4. 安装必要的工具 -* CentOS 环境 +* Centos 环境 `bzip2`以及`make`: @@ -378,13 +384,13 @@ uname -m && cat /etc/*release (请参照 Python 官方流程安装, 并保证拥有 20.2.2 及以上的 pip3 版本,请注意,python3.6 及以上版本环境下,pip3 并不一定对应 python 版本,如 python3.7 下默认只有 pip3.7) -* c.(Only For Python3)设置 Python3 相关的环境变量,这里以 python3.7 版本示例,请替换成您使用的版本(3.6、3.8、3.9): +* c.(Only For Python3)设置 Python3 相关的环境变量,这里以 python3.7 版本示例,请替换成您使用的版本(3.6、3.8、3.9、3.10): 1. 首先使用 ``` find `dirname $(dirname $(which python3))` -name "libpython3.so" ``` - 找到 Python lib 的路径,如果是 3.6、3.7、3.8、3.9,请将`python3`改成`python3.6`、`python3.7`、`python3.8`、`python3.9`,然后将下面[python-lib-path]替换为找到文件路径 + 找到 Python lib 的路径,如果是 3.6、3.7、3.8、3.9、3.10,请将`python3`改成`python3.6`、`python3.7`、`python3.8`、`python3.9`、`python3.10`,然后将下面[python-lib-path]替换为找到文件路径 2. 设置 PYTHON_LIBRARIES: ``` @@ -408,7 +414,7 @@ uname -m && cat /etc/*release ``` (这里将[python-lib-path]的最后两级目录替换为/bin/) -* d. 安装虚环境`virtualenv`以及`virtualenvwrapper`并创建名为`paddle-venv`的虚环境:(请注意对应 python 版本的 pip3 的命令,如 pip3.6、pip3.7、pip3.8、pip3.9) +* d. 安装虚环境`virtualenv`以及`virtualenvwrapper`并创建名为`paddle-venv`的虚环境:(请注意对应 python 版本的 pip3 的命令,如 pip3.6、pip3.7、pip3.8、pip3.9、pip3.10) 1. 安装`virtualenv` ``` @@ -472,10 +478,16 @@ git clone https://github.com/PaddlePaddle/Paddle.git cd Paddle ``` -#### 9. 切换到 develop 分支进行编译: +#### 9. 切换到较稳定 release 分支下进行编译: + +``` +git checkout [分支名] +``` + +例如: ``` -git checkout develop +git checkout release/2.3 ``` #### 10. 并且请创建并进入一个叫 build 的目录下: @@ -500,11 +512,11 @@ mkdir build && cd build > 请注意 PY_VERSION 参数更换为您需要的 python 版本 -* 对于需要编译**GPU 版本 PaddlePaddle**的用户:(**仅支持 CentOS7(CUDA11.2/CUDA11.0/CUDA10.2/CUDA10.1)**) +* 对于需要编译**GPU 版本 PaddlePaddle**的用户:(**仅支持 CentOS7(CUDA11.6/CUDA11.2/CUDA11.1/CUDA10.2/CUDA10.1)**) 1. 请确保您已经正确安装 nccl2,或者按照以下指令安装 nccl2(这里提供的是 CUDA10.2,cuDNN7 下 nccl2 的安装指令,更多版本的安装信息请参考 NVIDIA[官方网站](https://developer.nvidia.com/nccl)): - * **CentOS 系统可以参考以下命令** + * **Centos 系统可以参考以下命令** ``` 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 @@ -538,7 +550,7 @@ mkdir build && cd build cmake .. -DPYTHON_EXECUTABLE:FILEPATH=[您可执行的 Python3 的路径] -DPYTHON_INCLUDE_DIR:PATH=[之前的 PYTHON_INCLUDE_DIRS] -DPYTHON_LIBRARY:FILEPATH=[之前的 PYTHON_LIBRARY] -DWITH_GPU=ON ``` -注意:以上涉及 Python3 的命令,用 Python3.7 来举例,如您的 Python 版本为 3.6/3.8/3.9,请将上述命令中的 Python3.7 改成 Python3.6/Python3.8/Python3.9 +注意:以上涉及 Python3 的命令,用 Python3.7 来举例,如您的 Python 版本为 3.6/3.8/3.9/3.10,请将上述命令中的 Python3.7 改成 Python3.6/Python3.8/Python3.9/Python3.10 diff --git a/docs/install/compile/linux-compile_en.md b/docs/install/compile/linux-compile_en.md index 1848d250d7f..c28c0c7402b 100644 --- a/docs/install/compile/linux-compile_en.md +++ b/docs/install/compile/linux-compile_en.md @@ -4,11 +4,11 @@ * **Linux version (64 bit)** * **CentOS 6 (not recommended, no official support for compilation problems)** - * **CentOS 7 (GPU version supports CUDA 10.1/10.2/11.0/11.1/11.2** + * **CentOS 7 (GPU version supports CUDA 10.1/10.2/11.1/11.2/11.6** * **Ubuntu 14.04 (not recommended, no official support for compilation problems)** - * **Ubuntu 16.04 (GPU version supports CUDA 10.1/10.2/11.0/11.1/11.2)** - * **Ubuntu 18.04 (GPU version supports CUDA 10.1/10.2/11.0/11.1/11.2)** -* **Python version 3.6/3.7/3.8/3.9 (64 bit)** + * **Ubuntu 16.04 (GPU version supports CUDA 10.1/10.2/11.1/11.2/11.6)** + * **Ubuntu 18.04 (GPU version supports CUDA 10.1/10.2/11.1/11.2/11.6)** +* **Python version 3.6/3.7/3.8/3.9/3.10 (64 bit)** ## Choose CPU/GPU @@ -17,9 +17,9 @@ * If your computer has NVIDIA® GPU, and the following conditions are met,GPU version of PaddlePaddle is recommended. * **CUDA toolkit 10.1/10.2 with cuDNN 7 (cuDNN version>=7.6.5, for multi card support, NCCL2.7 or higher)** - * **CUDA toolkit 11.0 with cuDNN v8.0.4(for multi card support, NCCL2.7 or higher)** * **CUDA toolkit 11.1 with cuDNN v8.1.1(for multi card support, NCCL2.7 or higher)** * **CUDA toolkit 11.2 with cuDNN v8.1.1(for multi card support, NCCL2.7 or higher)** + * **CUDA toolkit 11.6 with cuDNN v8.4.0(for multi card support, NCCL2.7 or higher)** * **Hardware devices with GPU computing power over 3.5** 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/) @@ -135,13 +135,19 @@ Please make sure to allocate at least 4g of memory for docker, otherwise the com cd /paddle ``` -#### 6. Switch to develop version to compile: +#### 6. Switch to a more stable version to compile: ``` -git checkout develop +git checkout [name of the branch] ``` -Note: python3.6、python3.7 version started supporting from release/1.2 branch, python3.8 version started supporting from release/1.8 branch, python3.9 version started supporting from release/2.1 branch +For example: + +``` +git checkout release/2.3 +``` + +Note: python3.6、python3.7 version started supporting from release/1.2 branch, python3.8 version started supporting from release/1.8 branch, python3.9 version started supporting from release/2.1 branch, python3.10 version started supporting from release/2.3 branch #### 7. Create and enter the /paddle/build path: @@ -157,7 +163,7 @@ mkdir -p /paddle/build && cd /paddle/build pip3.7 install protobuf ``` -Note: We used Python3.7 command as an example above, if the version of your Python is 3.6/3.8/3.9, please change pip3.7 in the commands to pip3.6/pip3.8/pip3.9 +Note: We used Python3.7 command as an example above, if the version of your Python is 3.6/3.8/3.9/3.10, please change pip3.7 in the commands to pip3.6/pip3.8/pip3.9/pip3.10 - Installing patchelf, PatchELF is a small and useful program for modifying the dynamic linker and RPATH of ELF executables. @@ -208,7 +214,7 @@ pip3.7 install -U [whl package name] ``` Note: -We used Python3.7 command as an example above, if the version of your Python is 3.6/3.8/3.9, please change pip3.7 in the commands to pip3.6/pip3.8/pip3.9. +We used Python3.7 command as an example above, if the version of your Python is 3.6/3.8/3.9/3.10, please change pip3.7 in the commands to pip3.6/pip3.8/pip3.9/pip3.10. #### 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/). @@ -223,7 +229,7 @@ uname -m && cat /etc/*release #### 2. Update the system source -* CentOS system +* Centos system Update the source of `yum`: `yum update`, and add the necessary yum source: ``` @@ -242,7 +248,7 @@ uname -m && cat /etc/*release * 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 CUDA10.2 and cuDNN7. For more version of installation information, please refer to NVIDIA[official website](https://developer.nvidia.com/nccl)): - * **CentOS system can refer to the following commands** + * **Centos system can refer to the following commands** ``` 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 @@ -271,7 +277,7 @@ uname -m && cat /etc/*release #### 4. Install the necessary tools -* CentOS system +* Centos system `bzip2` and `make`: ``` @@ -361,13 +367,13 @@ uname -m && cat /etc/*release (Please refer to the official Python installation process, and ensure that the pip3 version 20.2.2 and above, please note that in python3.6 and above, pip3 does not necessarily correspond to the python version, such as python3.7 default only Pip3.7) -* c. (Only For Python3) set Python3 related environment variables, here is python3.7 version example, please replace with the version you use (3.6, 3.8, 3.9): +* c. (Only For Python3) set Python3 related environment variables, here is python3.7 version example, please replace with the version you use (3.6, 3.8, 3.9, 3.10): 1. First find the path to the Python lib using ``` find `dirname $(dirname $(which python3))` -name "libpython3.so" ``` - If it is 3.6,3.7,3.8,3.9, change `python3` to `python3.6`,`python3.7`, `python3.8`, `python3.9`, then replace [python-lib-path] in the following steps with the file path found. + If it is 3.6,3.7,3.8,3.9,3.10, change `python3` to `python3.6`,`python3.7`, `python3.8`, `python3.9`, `python3.10`, then replace [python-lib-path] in the following steps with the file path found. 2. Set PYTHON_LIBRARIES: ``` @@ -391,7 +397,7 @@ uname -m && cat /etc/*release ``` (here replace the last two levels content of [python-lib-path] with /bin/) -* d. Install the virtual environment `virtualenv` and `virtualenvwrapper` and create a virtual environment called `paddle-venv`: (please note the pip3 commands corresponding to the python version, such as pip3.6, pip3.7, pip3.8, pip3.9) +* d. Install the virtual environment `virtualenv` and `virtualenvwrapper` and create a virtual environment called `paddle-venv`: (please note the pip3 commands corresponding to the python version, such as pip3.6, pip3.7, pip3.8, pip3.9, pip3.10) 1. Install `virtualenv`: ``` @@ -459,10 +465,16 @@ git clone https://github.com/PaddlePaddle/Paddle.git cd Paddle ``` -#### 9. Switch to develop branch for compilation (support for Python 3.6 and 3.7 is added from the 1.2 branch, support for Python 3.8 is added from the 1.8 branch, support for Python 3.9 is added from the 2.1 branch,): +#### 9. Switch to a more stable release branch for compilation (support for Python 3.6 and 3.7 is added from the 1.2 branch, support for Python 3.8 is added from the 1.8 branch, support for Python 3.9 is added from the 2.1 branch, support for Python 3.10 is added from the 2.3 branch): + +``` +git checkout [name of target branch] +``` + +For example: ``` -git checkout develop +git checkout release/2.3 ``` #### 10. And please create and enter a directory called build: @@ -511,7 +523,7 @@ mkdir build && cd build ``` -Note: For the command involving Python 3, we use Python 3.7 as an example above, if the version of your Python is 3.6/3.8/3.9, please change Python3.7 in the commands to Python3.6/Python3.8/Python3.9 +Note: For the command involving Python 3, we use Python 3.7 as an example above, if the version of your Python is 3.6/3.8/3.9/3.10, please change Python3.7 in the commands to Python3.6/Python3.8/Python3.9/Python3.10 diff --git a/docs/install/compile/macos-compile.md b/docs/install/compile/macos-compile.md index 8995dd50308..42c19dfcb71 100644 --- a/docs/install/compile/macos-compile.md +++ b/docs/install/compile/macos-compile.md @@ -1,16 +1,16 @@ -# **macOS 下从源码编译** +# **MacOS 下从源码编译** ## 环境准备 -* **macOS 版本 10.x/11.x (64 bit) (不支持 GPU 版本)** -* **Python 版本 3.6/3.7/3.8/3.9 (64 bit)** +* **MacOS 版本 10.x/11.x (64 bit) (不支持 GPU 版本)** +* **Python 版本 3.6/3.7/3.8/3.9/3.10 (64 bit)** ## 选择 CPU/GPU -* 目前仅支持在 macOS 环境下编译安装 CPU 版本的 PaddlePaddle +* 目前仅支持在 MacOS 环境下编译安装 CPU 版本的 PaddlePaddle ## 安装步骤 -在 macOS 系统下有 2 种编译方式,推荐使用 Docker 编译。 +在 MacOS 系统下有 2 种编译方式,推荐使用 Docker 编译。 Docker 环境中已预装好编译 Paddle 需要的各种依赖,相较本机编译环境更简单。 * [Docker 源码编译](#compile_from_docker) @@ -75,6 +75,7 @@ docker run --name paddle-test -v $PWD:/paddle --network=host -it registry.baidub - `registry.baidubce.com/paddlepaddle/paddle:latest-dev`:使用名为`registry.baidubce.com/paddlepaddle/paddle:latest-dev`的镜像创建 Docker 容器,/bin/bash 进入容器后启动/bin/bash 命令 + 注意: 请确保至少为 docker 分配 4g 以上的内存,否则编译过程可能因内存不足导致失败。您可以在 docker 用户界面的“Preferences-Resources”中设置容器的内存分配上限。 @@ -84,13 +85,19 @@ docker run --name paddle-test -v $PWD:/paddle --network=host -it registry.baidub cd /paddle ``` -#### 7. 切换到 develop 版本进行编译: +#### 7. 切换到较稳定版本下进行编译: + +``` +git checkout [分支名] +``` + +例如: ``` -git checkout develop +git checkout release/2.3 ``` -注意:python3.6、python3.7 版本从 release/1.2 分支开始支持, python3.8 版本从 release/1.8 分支开始支持, python3.9 版本从 release/2.1 分支开始支持 +注意:python3.6、python3.7 版本从 release/1.2 分支开始支持, python3.8 版本从 release/1.8 分支开始支持, python3.9 版本从 release/2.1 分支开始支持, python3.10 版本从 release/2.3 分支开始支持 #### 8. 创建并进入/paddle/build 路径下: @@ -106,7 +113,7 @@ mkdir -p /paddle/build && cd /paddle/build pip3.7 install protobuf==3.1.0 ``` -注意:以上用 Python3.7 命令来举例,如您的 Python 版本为 3.6/3.8/3.9,请将上述命令中的 pip3.7 改成 pip3.6/pip3.8/pip3.9 +注意:以上用 Python3.7 命令来举例,如您的 Python 版本为 3.6/3.8/3.9/3.10,请将上述命令中的 pip3.7 改成 pip3.6/pip3.8/pip3.9/pip3.10 - 安装 patchelf,PatchELF 是一个小而实用的程序,用于修改 ELF 可执行文件的动态链接器和 RPATH。 @@ -116,7 +123,7 @@ apt install patchelf #### 10. 执行 cmake: -* 对于需要编译**CPU 版本 PaddlePaddle**的用户(我们目前不支持 macOS 下 GPU 版本 PaddlePaddle 的编译): +* 对于需要编译**CPU 版本 PaddlePaddle**的用户(我们目前不支持 MacOS 下 GPU 版本 PaddlePaddle 的编译): ``` cmake .. -DPY_VERSION=3.7 -DWITH_GPU=OFF @@ -148,7 +155,7 @@ pip3.7 install -U [whl 包的名字] ``` 注意: -以上用 Python3.7 命令来举例,如您的 Python 版本为 3.6/3.8/3.9,请将上述命令中的 pip3.7 改成 pip3.6/pip3.8/pip3.9。 +以上用 Python3.7 命令来举例,如您的 Python 版本为 3.6/3.8/3.9/3.10,请将上述命令中的 pip3.7 改成 pip3.6/pip3.8/pip3.9/pip3.10。 #### 恭喜,至此您已完成 PaddlePaddle 的编译安装。您只需要进入 Docker 容器后运行 PaddlePaddle,即可开始使用。更多 Docker 使用请参见[Docker 官方文档](https://docs.docker.com) @@ -167,7 +174,7 @@ uname -m #### 2. 安装 Python 以及 pip: -> **请不要使用 macOS 中自带 Python**,我们强烈建议您使用[Homebrew](https://brew.sh)安装 python(对于**Python3**请使用 python[官方下载](https://www.python.org/downloads/mac-osx/)python3.6.x、python3.7.x、python3.8、python3.9), pip 以及其他的依赖,这将会使您高效编译。 +> **请不要使用 MacOS 中自带 Python**,我们强烈建议您使用[Homebrew](https://brew.sh)安装 python(对于**Python3**请使用 python[官方下载](https://www.python.org/downloads/mac-osx/)python3.6.x、python3.7.x、python3.8、python3.9、python3.10), pip 以及其他的依赖,这将会使您高效编译。 使用 Python 官网安装 @@ -209,11 +216,11 @@ uname -m ``` (这里[python-ld-path]为[python-bin-path]的上一级目录) -- g. (可选)如果您是在 macOS 10.14 上编译 PaddlePaddle,请保证您已经安装了[对应版本](http://developer.apple.com/download)的 Xcode。 +- g. (可选)如果您是在 MacOS 10.14 上编译 PaddlePaddle,请保证您已经安装了[对应版本](http://developer.apple.com/download)的 Xcode。 #### 4. **执行编译前**请您确认您的环境中安装有[编译依赖表](/documentation/docs/zh/install/Tables.html#third_party)中提到的相关依赖,否则我们强烈推荐使用`Homebrew`安装相关依赖。 -> macOS 下如果您未自行修改或安装过“编译依赖表”中提到的依赖,则仅需要使用`pip`安装`numpy,protobuf,wheel`,使用`Homebrew`安装`wget,swig, unrar`,另外安装`cmake`即可 +> MacOS 下如果您未自行修改或安装过“编译依赖表”中提到的依赖,则仅需要使用`pip`安装`numpy,protobuf,wheel`,使用`homebrew`安装`wget,swig, unrar`,另外安装`cmake`即可 - a. 这里特别说明一下**CMake**的安装: @@ -237,13 +244,19 @@ git clone https://github.com/PaddlePaddle/Paddle.git cd Paddle ``` -#### 6. 切换到 develop 分支进行编译: +#### 6. 切换到较稳定 release 分支下进行编译: ``` -git checkout develop +git checkout [分支名] ``` -注意:python3.6、python3.7 版本从 release/1.2 分支开始支持, python3.8 版本从 release/1.8 分支开始支持, python3.9 版本从 release/2.1 分支开始支持 +例如: + +``` +git checkout release/2.3 +``` + +注意:python3.6、python3.7 版本从 release/1.2 分支开始支持, python3.8 版本从 release/1.8 分支开始支持, python3.9 版本从 release/2.1 分支开始支持, python3.10 版本从 release/2.3 分支开始支持 #### 7. 并且请创建并进入一个叫 build 的目录下: @@ -255,20 +268,37 @@ mkdir build && cd build >具体编译选项含义请参见[编译选项表](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/install/Tables.html#Compile) -* 对于需要编译**CPU 版本 PaddlePaddle**的用户: +* 若您的机器为 Mac M1 机器,需要编译**Arm 架构、CPU 版本 PaddlePaddle**: + + ``` + cmake .. -DPY_VERSION=3.8 -DPYTHON_INCLUDE_DIR=${PYTHON_INCLUDE_DIRS} \ + -DPYTHON_LIBRARY=${PYTHON_LIBRARY} -DWITH_GPU=OFF \ + -DWITH_AVX=OFF -DWITH_ARM=ON + ``` + +* 若您的机器不是 Mac M1 机器,需要编译**x86_64 架构、CPU 版本 PaddlePaddle**: ``` - cmake .. -DPY_VERSION=3.7 -DPYTHON_INCLUDE_DIR=${PYTHON_INCLUDE_DIRS} \ + cmake .. -DPY_VERSION=3.8 -DPYTHON_INCLUDE_DIR=${PYTHON_INCLUDE_DIRS} \ -DPYTHON_LIBRARY=${PYTHON_LIBRARY} -DWITH_GPU=OFF ``` ->`-DPY_VERSION=3.7`请修改为安装环境的 Python 版本 +- `-DPY_VERSION=3.8`请修改为安装环境的 Python 版本 +- 若编译 arm 架构的 paddlepaddle,需要`cmake`版本为 3.19.2 以上 #### 9. 使用以下命令来编译: -``` -make -j4 -``` +* 若您的机器为 Mac M1 机器,需要编译**Arm 架构、CPU 版本 PaddlePaddle**: + + ``` + make TARGET=ARMV8 -j4 + ``` + +* 若您的机器不是 Mac M1 机器,需要编译**x86_64 架构、CPU 版本 PaddlePaddle**: + + ``` + make -j4 + ``` #### 10. 编译成功后进入`/paddle/build/python/dist`目录下找到生成的`.whl`包: ``` diff --git a/docs/install/compile/macos-compile_en.md b/docs/install/compile/macos-compile_en.md index 8c2e8b5f7ee..afb5975f479 100644 --- a/docs/install/compile/macos-compile_en.md +++ b/docs/install/compile/macos-compile_en.md @@ -1,16 +1,16 @@ -# **Compile on macOS from Source Code** +# **Compile on MacOS from Source Code** ## Environment preparation -* **macOS version 10.x/11.x (64 bit) (not support GPU version)** -* **Python version 3.6/3.7/3.8/3.9 (64 bit)** +* **MacOS version 10.x/11.x (64 bit) (not support GPU version)** +* **Python version 3.6/3.7/3.8/3.9/3.10 (64 bit)** ## Choose CPU/GPU * Currently, only PaddlePaddle for CPU is supported. ## Installation steps -There are two compilation methods in macOS system. It's recommended to use Docker to compile. +There are two compilation methods in MacOS system. It's recommended to use Docker to compile. The dependencies required for compiling Paddle are pre-installed in the Docker environment, which is simpler than the native compiling environment. * [Compile with Docker](#compile_from_docker) @@ -80,20 +80,25 @@ docker run --name paddle-test -v $PWD:/paddle --network=host -it registry.baidub Note: Please make sure to allocate at least 4g of memory for docker, otherwise the compilation process may fail due to insufficient memory. You can set a container's memory allocation cap in "Preferences-Resources" in the docker UI. - #### 6. After entering Docker, go to the paddle directory: ``` cd /paddle ``` -#### 7. Switch to develop version to compile: +#### 7. Switch to a more stable version to compile: + +``` +git checkout [name of the branch] +``` + +For example: ``` -git checkout develop +git checkout release/2.3 ``` -Note: python3.6、python3.7 version started supporting from release/1.2 branch, python3.8 version started supporting from release/1.8 branch, python3.9 version started supporting from release/2.1 branch +Note: python3.6、python3.7 version started supporting from release/1.2 branch, python3.8 version started supporting from release/1.8 branch, python3.9 version started supporting from release/2.1 branch, python3.10 version started supporting from release/2.3 branch #### 8. Create and enter the /paddle/build path: @@ -109,7 +114,7 @@ mkdir -p /paddle/build && cd /paddle/build pip3.7 install protobuf==3.1.0 ``` -Note: We used Python3.7 command as an example above, if the version of your Python is 3.6/3.8/3.9, please change pip3.7 in the commands to pip3.6/pip3.8/pip3.9 +Note: We used Python3.7 command as an example above, if the version of your Python is 3.6/3.8/3.9/3.10, please change pip3.7 in the commands to pip3.6/pip3.8/pip3.9/pip3.10 > Installing patchelf, PatchELF is a small and useful program for modifying the dynamic linker and RPATH of ELF executables. @@ -119,7 +124,7 @@ apt install patchelf #### 10. Execute cmake: -* For users who need to compile the **CPU version PaddlePaddle** (We currently do not support the compilation of the GPU version PaddlePaddle under macOS): +* For users who need to compile the **CPU version PaddlePaddle** (We currently do not support the compilation of the GPU version PaddlePaddle under MacOS): ``` cmake .. -DPY_VERSION=3.7 -DWITH_GPU=OFF @@ -153,7 +158,7 @@ pip3.7 install -U [whl package name] ``` Note: -We used Python3.7 command as an example above, if the version of your Python is 3.6/3.8/3.9, please change pip3.7 in the commands to pip3.6/pip3.8/pip3.9. +We used Python3.7 command as an example above, if the version of your Python is 3.6/3.8/3.9/3.10, please change pip3.7 in the commands to pip3.6/pip3.8/pip3.9/pip3.10. #### 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/). @@ -168,7 +173,7 @@ We used Python3.7 command as an example above, if the version of your Python is #### 2. Install python and pip: -> **Please do not use the Python initially given by macOS**, we strongly recommend that you use [Homebrew](https://brew.sh/) to install python (for Python3 please use python [official download](https://www.python.org/downloads/mac-osx/) python3.6.x, python3.7.x, python3.8, python3.9), pip and other dependencies, This will greatly reduce the difficulty of installing and compiling. +> **Please do not use the Python initially given by MacOS**, we strongly recommend that you use [Homebrew](https://brew.sh/) to install python (for Python3 please use python [official download](https://www.python.org/downloads/mac-osx/) python3.6.x, python3.7.x, python3.8, python3.9, python3.10), pip and other dependencies, This will greatly reduce the difficulty of installing and compiling. Install using Python official website @@ -212,12 +217,12 @@ Install using Python official website ``` (here [python-ld-path] is the [python-bin-path]'s parent directory ) -- g. (Optional) If you are compiling PaddlePaddle on macOS 10.14, make sure you have the [appropriate version](http://developer.apple.com/download) of Xcode installed. +- g. (Optional) If you are compiling PaddlePaddle on MacOS 10.14, make sure you have the [appropriate version](http://developer.apple.com/download) of Xcode installed. #### 4. Before **compilation**, please confirm that the relevant dependencies mentioned in the [compilation dependency table](/documentation/docs/en/install/Tables_en.html/#third_party) are installed in your environment, otherwise we strongly recommend using `Homebrew` to install related dependencies. -> Under macOS, if you have not modified or installed the dependencies mentioned in the "Compile Dependency Table", you only need to use `pip` to install `numpy`, `protobuf`, `wheel`, use `Homebrew` to install `wget`, `swig`,then install `cmake`. +> Under MacOS, if you have not modified or installed the dependencies mentioned in the "Compile Dependency Table", you only need to use `pip` to install `numpy`, `protobuf`, `wheel`, use `homebrew` to install `wget`, `swig`,then install `cmake`. - a. Here is a special description of the installation of **CMake**: @@ -243,10 +248,16 @@ git clone https://github.com/PaddlePaddle/Paddle.git cd Paddle ``` -#### 6. Switch to develop branch to compile: (Note that python 3.6, python 3.7 version are supported from the 1.2 branch, python3.8 version started supporting from release/1.8 branch, python3.9 version started supporting from release/2.1 branch) +#### 6. 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, python3.8 version started supporting from release/1.8 branch, python3.9 version started supporting from release/2.1 branch, python3.10 version started supporting from release/2.3 branch) ``` -git checkout develop +git checkout [name of the branch] +``` + +For example: + +``` +git checkout release/2.3 ``` #### 7. And please create and enter a directory called build: @@ -259,20 +270,37 @@ mkdir build && cd build > For details on the compilation options, see the [compilation options table](https://www.paddlepaddle.org.cn/documentation/docs/en/develop/install/Tables.html#Compile). -* For users who need to compile the **CPU version PaddlePaddle**: +* If you use Mac M1 machine, and need to compile the **Arm architecture, CPU version PaddlePaddle**: + + ``` + cmake .. -DPY_VERSION=3.8 -DPYTHON_INCLUDE_DIR=${PYTHON_INCLUDE_DIRS} \ + -DPYTHON_LIBRARY=${PYTHON_LIBRARY} -DWITH_GPU=OFF \ + -DWITH_AVX=OFF -DWITH_ARM=ON + ``` + +* If you don't use Mac M1 machine, and need to compile the **x86_64 architecture, CPU version PaddlePaddle**: ``` - cmake .. -DPY_VERSION=3.7 -DPYTHON_INCLUDE_DIR=${PYTHON_INCLUDE_DIRS} \ - -DPYTHON_LIBRARY=${PYTHON_LIBRARY} -DWITH_GPU=OFF + cmake .. -DPY_VERSION=3.8 -DPYTHON_INCLUDE_DIR=${PYTHON_INCLUDE_DIRS} \ + -DPYTHON_LIBRARY=${PYTHON_LIBRARY} -DWITH_FLUID_ONLY=ON -DWITH_GPU=OFF ``` -- ``-DPY_VERSION=3.7`` Please change to the Python version of the installation environment. +- ``-DPY_VERSION=3.8`` Please change to the Python version of the installation environment. +- If compiling paddlepaddle for arm architecture, you need ``cmake`` version 3.19.2 or above #### 9. Compile with the following command: -``` -make -j4 -``` +* If you use Mac M1 machine, and need to compile the **Arm architecture, CPU version PaddlePaddle**: + + ``` + make TARGET=ARMV8 -j4 + ``` + +* If you don't use Mac M1 machine, and need to compile the **x86_64 architecture, CPU version PaddlePaddle**: + + ``` + make -j4 + ``` #### 10. After compiling successfully, go to the `/paddle/build/python/dist `directory and find the generated `.whl` package: ``` diff --git a/docs/install/compile/sw-compile.md b/docs/install/compile/sw-compile.md index a85da8d4130..27fd31ac350 100644 --- a/docs/install/compile/sw-compile.md +++ b/docs/install/compile/sw-compile.md @@ -34,19 +34,29 @@ 3. Paddle 依赖 cmake 进行编译构建,需要 cmake 版本>=3.15,检查操作系统源提供 cmake 的版本,使用源的方式直接安装 cmake, `apt install cmake`, 检查 cmake 版本, `cmake --version`, 如果 cmake >= 3.15 则不需要额外的操作,否则请修改 Paddle 主目录的`CMakeLists.txt`, `cmake_minimum_required(VERSION 3.15)` 修改为 `cmake_minimum_required(VERSION 3.0)`. -4. 申威支持 openblas,使用 `yum` 安装 openblas 及其相关的依赖(如果安装失败,需要联系厂商解决安装问题)。 - 安装 openblas,得到 openblas 库文件及头文件 cblas.h; - 安装 lapack: - ``` - yum install lapack-devel.sw_64 - ``` - lapack 的搜索地址与 openblas 相同。 - - 编译时出现以下 log 信息,表明 openblas 库链接成功: - ``` - -- Found OpenBLAS (include: /usr/include/openblas, library: /usr/lib/libopenblas.so) - -- Found lapack in OpenBLAS (include: /usr/include) - ``` +4. 由于申威暂不支持 openblas,所以在此使用 blas + cblas 的方式,在此需要源码编译 blas 和 cblas。 + + ``` + pushd /opt + wget http://www.netlib.org/blas/blas-3.8.0.tgz + wget http://www.netlib.org/blas/blast-forum/cblas.tgz + tar xzf blas-3.8.0.tgz + tar xzf cblas.tgz + pushd BLAS-3.8.0 + make + popd + pushd CBLAS + # 修改 Makefile.in 中 BLLIB 为 BLAS-3.8.0 的编译产物 blas_LINUX.a + make + pushd lib + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD + ln -s cblas_LINUX.a libcblas.a + cp ../../BLAS-3.8.0/blas_LINUX.a . + ln -s blas_LINUX.a libblas.a + popd + popd + popd + ``` 5. 根据[requirments.txt](https://github.com/PaddlePaddle/Paddle/blob/develop/python/requirements.txt)安装 Python 依赖库,注意在申威系统中一般无法直接使用 pip 或源码编译安装 python 依赖包,建议使用源的方式安装,如果遇到部分依赖包无法安装的情况,请联系操作系统服务商提供支持。此外也可以通过 pip 安装的时候加--no-deps 的方式来避免依赖包的安装,但该种方式可能导致包由于缺少依赖不可用。 @@ -66,13 +76,17 @@ >具体编译选项含义请参见[编译选项表](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/install/Tables.html#Compile) + ``` + CBLAS_ROOT=/opt/CBLAS + ``` + For Python2: ``` - cmake .. -DPY_VERSION=2 -DPYTHON_EXECUTABLE=`which python2` -DWITH_MKL=OFF -DWITH_TESTING=OFF -DCMAKE_BUILD_TYPE=Release -DON_INFER=ON -DWITH_PYTHON=ON -DWITH_XBYAK=OFF -DWITH_SW=ON -DCMAKE_CXX_FLAGS="-Wno-error -w" -DWITH_RCCL=OFF + cmake .. -DPY_VERSION=2 -DPYTHON_EXECUTABLE=`which python2` -DWITH_MKL=OFF -DWITH_TESTING=OFF -DCMAKE_BUILD_TYPE=Release -DON_INFER=ON -DWITH_PYTHON=ON -DREFERENCE_CBLAS_ROOT=${CBLAS_ROOT} -DWITH_CRYPTO=OFF -DWITH_XBYAK=OFF -DWITH_SW=ON -DCMAKE_CXX_FLAGS="-Wno-error -w" ``` For Python3: ``` - cmake .. -DPY_VERSION=3 -DPYTHON_EXECUTABLE=`which python3` -DWITH_MKL=OFF -DWITH_TESTING=OFF -DCMAKE_BUILD_TYPE=Release -DON_INFER=ON -DWITH_PYTHON=ON -DWITH_XBYAK=OFF -DWITH_SW=ON -DCMAKE_CXX_FLAGS="-Wno-error -w" -DWITH_RCCL=OFF + cmake .. -DPY_VERSION=3 -DPYTHON_EXECUTABLE=`which python3` -DWITH_MKL=OFF -DWITH_TESTING=OFF -DCMAKE_BUILD_TYPE=Release -DON_INFER=ON -DWITH_PYTHON=ON -DREFERENCE_CBLAS_ROOT=${CBLAS_ROOT} -DWITH_CRYPTO=OFF -DWITH_XBYAK=OFF -DWITH_SW=ON -DCMAKE_CXX_FLAGS="-Wno-error -w" ``` 9. 编译。 diff --git a/docs/install/compile/windows-compile.md b/docs/install/compile/windows-compile.md index 2e5f06f7cc9..51418d9dc04 100644 --- a/docs/install/compile/windows-compile.md +++ b/docs/install/compile/windows-compile.md @@ -7,6 +7,7 @@ ## 环境准备 * **Windows 7/8/10 专业版/企业版 (64bit)** + * **Python 版本 3.6/3.7/3.8/3.9/3.10 (64 bit)** * **Visual Studio 2017/2019 社区版/专业版/企业版** @@ -14,7 +15,7 @@ * 如果你的计算机硬件没有 NVIDIA® GPU,请编译 CPU 版本的 PaddlePaddle -* 如果你的计算机硬件有 NVIDIA® GPU,推荐编译 GPU 版本的 PaddlePaddle,建议安装 **CUDA 10.1/10.2/11.0/11.1/11.2/11.6** +* 如果你的计算机硬件有 NVIDIA® GPU,推荐编译 GPU 版本的 PaddlePaddle,建议安装 **CUDA 10.1/10.2//11.1/11.2/11.6** ## 本机编译过程 @@ -24,7 +25,7 @@ > **git**:官网下载[链接](https://github.com/git-for-windows/git/releases/download/v2.35.1.windows.2/Git-2.35.1.2-64-bit.exe),使用默认选项安装。 - > **python**:官网[链接](https://www.python.org/downloads/windows/),可选择 3.6/3.7/3.8/3.9 中任一版本的 Windows installer(64-bit)安装。安装时注意勾选 `Add Python 3.x to PATH`,将 Python 添加到环境变量中。 + > **python**:官网[链接](https://www.python.org/downloads/windows/),可选择 3.6/3.7/3.8/3.9/3.10 中任一版本的 Windows installer(64-bit)安装。安装时注意勾选 `Add Python 3.x to PATH`,将 Python 添加到环境变量中。 > **Visual studio**:需根据 CUDA 版本选择对应的 Visual studio 版本,当只编译 CPU 版本或者 CUDA 版本 < 11.2 时,安装 VS2017;当 CUDA 版本 >= 11.2 时,安装 VS2019。官网[链接](https://visualstudio.microsoft.com/zh-hans/vs/older-downloads/),需要登录后下载,建议下载 Community 社区版。在安装时需要在工作负荷一栏中勾选 `使用 C++的桌面开发` 和 `通用 Windows 平台开发`,并在语言包一栏中选择 `英语`。 @@ -47,7 +48,13 @@ cd Paddle ``` -5. 创建名为 build 的目录并进入: +5. 切换到 2.2 分支下进行编译: + + ``` + git checkout release/2.3 + ``` + +6. 创建名为 build 的目录并进入: ``` mkdir build @@ -55,7 +62,7 @@ cd build ``` -6. 执行 cmake: +7. 执行 cmake: 编译 CPU 版本的 Paddle: @@ -83,19 +90,19 @@ cmake .. -GNinja -DWITH_GPU=ON -DPYTHON_EXECUTABLE=C:\Python38\python.exe -DPYTHON_INCLUDE_DIR=C:\Python38\include -DPYTHON_LIBRARY=C:\Python38\libs\python38.lib ``` -7. 执行编译: +8. 执行编译: ``` ninja ``` -8. 编译成功后进入 `python\dist` 目录下找到生成的 `.whl` 包: +9. 编译成功后进入 `python\dist` 目录下找到生成的 `.whl` 包: ``` cd python\dist ``` -9. 安装编译好的 `.whl` 包: +10. 安装编译好的 `.whl` 包: ``` pip install(whl 包的名字)--force-reinstall diff --git a/docs/install/compile/windows-compile_en.md b/docs/install/compile/windows-compile_en.md index 62b9888e27f..155d96d185b 100644 --- a/docs/install/compile/windows-compile_en.md +++ b/docs/install/compile/windows-compile_en.md @@ -3,8 +3,8 @@ ## Environment preparation * **Windows 7/8/10 Pro/Enterprise(64bit)** -* **GPU Version support CUDA 10.1/10.2/11.0/11.1/11.2, and only support single GPU** -* **Python version 3.6+/3.7+/3.8+/3.9+(64bit)** +* **GPU Version support CUDA 10.1/10.2/11.1/11.2/11.6, and only support single GPU** +* **Python version 3.6+/3.7+/3.8+/3.9+/3.10+(64bit)** * **pip version 20.2.2 or above (64bit)** * **Visual Studio 2017** @@ -13,10 +13,10 @@ * If your computer doesn't have NVIDIA® GPU, please install CPU version of PaddlePaddle * If your computer has NVIDIA® GPU, and the following conditions are met,GPU version of PaddlePaddle is recommended. - * **CUDA toolkit 10.1/10.2 with cuDNN v7.6.5+** - * **CUDA toolkit 11.0 with cuDNN v8.0.2+** - * **CUDA toolkit 11.1 with cuDNN v8.1.1+** + * **CUDA toolkit 10.1/10.2 with cuDNN v7.6.5** + * **CUDA toolkit 11.1 with cuDNN v8.1.1** * **CUDA toolkit 11.2 with cuDNN v8.2.1** + * **CUDA toolkit 11.6 with cuDNN v8.4.0** * **GPU's computing capability exceeds 3.5** ## Installation steps @@ -65,13 +65,18 @@ There is one compilation methods in Windows system: cd Paddle ``` -3. Switch to `develop` branch for compilation: +3. Switch to a more stable release branch for compilation: ``` - git checkout develop + git checkout [name of the branch] ``` - Note: python3.6、python3.7 version started supporting from release/1.2, python3.8 version started supporting from release/1.8, python3.9 version started supporting from release/2.1 + For example: + ``` + git checkout release/2.3 + ``` + + Note: python3.6、python3.7 version started supporting from release/1.2, python3.8 version started supporting from release/1.8, python3.9 version started supporting from release/2.1, python3.10 version started supporting from release/2.3 4. Create a directory called build and enter it: diff --git a/docs/install/conda/fromconda.rst b/docs/install/conda/fromconda.rst index 1a14f0b524f..478929ef7ce 100644 --- a/docs/install/conda/fromconda.rst +++ b/docs/install/conda/fromconda.rst @@ -2,7 +2,7 @@ **Conda 安装** =========================== -.. toctree:: +.. toctree:: :maxdepth: 1 linux-conda.md diff --git a/docs/install/conda/fromconda_en.rst b/docs/install/conda/fromconda_en.rst index fb1eb259379..2b350a997b3 100644 --- a/docs/install/conda/fromconda_en.rst +++ b/docs/install/conda/fromconda_en.rst @@ -2,7 +2,7 @@ **Install via conda** ============================== -.. toctree:: +.. toctree:: linux-conda_en.md diff --git a/docs/install/conda/linux-conda.md b/docs/install/conda/linux-conda.md index 485d28cbeda..22c40c66856 100644 --- a/docs/install/conda/linux-conda.md +++ b/docs/install/conda/linux-conda.md @@ -7,14 +7,15 @@ 在进行 PaddlePaddle 安装之前请确保您的 Anaconda 软件环境已经正确安装。软件下载和安装参见 Anaconda 官网(https://www.anaconda.com/)。在您已经正确安装 Anaconda 的情况下请按照下列步骤安装 PaddlePaddle。 +* CentOS 7 / Ubuntu16.04 / Ubuntu18.04 / Ubuntu20.04 (64bit) +* GPU 版本支持 CUDA 10.1/10.2/11.2/11.6 * conda 版本 4.8.3+ (64 bit) - ### 1.1 创建虚拟环境 #### 1.1.1 安装环境 -首先根据具体的 Python 版本创建 Anaconda 虚拟环境,PaddlePaddle 的 Anaconda 安装支持以下五种 Python 安装环境。 +首先根据具体的 Python 版本创建 Anaconda 虚拟环境,PaddlePaddle 的 Anaconda 安装支持以下四种 Python 安装环境。 如果您想使用的 python 版本为 3.6: @@ -49,71 +50,112 @@ conda activate paddle_env ``` -## 1.2 其他环境检查 -确认 Python 和 pip 是 64bit,并且处理器架构是 x86_64(或称作 x64、Intel 64、AMD64)架构,目前 PaddlePaddle 不支持 arm64 架构。下面的第一行输出的是"64bit",第二行输出的是"x86_64(或 x64、AMD64)"即可: +### 1.2 其他环境检查 + +#### 1.2.1 确认 Python 安装路径 + +确认您的 conda 虚拟环境和需要安装 PaddlePaddle 的 Python 是您预期的位置,因为您计算机可能有多个 Python。进入 Anaconda 的命令行终端,输入以下指令确认 Python 位置。 + + +输出 Python 路径的命令为: + ``` -python -c "import platform;print(platform.architecture()[0]);print(platform.machine())" +which python ``` +根据您的环境,您可能需要将说明中所有命令行中的 python 替换为具体的 Python 路径 -## 二、开始安装 -本文档为您介绍 conda 安装方式 +#### 1.2.2 检查 Python 版本 -### 添加清华源(可选) +使用以下命令确认版本(Python 应对应 3.6/3.7/3.8/3.9) -对于国内用户无法连接到 Anaconda 官方源的可以按照以下命令添加清华源。 +``` +python --version +``` + + +#### 1.2.3 检查系统环境 + +确认 Python 和 pip 是 64bit,并且处理器架构是 x86_64(或称作 x64、Intel 64、AMD64)架构。下面的第一行输出的是"64bit",第二行输出的是"x86_64(或 x64、AMD64)"即可: ``` -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 --set show_channel_urls yes +python -c "import platform;print(platform.architecture()[0]);print(platform.machine())" ``` + +## 二、开始安装 + +本文档为您介绍 conda 安装方式 + +### 添加清华源(可选) + +对于国内用户无法连接到 Anaconda 官方源的可以按照以下命令添加清华源: + + ``` + 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 --set show_channel_urls yes + ``` + ### 根据版本进行安装 -确定您的环境满足条件后可以开始安装了,选择下面您要安装的 PaddlePaddle +选择下面您要安装的 PaddlePaddle #### CPU 版的 PaddlePaddle -如果您的计算机没有 NVIDIA® GPU 设备,请安装 CPU 版的 PaddlePaddle +如果您的计算机没有 NVIDIA® GPU,请安装 CPU 版的 PaddlePaddle ``` -conda install paddlepaddle --channel https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/ +conda install paddlepaddle==2.3.2 --channel https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/ ``` + #### GPU 版的 PaddlePaddle -如果您的计算机有 NVIDIA® GPU 设备 -* 如果您是使用 CUDA 10.1,cuDNN 7.6+,安装 GPU 版本的命令为: +* 对于 `CUDA 10.1`,需要搭配 cuDNN 7 (cuDNN>=7.6.5, 多卡环境下 NCCL>=2.7),安装命令为: ``` - conda install paddlepaddle-gpu==2.1.0 cudatoolkit=10.1 --channel https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/ + conda install paddlepaddle-gpu==2.3.2 cudatoolkit=10.1 --channel https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/ ``` -* 如果您是使用 CUDA 10.2,cuDNN 7.6+,安装 GPU 版本的命令为: +* 对于 `CUDA 10.2`,需要搭配 cuDNN 7 (cuDNN>=7.6.5, 多卡环境下 NCCL>=2.7),安装命令为: ``` - conda install paddlepaddle-gpu==2.1.0 cudatoolkit=10.2 --channel https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/ + conda install paddlepaddle-gpu==2.3.2 cudatoolkit=10.2 --channel https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/ ``` -* 如果您是使用 CUDA 11.2,cuDNN 8.1.1+,安装 GPU 版本的命令为: + +* 对于 `CUDA 11.2`,需要搭配 cuDNN 8.1.1(多卡环境下 NCCL>=2.7),安装命令为: ``` - conda install paddlepaddle-gpu==2.1.0 cudatoolkit=11.2 -c https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/ -c conda-forge + conda install paddlepaddle-gpu==2.3.2 cudatoolkit=11.2 -c https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/ -c conda-forge ``` +* 对于 `CUDA 11.6`,需要搭配 cuDNN 8.4.0(多卡环境下 NCCL>=2.7),安装命令为: + + ``` + conda install paddlepaddle-gpu==2.3.2 cudatoolkit=11.6 -c https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/ -c conda-forge + ``` + +您可参考 NVIDIA 官方文档了解 CUDA 和 CUDNN 的安装流程和配置方法,请见[CUDA](https://docs.nvidia.com/cuda/cuda-installation-guide-linux/),[cuDNN](https://docs.nvidia.com/deeplearning/sdk/cudnn-install/) + + ## **三、验证安装** -安装完成后您可以使用 `python` 进入 python 解释器,输入`import paddle` ,再输入 +安装完成后您可以使用 `python` 或 `python3` 进入 python 解释器,输入`import paddle` ,再输入 `paddle.utils.run_check()` 如果出现`PaddlePaddle is installed successfully!`,说明您已成功安装。 diff --git a/docs/install/conda/linux-conda_en.md b/docs/install/conda/linux-conda_en.md index 8162074b8db..29a82d46e02 100644 --- a/docs/install/conda/linux-conda_en.md +++ b/docs/install/conda/linux-conda_en.md @@ -7,6 +7,9 @@ Before performing PaddlePaddle installation, please make sure that your Anaconda software environment is properly installed. For software download and installation, see Anaconda's official website (https://www.anaconda.com/). If you have installed Anaconda correctly, follow these steps to install PaddlePaddle. +* CentOS 7 / Ubuntu16.04 / Ubuntu18.04 / Ubuntu20.04 (64bit) +* GPU Version support CUDA 10.1/10.2/11.2/11.6 +* conda version 4.8.3+ (64 bit) ### 1.1 Create Virtual Environment @@ -42,33 +45,21 @@ conda create -n paddle_env python=3.9 #### 1.1.2 Enter the Anaconda Virtual Environment -for Windows - -``` -activate paddle_env -``` - -for macOS/Linux - ``` conda activate paddle_env ``` -## 1.2 Confirm Other Environments +### 1.2 Confirm Other Environments Confirm that your conda virtual environment and the Python loaction which is preapared to install PaddlePaddle are where you expected them for your computer may have multiple Pythons environments. Enter Anaconda's command line terminal and enter the following command to confirm the Python location. -1.2.1 Depending on your environment, you may need to replace python in all command lines in the instructions with specific Python path. - -In a Windows environment, the command to get the Python path is: +#### 1.2.1 Confirm the installation path of python -``` -where python -``` +Depending on your environment, you may need to replace python in all command lines in the instructions with specific Python path. -In a macOS/Linux environment, the command to get the Python path is: +The command to get the Python path is: ``` which python @@ -76,7 +67,7 @@ which python -1.2.2 Check the version of Python +#### 1.2.2 Check the version of Python Use the following command to confirm it's version is 3.6/3.7/3.8/3.9 @@ -87,7 +78,9 @@ python --version -1.2.3 Confirm that Python and pip are 64bit, and the processor architecture is x86_64 (or x64, Intel 64, AMD64) architecture. Currently PaddlePaddle does not support arm64 architecture. The first line below print "64bit", the second line prints "x86_64 (or x64, AMD64)." +#### 1.2.3 Check the system environment + +Confirm that Python and pip are 64bit, and the processor architecture is x86_64 (or x64, Intel 64, AMD64) architecture. The first line below print "64bit", the second line prints "x86_64 (or x64, AMD64)." ``` @@ -100,52 +93,20 @@ python -c "import platform;print(platform.architecture()[0]);print(platform.mach ## INSTALLATION -### Choose CPU/GPU - -* If your computer doesn't have NVIDIA® GPU, please install [the CPU Version of PaddlePaddle](#cpu) - -* If your computer has NVIDIA® GPU, please make sure that the following conditions are met and install [the GPU Version of PaddlePaddle](#gpu) - - * **CUDA toolkit 10.1/10.2 with cuDNN v7.6+(for multi card support, NCCL2.7 or higher)** - - * **CUDA toolkit 11.2 with cuDNN v8.1.1(for multi card support, NCCL2.7 or higher)** - - * **Hardware devices with GPU computing power over 3.5** +### Add Tsinghua source (optional) - 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/) - -* If you need to use a multi-card environment, please make sure that you have installed nccl2 correctly, or install nccl2 according to the following instructions (here are the installation instructions of nccl2 under CUDA9 and cuDNN7. For more version installation information, please refer to NVIDIA [Official Website](https://developer.nvidia.com/nccl)): - - * **CentOS system can refer to the following commands** - - 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 - ``` - - * **Ubuntu system can refer to the following commands** - - ``` - 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 - ``` +For domestic users who cannot connect to the Anaconda official source, you can add Tsinghua source according to the following command. - ``` - sudo apt-get install -y libnccl2=2.3.7-1+cuda9.0 libnccl-dev=2.3.7-1+cuda9.0 - ``` +``` +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 --set show_channel_urls yes +``` ### Installation Step @@ -154,35 +115,44 @@ You can choose the following version of PaddlePaddle to start installation: -#### 2.1 CPU version of PaddlePaddle +#### CPU Version of PaddlePaddle + +If your computer doesn't have NVIDIA® GPU, please install `the CPU Version of PaddlePaddle` ``` -conda install paddlepaddle --channel https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/ +conda install paddlepaddle==2.3.2 --channel https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/ ``` -#### 2.2 GPU version of PaddlePaddle +#### GPU Version of PaddlePaddle -* If you are using CUDA 10.1,cuDNN 7.6+ +* If you are using CUDA 10.1,cuDNN 7 (cuDNN>=7.6.5, for multi card support, NCCL>=2.7): ``` - conda install paddlepaddle-gpu==2.1.0 cudatoolkit=10.1 --channel https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/ + conda install paddlepaddle-gpu==2.3.2 cudatoolkit=10.1 --channel https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/ ``` -* If you are usingCUDA 10.2,cuDNN 7.6+: +* If you are usingCUDA 10.2,cuDNN 7 (cuDNN>=7.6.5, for multi card support, NCCL>=2.7): ``` - conda install paddlepaddle-gpu==2.1.0 cudatoolkit=10.2 --channel https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/ + conda install paddlepaddle-gpu==2.3.2 cudatoolkit=10.2 --channel https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/ ``` -* If you are using CUDA 11.2,cuDNN 8.1.1+: +* If you are using CUDA 11.2,cuDNN 8.1.1(for multi card support, NCCL>=2.7): ``` - conda install paddlepaddle-gpu==2.1.0 cudatoolkit=11.2 -c https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/ -c conda-forge + conda install paddlepaddle-gpu==2.3.2 cudatoolkit=11.2 -c https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/ -c conda-forge ``` +* If you are using CUDA 11.6,cuDNN 8.4.0(for multi card support, NCCL>=2.7): + + ``` + conda install paddlepaddle-gpu==2.3.2 cudatoolkit=11.6 -c https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/ -c conda-forge + ``` + +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/) ## Verify installation @@ -190,20 +160,3 @@ conda install paddlepaddle --channel https://mirrors.tuna.tsinghua.edu.cn/anacon After the installation is complete, you can use `python` or `python3` to enter the Python interpreter and then use `import paddle` and `paddle.utils.run_check()` If `PaddlePaddle is installed successfully!` appears, to verify that the installation was successful. - - - -## Notice - -For domestic users who cannot connect to the Anaconda official source, you can add Tsinghua source 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 --set show_channel_urls yes -``` diff --git a/docs/install/conda/macos-conda.md b/docs/install/conda/macos-conda.md index 55e8981fc4f..284884297b8 100644 --- a/docs/install/conda/macos-conda.md +++ b/docs/install/conda/macos-conda.md @@ -1,4 +1,4 @@ -# macOS 下的 Conda 安装 +# MacOS 下的 Conda 安装 [Anaconda](https://www.anaconda.com/)是一个免费开源的 Python 和 R 语言的发行版本,用于计算科学,Anaconda 致力于简化包管理和部署。Anaconda 的包使用软件包管理系统 Conda 进行管理。Conda 是一个开源包管理系统和环境管理系统,可在 Windows、macOS 和 Linux 上运行。 @@ -6,7 +6,7 @@ 在进行 PaddlePaddle 安装之前请确保您的 Anaconda 软件环境已经正确安装。软件下载和安装参见 Anaconda 官网(https://www.anaconda.com/)。在您已经正确安装 Anaconda 的情况下请按照下列步骤安装 PaddlePaddle。 -* macOS 版本 10.11/10.12/10.13/10.14 (64 bit) (不支持 GPU 版本) +* MacOS 版本 10.x/11.x (64 bit) (不支持 GPU 版本) * conda 版本 4.8.3+ (64 bit) ### 1.1 创建虚拟环境 @@ -43,45 +43,73 @@ conda create -n paddle_env python=3.9 #### 1.1.2 进入 Anaconda 虚拟环境 + ``` conda activate paddle_env ``` -## 1.2 其他环境检查 -确认 Python 和 pip 是 64bit,并且处理器架构是 x86_64(或称作 x64、Intel 64、AMD64)架构,目前 PaddlePaddle 不支持 arm64 架构。下面的第一行输出的是"64bit",第二行输出的是"x86_64(或 x64、AMD64)"即可: +### 1.2 其他环境检查 + +#### 1.2.1 确认 Python 安装路径 + +确认您的 conda 虚拟环境和需要安装 PaddlePaddle 的 Python 是您预期的位置,因为您计算机可能有多个 Python。进入 Anaconda 的命令行终端,输入以下指令确认 Python 位置。 + +输出 Python 路径的命令为: ``` -python -c "import platform;print(platform.architecture()[0]);print(platform.machine())" +which python ``` -## 二、开始安装 +根据您的环境,您可能需要将说明中所有命令行中的 python 替换为具体的 Python 路径 + + + +#### 1.2.2 检查 Python 版本 + +使用以下命令确认版本(Python 应对应 3.6/3.7/3.8/3.9) + +``` +python --version +``` -本文档为您介绍 conda 安装方式 -### 添加清华源(可选) -对于国内用户无法连接到 Anaconda 官方源的可以按照以下命令添加清华源。 +#### 1.2.3 检查系统环境 + +确认 Python 和 pip 是 64bit,并且处理器架构是 x86_64(或称作 x64、Intel 64、AMD64)架构 或 arm64 架构(paddle 已原生支持 Mac M1 芯片): + ``` -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 --set show_channel_urls yes +python -c "import platform;print(platform.architecture()[0]);print(platform.machine())" ``` -### 首先请您选择您的版本 -* 目前在 macOS 环境仅支持 CPU 版 PaddlePaddle +## 二、开始安装 + +本文档为您介绍 conda 安装方式 + +### 添加清华源(可选) -### 根据版本进行安装 +* 对于国内用户无法连接到 Anaconda 官方源的可以按照以下命令添加清华源: + + ``` + 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 --set show_channel_urls yes + ``` -确定您的环境满足条件后可以开始安装了,选择下面您要安装的 PaddlePaddle +### 安装 CPU 版 PaddlePaddle -* 请参考如下命令安装: +* 目前在 MacOS 环境仅支持 CPU 版 PaddlePaddle,请参考如下命令安装 Paddle: ``` - conda install paddlepaddle --channel https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/ + conda install paddlepaddle==2.3.2 --channel https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/ ``` ## **三、验证安装** diff --git a/docs/install/conda/macos-conda_en.md b/docs/install/conda/macos-conda_en.md index ddc6749fa4a..003b73b7c45 100644 --- a/docs/install/conda/macos-conda_en.md +++ b/docs/install/conda/macos-conda_en.md @@ -1,4 +1,4 @@ -# Installation on macOS via Conda +# Installation on MacOS via Conda [Anaconda](https://www.anaconda.com/)is a free and open source distribution of Python and R for computational science. Anaconda is dedicated to simplifying package management and deployment. Anaconda's packages are managed using the package management system Conda. Conda is an open source package management system and environment management system that runs on Windows, macOS, and Linux. @@ -8,7 +8,7 @@ Before performing PaddlePaddle installation, please make sure that your Anaconda software environment is properly installed. For software download and installation, see Anaconda's official website (https://www.anaconda.com/). If you have installed Anaconda correctly, follow these steps to install PaddlePaddle. -* macOS version 10.11/10.12/10.13/10.14 (64 bit)(not support GPU version) +* MacOS version 10.x/11.x (64 bit)(not support GPU version) * conda version 4.8.3+ (64 bit) @@ -48,40 +48,28 @@ conda create -n paddle_env python=3.9 #### 1.1.2 Enter the Anaconda Virtual Environment -for Windows - -``` -activate paddle_env -``` - -for macOS/Linux - ``` conda activate paddle_env ``` -## 1.2 Confirm Other Environments +### 1.2 Confirm Other Environments Confirm that your conda virtual environment and the Python loaction which is preapared to install PaddlePaddle are where you expected them for your computer may have multiple Pythons environments. Enter Anaconda's command line terminal and enter the following command to confirm the Python location. -1.2.1 Depending on your environment, you may need to replace python in all command lines in the instructions with specific Python path. +#### 1.2.1 Confirm the installation path of python -In a Windows environment, the command to get the Python path is: +Depending on your environment, you may need to replace python in all command lines in the instructions with specific Python path. -``` -where python -``` - -In a macOS/Linux environment, the command to get the Python path is: +The command to get the Python path is: ``` which python ``` -1.2.2 Check the version of Python +#### 1.2.2 Check the version of Python Use the following command to confirm it's version is 3.6/3.7/3.8/3.9 @@ -91,7 +79,10 @@ python --version -1.2.3 Confirm that Python and pip are 64bit, and the processor architecture is x86_64 (or x64, Intel 64, AMD64) architecture. Currently PaddlePaddle does not support arm64 architecture. The first line below print "64bit", the second line prints "x86_64 (or x64, AMD64)." +#### 1.2.3 Check the system environment + + +Confirm that Python and pip are 64bit, and the processor architecture is x86_64(or called x64、Intel 64、AMD64) or arm64 (PaddlePaddle already supports Mac M1): ``` @@ -104,18 +95,27 @@ python -c "import platform;print(platform.architecture()[0]);print(platform.mach We will introduce conda installation here. -### Choose CPU/GPU +### Add Tsinghua source (optional) + +For domestic users who cannot connect to the Anaconda official source, you can add Tsinghua source according to the following command. -* Currently, only the CPU version of PaddlePaddle is supported in the macOS environment -### Installation Step +``` +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 --set show_channel_urls yes +``` -You can choose the following version of PaddlePaddle to start installation: +### Install the CPU version of PaddlePaddle -* Please use the following command to install PaddlePaddle: +* Currently, only the CPU version of PaddlePaddle is supported in the MacOS environment. Please use the following command to install PaddlePaddle: ``` - conda install paddlepaddle --channel https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/ + conda install paddlepaddle==2.3.2 --channel https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/ ``` @@ -124,21 +124,3 @@ You can choose the following version of PaddlePaddle to start installation: After the installation is complete, you can use `python` or `python3` to enter the Python interpreter and then use `import paddle` and `paddle.utils.run_check()` If `PaddlePaddle is installed successfully!` appears, to verify that the installation was successful. - - - - -## Notice - -For domestic users who cannot connect to the Anaconda official source, you can add Tsinghua source 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 --set show_channel_urls yes -``` diff --git a/docs/install/conda/windows-conda.md b/docs/install/conda/windows-conda.md index 231d7d76b9c..356e89b2cfe 100644 --- a/docs/install/conda/windows-conda.md +++ b/docs/install/conda/windows-conda.md @@ -2,18 +2,22 @@ [Anaconda](https://www.anaconda.com/)是一个免费开源的 Python 和 R 语言的发行版本,用于计算科学,Anaconda 致力于简化包管理和部署。Anaconda 的包使用软件包管理系统 Conda 进行管理。Conda 是一个开源包管理系统和环境管理系统,可在 Windows、macOS 和 Linux 上运行。 + + ## 一、环境准备 在进行 PaddlePaddle 安装之前请确保您的 Anaconda 软件环境已经正确安装。软件下载和安装参见 Anaconda 官网(https://www.anaconda.com/)。在您已经正确安装 Anaconda 的情况下请按照下列步骤安装 PaddlePaddle。 * Windows 7/8/10 专业版/企业版 (64bit) +* GPU 版本支持 CUDA 10.1/10.2/11.2/11.6,且仅支持单卡 * conda 版本 4.8.3+ (64 bit) + ### 1.1 创建虚拟环境 #### 1.1.1 安装环境 -首先根据具体的 Python 版本创建 Anaconda 虚拟环境,PaddlePaddle 的 Anaconda 安装支持以下五种 Python 安装环境。 +首先根据具体的 Python 版本创建 Anaconda 虚拟环境,PaddlePaddle 的 Anaconda 安装支持以下四种 Python 安装环境。 如果您想使用的 python 版本为 3.6: @@ -44,75 +48,116 @@ conda create -n paddle_env python=3.9 #### 1.1.2 进入 Anaconda 虚拟环境 ``` -conda activate paddle_env +activate paddle_env +``` + + + +### 1.2 其他环境检查 + +#### 1.2.1 确认 Python 安装路径 + +确认您的 conda 虚拟环境和需要安装 PaddlePaddle 的 Python 是您预期的位置,因为您计算机可能有多个 Python。进入 Anaconda 的命令行终端,输入以下指令确认 Python 位置。 + +输出 Python 路径的命令为: + +``` +where python ``` -## 1.2 其他环境检查 +根据您的环境,您可能需要将说明中所有命令行中的 python 替换为具体的 Python 路径 + + + +#### 1.2.2 检查 Python 版本 + +使用以下命令确认版本(应对应 3.6/3.7/3.8/3.9) + +``` +python --version +``` + + + +#### 1.2.3 检查系统环境 + +确认 Python 和 pip 是 64bit,并且处理器架构是 x86_64(或称作 x64、Intel 64、AMD64)架构。下面的第一行输出的是"64bit",第二行输出的是"x86_64(或 x64、AMD64)"即可: -确认 Python 和 pip 是 64bit,并且处理器架构是 x86_64(或称作 x64、Intel 64、AMD64)架构,目前 PaddlePaddle 不支持 arm64 架构。下面的第一行输出的是"64bit",第二行输出的是"x86_64(或 x64、AMD64)"即可: ``` python -c "import platform;print(platform.architecture()[0]);print(platform.machine())" ``` + ## 二、开始安装 本文档为您介绍 conda 安装方式 - ### 添加清华源(可选) -对于国内用户无法连接到 Anaconda 官方源的可以按照以下命令添加清华源。 +对于国内用户无法连接到 Anaconda 官方源的可以按照以下命令添加清华源: -``` -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 --set show_channel_urls yes -``` + ``` + 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 --set show_channel_urls yes + ``` ### 根据版本进行安装 -确定您的环境满足条件后可以开始安装了,选择下面您要安装的 PaddlePaddle +选择下面您要安装的 PaddlePaddle #### CPU 版的 PaddlePaddle -如果您的计算机没有 NVIDIA® GPU 设备,请安装 CPU 版的 PaddlePaddle +如果您的计算机没有 NVIDIA® GPU,请安装 CPU 版的 PaddlePaddle ``` -conda install paddlepaddle --channel https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/ +conda install paddlepaddle==2.3.2 --channel https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/ ``` + #### GPU 版的 PaddlePaddle -如果您的计算机有 NVIDIA® GPU 设备 -* 如果您是使用 CUDA 10.1,cuDNN 7.6+,安装 GPU 版本的命令为: +* 对于 `CUDA 10.1`,需要搭配 cuDNN 7 (cuDNN>=7.6.5),安装命令为: ``` - conda install paddlepaddle-gpu==2.1.0 cudatoolkit=10.1 --channel https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/ + conda install paddlepaddle-gpu==2.3.2 cudatoolkit=10.1 --channel https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/ ``` -* 如果您是使用 CUDA 10.2,cuDNN 7.6+,安装 GPU 版本的命令为: +* 对于 `CUDA 10.2`,需要搭配 cuDNN 7 (cuDNN>=7.6.5),安装命令为: ``` - conda install paddlepaddle-gpu==2.1.0 cudatoolkit=10.2 --channel https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/ + conda install paddlepaddle-gpu==2.3.2 cudatoolkit=10.2 --channel https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/ ``` -* 如果您是使用 CUDA 11.2,cuDNN 8.1.1+,安装 GPU 版本的命令为: +* 对于 `CUDA 11.2`,需要搭配 cuDNN 8.1.1,安装命令为: ``` - conda install paddlepaddle-gpu==2.1.0 cudatoolkit=11.2 -c https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/ -c conda-forge + conda install paddlepaddle-gpu==2.3.2 cudatoolkit=11.2 -c https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/ -c conda-forge ``` +* 对于 `CUDA 11.6`,需要搭配 cuDNN 8.4.0,安装命令为: + + ``` + conda install paddlepaddle-gpu==2.3.2 cudatoolkit=11.6 -c https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/ -c conda-forge + ``` + +您可参考 NVIDIA 官方文档了解 CUDA 和 CUDNN 的安装流程和配置方法,请见[CUDA](https://docs.nvidia.com/cuda/cuda-installation-guide-linux/),[cuDNN](https://docs.nvidia.com/deeplearning/sdk/cudnn-install/) + ## **三、验证安装** -安装完成后您可以使用 `python` 进入 python 解释器,输入`import paddle` ,再输入 +安装完成后您可以使用 `python` 或 `python3` 进入 python 解释器,输入`import paddle` ,再输入 `paddle.utils.run_check()` 如果出现`PaddlePaddle is installed successfully!`,说明您已成功安装。 diff --git a/docs/install/conda/windows-conda_en.md b/docs/install/conda/windows-conda_en.md index 8a73dcfec3d..a7406670058 100644 --- a/docs/install/conda/windows-conda_en.md +++ b/docs/install/conda/windows-conda_en.md @@ -9,7 +9,7 @@ Before performing PaddlePaddle installation, please make sure that your Anaconda software environment is properly installed. For software download and installation, see Anaconda's official website (https://www.anaconda.com/). If you have installed Anaconda correctly, follow these steps to install PaddlePaddle. * Windows 7/8/10 Pro/Enterprise (64bit) - * GPU Version supportCUDA 10.1/10.2/11.2,且仅支持单卡 +* GPU Version support CUDA 10.1/10.2/11.2/11.6,and only supports single card * conda version 4.8.3+ (64 bit) @@ -49,41 +49,29 @@ conda create -n paddle_env python=3.9 #### 1.1.2 Enter the Anaconda Virtual Environment -for Windows - ``` activate paddle_env ``` -for macOS/Linux - -``` -conda activate paddle_env -``` - -## 1.2 Confirm Other Environments +### 1.2 Confirm Other Environments Confirm that your conda virtual environment and the Python loaction which is preapared to install PaddlePaddle are where you expected them for your computer may have multiple Pythons environments. Enter Anaconda's command line terminal and enter the following command to confirm the Python location. -1.2.1 Depending on your environment, you may need to replace python in all command lines in the instructions with specific Python path. - -In a Windows environment, the command to get the Python path is: +#### 1.2.1 Confirm the installation path of python -``` -where python -``` +Depending on your environment, you may need to replace python in all command lines in the instructions with specific Python path. -In a macOS/Linux environment, the command to get the Python path is: +The command to get the Python path is: ``` -which python +where python ``` -1.2.2 Check the version of Python +#### 1.2.2 Check the version of Python Use the following command to confirm it's version is 3.6/3.7/3.8/3.9 @@ -93,7 +81,9 @@ python --version -1.2.3 Confirm that Python and pip are 64bit, and the processor architecture is x86_64 (or x64, Intel 64, AMD64) architecture. Currently PaddlePaddle does not support arm64 architecture. The first line below print "64bit", the second line prints "x86_64 (or x64, AMD64)." +#### 1.2.3 Check the system environment + +Confirm that Python and pip are 64bit, and the processor architecture is x86_64 (or x64, Intel 64, AMD64) architecture. The first line below print "64bit", the second line prints "x86_64 (or x64, AMD64)." ``` @@ -108,19 +98,20 @@ python -c "import platform;print(platform.architecture()[0]);print(platform.mach We will introduce conda installation here. -### Choose CPU/GPU - -* If your computer doesn't have NVIDIA® GPU, please install [the CPU Version of PaddlePaddle](#cpu) +### Add Tsinghua source (optional) -* If your computer has NVIDIA® GPU, please make sure that the following conditions are met and install [the GPU Version of PaddlePaddle](#gpu) - - * **CUDA toolkit 10.1/10.2 with cuDNN v7.6+** - - * **CUDA toolkit 11.2 with cuDNN v8.1.1(** +For domestic users who cannot connect to the Anaconda official source, you can add Tsinghua source according to the following command. - * **Hardware devices with GPU computing power over 3.5** - 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/) +``` +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 --set show_channel_urls yes +``` ### Installation Step @@ -129,56 +120,49 @@ You can choose the following version of PaddlePaddle to start installation: -#### 2.1 CPU version of PaddlePaddle +#### CPU Version of PaddlePaddle + +If your computer doesn't have NVIDIA® GPU, please install `the CPU Version of PaddlePaddle` ``` -conda install paddlepaddle --channel https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/ +conda install paddlepaddle==2.3.2 --channel https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/ ``` -#### 2.2 GPU version of PaddlePaddle +#### GPU Version of PaddlePaddle -* If you are using CUDA 10.1,cuDNN 7.6+ +* If you are using CUDA 10.1,cuDNN 7 (cuDNN>=7.6.5): ``` - conda install paddlepaddle-gpu==2.1.0 cudatoolkit=10.1 --channel https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/ + conda install paddlepaddle-gpu==2.3.2 cudatoolkit=10.1 --channel https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/ ``` -* If you are usingCUDA 10.2,cuDNN 7.6+: +* If you are usingCUDA 10.2,cuDNN 7 (cuDNN>=7.6.5): ``` - conda install paddlepaddle-gpu==2.1.0 cudatoolkit=10.2 --channel https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/ + conda install paddlepaddle-gpu==2.3.2 cudatoolkit=10.2 --channel https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/ ``` -* If you are using CUDA 11.2,cuDNN 8.1.1+: +* If you are using CUDA 11.2,cuDNN 8.1.1: ``` - conda install paddlepaddle-gpu==2.1.0 cudatoolkit=11.2 -c https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/ -c conda-forge + conda install paddlepaddle-gpu==2.3.2 cudatoolkit=11.2 -c https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/ -c conda-forge ``` +* If you are using CUDA 11.6,cuDNN 8.4.0: -## Verify installation - -After the installation is complete, you can use `python` or `python3` to enter the Python interpreter and then use `import paddle` and `paddle.utils.run_check()` - -If `PaddlePaddle is installed successfully!` appears, to verify that the installation was successful. - + ``` + conda install paddlepaddle-gpu==2.3.2 cudatoolkit=11.6 -c https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/ -c conda-forge + ``` +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/) -## Notice -For domestic users who cannot connect to the Anaconda official source, you can add Tsinghua source according to the following command. +## Verify installation +After the installation is complete, you can use `python` or `python3` to enter the Python interpreter and then use `import paddle` and `paddle.utils.run_check()` -``` -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 --set show_channel_urls yes -``` +If `PaddlePaddle is installed successfully!` appears, to verify that the installation was successful. diff --git a/docs/install/docker/fromdocker.rst b/docs/install/docker/fromdocker.rst index 5f80c8cd003..ddcfa65b9e1 100644 --- a/docs/install/docker/fromdocker.rst +++ b/docs/install/docker/fromdocker.rst @@ -2,7 +2,8 @@ **Docker 安装** =========================== -.. toctree:: +.. toctree:: :maxdepth: 1 + linux-docker.md macos-docker.md diff --git a/docs/install/docker/fromdocker_en.rst b/docs/install/docker/fromdocker_en.rst index d44f176367f..06206eb36e6 100644 --- a/docs/install/docker/fromdocker_en.rst +++ b/docs/install/docker/fromdocker_en.rst @@ -2,7 +2,8 @@ **Install via docker** ============================== -.. toctree:: +.. toctree:: + linux-docker_en.md macos-docker_en.md diff --git a/docs/install/docker/linux-docker.md b/docs/install/docker/linux-docker.md index c65434780bd..5f779708295 100644 --- a/docs/install/docker/linux-docker.md +++ b/docs/install/docker/linux-docker.md @@ -1,120 +1,126 @@ # **Linux 下的 Docker 安装** -[Docker](https://docs.docker.com/install/)是一个开源的应用容器引擎。使用 Docker,既可以将 PaddlePaddle 的安装&使用与系统环境隔离,也可以与主机共享 GPU、网络等资源 +[Docker](https://docs.docker.com/install/)是一个开源的应用容器引擎。使用 Docker,既可以将 PaddlePaddle 的安装&使用与系统环境隔离,也可以与主机共享 GPU、网络等资源。 +以下 Docker 安装与使用流程中,docker 里已经安装好了特定版本的 PaddlePaddle。 ## 环境准备 -- 目前支持的系统类型,请见[安装说明](../index_cn.html),请注意目前暂不支持在 CentOS 6 使用 Docker +- 目前支持的系统类型,请见[安装说明](/documentation/docs/zh/install/index_cn.html),请注意目前暂不支持在 CentOS 6 使用 Docker -- 在本地主机上[安装 Docker](https://hub.docker.com/search/?type=edition&offering=community) +- 在本地主机上[安装 Docker](https://docs.docker.com/engine/install/) - 如需在 Linux 开启 GPU 支持,请[安装 nvidia-docker](https://github.com/NVIDIA/nvidia-docker) -## 安装步骤 - -1. 拉取 PaddlePaddle 镜像 +- 镜像中 Python 版本为 3.7 - * CPU 版的 PaddlePaddle: - ``` - docker pull registry.baidubce.com/paddlepaddle/paddle:[版本号] - ``` +## 安装步骤 - * CPU 版的 PaddlePaddle,且镜像中预装好了 jupyter: - ``` - docker pull registry.baidubce.com/paddlepaddle/paddle:[版本号]-jupyter - ``` +### 1. 拉取 PaddlePaddle 镜像 - * GPU 版的 PaddlePaddle: - ``` - docker pull registry.baidubce.com/paddlepaddle/paddle:[版本号]-gpu-cuda10.2-cudnn7 - ``` +对于国内用户,因为网络问题下载 docker 比较慢时,可使用百度提供的镜像: - 如果您的机器不在中国大陆地区,可以直接从 DockerHub 拉取镜像: +* CPU 版的 PaddlePaddle: + ``` + docker pull registry.baidubce.com/paddlepaddle/paddle:2.3.2 + ``` - * CPU 版的 PaddlePaddle: - ``` - docker pull paddlepaddle/paddle:[版本号] - ``` +* CPU 版的 PaddlePaddle,且镜像中预装好了 jupyter: + ``` + docker pull registry.baidubce.com/paddlepaddle/paddle:2.3.2-jupyter + ``` - * CPU 版的 PaddlePaddle,且镜像中预装好了 jupyter: - ``` - docker pull paddlepaddle/paddle:[版本号]-jupyter - ``` +* GPU 版的 PaddlePaddle: + ``` + nvidia-docker pull registry.baidubce.com/paddlepaddle/paddle:2.3.2-gpu-cuda10.2-cudnn7 + ``` + ``` + nvidia-docker pull registry.baidubce.com/paddlepaddle/paddle:2.3.2-gpu-cuda11.2-cudnn8 + ``` - * GPU 版的 PaddlePaddle: - ``` - docker pull paddlepaddle/paddle:[版本号]-gpu-cuda10.2-cudnn7 - ``` +如果您的机器不在中国大陆地区,可以直接从 DockerHub 拉取镜像: - 在`:`后请您填写 PaddlePaddle 版本号,例如当前版本`2.1.0`,更多请见[镜像简介](#dockers)。 +* CPU 版的 PaddlePaddle: + ``` + docker pull paddlepaddle/paddle:2.3.2 + ``` - 上例中,`cuda10.2-cudnn7` 也仅作示意用,表示安装 GPU 版的镜像。如果您还想安装其他 cuda/cudnn 版本的镜像,可以将其替换成`cuda11.2-cudnn8`等。 +* CPU 版的 PaddlePaddle,且镜像中预装好了 jupyter: + ``` + docker pull paddlepaddle/paddle:2.3.2-jupyter + ``` - 您可以访问[DockerHub](https://hub.docker.com/r/paddlepaddle/paddle/tags/)获取与您机器适配的镜像。 +* GPU 版的 PaddlePaddle: + ``` + nvidia-docker pull paddlepaddle/paddle:2.3.2-gpu-cuda10.2-cudnn7 + ``` + ``` + nvidia-docker pull paddlepaddle/paddle:2.3.2-gpu-cuda11.2-cudnn8 + ``` -2. 构建、进入 Docker 容器 +您还可以访问[DockerHub](https://hub.docker.com/r/paddlepaddle/paddle/tags/)获取更多镜像。 - * 使用 CPU 版本的 PaddlePaddle: +### 2. 构建并进入 docker 容器 +* 使用 CPU 版本的 PaddlePaddle: - ``` - docker run --name [Name of container] -it -v $PWD:/paddle /bin/bash - ``` - > --name [Name of container] 设定 Docker 的名称; + ``` + docker run --name paddle_docker -it -v $PWD:/paddle registry.baidubce.com/paddlepaddle/paddle:2.3.2 /bin/bash + ``` + - `--name paddle_docker`:设定 Docker 的名称,`paddle_docker` 是自己设置的名称; - > -it 参数说明容器已和本机交互式运行; + - `-it`:参数说明容器已和本机交互式运行; - > -v $PWD:/paddle 指定将当前路径(PWD 变量会展开为当前路径的绝对路径)挂载到容器内部的 /paddle 目录; - > `` 指定需要使用的 image 名称,您可以通过`docker images`命令查看;/bin/bash 是在 Docker 中要执行的命令 + - `-v $PWD:/paddle`:指定将当前路径(PWD 变量会展开为当前路径的绝对路径)挂载到容器内部的 /paddle 目录; + - `registry.baidubce.com/paddlepaddle/paddle:2.3.2`:指定需要使用的 image 名称,您可以通过`docker images`命令查看;/bin/bash 是在 Docker 中要执行的命令 - * 使用 CPU 版本的 PaddlePaddle,且镜像中预装好了 jupyter: - ``` - mkdir ./jupyter_docker - ``` - ``` - chmod 777 ./jupyter_docker - ``` - ``` - cd ./jupyter_docker - ``` - ``` - docker run -p 80:80 --rm --env USER_PASSWD=[password you set] -v $PWD:/home/paddle - ``` +* 使用 CPU 版本的 PaddlePaddle,且镜像中预装好了 jupyter: - > --rm 关闭容器后删除容器; + ``` + mkdir ./jupyter_docker + ``` + ``` + chmod 777 ./jupyter_docker + ``` + ``` + cd ./jupyter_docker + ``` + ``` + docker run -p 80:80 --rm --env USER_PASSWD="password you set" -v $PWD:/home/paddle registry.baidubce.com/paddlepaddle/paddle:2.3.2-jupyter + ``` + - `--rm`:关闭容器后删除容器; - > --env USER_PASSWD=[password you set] 为 jupyter 设置登录密码,[password you set] 是自己设置的密码; + - `--env USER_PASSWD="password you set"`:为 jupyter 设置登录密码,`password you set` 是自己设置的密码; - > -v $PWD:/home/paddle 指定将当前路径(PWD 变量会展开为当前路径的绝对路径)挂载到容器内部的 /home/paddle 目录; - > `` 指定需要使用的 image 名称,您可以通过`docker images`命令查看 + - `-v $PWD:/home/paddle`:指定将当前路径(PWD 变量会展开为当前路径的绝对路径)挂载到容器内部的 /home/paddle 目录; - * 使用 GPU 版本的 PaddlePaddle: + - `registry.baidubce.com/paddlepaddle/paddle:2.3.2-jupyter`:指定需要使用的 image 名称,您可以通过`docker images`命令查看 +* 使用 GPU 版本的 PaddlePaddle: - ``` - nvidia-docker run --name [Name of container] -it -v $PWD:/paddle /bin/bash - ``` + ``` + nvidia-docker run --name paddle_docker -it -v $PWD:/paddle registry.baidubce.com/paddlepaddle/paddle:2.3.2-gpu-cuda10.2-cudnn7 /bin/bash + ``` - > --name [Name of container] 设定 Docker 的名称; + - `--name paddle_docker`:设定 Docker 的名称,`paddle_docker` 是自己设置的名称; - > -it 参数说明容器已和本机交互式运行; + - `-it`:参数说明容器已和本机交互式运行; - > -v $PWD:/paddle 指定将当前路径(PWD 变量会展开为当前路径的绝对路径)挂载到容器内部的 /paddle 目录; + - `-v $PWD:/paddle`:指定将当前路径(PWD 变量会展开为当前路径的绝对路径)挂载到容器内部的 /paddle 目录; - > `` 指定需要使用的 image 名称,您可以通过`docker images`命令查看;/bin/bash 是在 Docker 中要执行的命令 + - `registry.baidubce.com/paddlepaddle/paddle:2.3.2-gpu-cuda10.2-cudnn7`:指定需要使用的 image 名称,如果您希望使用 CUDA 11.2 的镜像,也可以将其替换成`registry.baidubce.com/paddlepaddle/paddle:2.3.2-gpu-cuda11.2-cudnn8`。您可以通过`docker images`命令查看镜像。/bin/bash 是在 Docker 中要执行的命令 @@ -122,7 +128,7 @@

-### **镜像简介** +## **镜像简介**

@@ -133,20 +139,20 @@ - - + + - - + + - - + + - - + +
registry.baidubce.com/paddlepaddle/paddle:2.1.0 安装了 2.1.0 版本 paddle 的 CPU 镜像 registry.baidubce.com/paddlepaddle/paddle:2.3.2 安装了 2.3.2 版本 paddle 的 CPU 镜像
registry.baidubce.com/paddlepaddle/paddle:2.1.0-jupyter 安装了 2.1.0 版本 paddle 的 CPU 镜像,且镜像中预装好了 jupyter,启动 docker 即运行 jupyter 服务 registry.baidubce.com/paddlepaddle/paddle:2.3.2-jupyter 安装了 2.3.2 版本 paddle 的 CPU 镜像,且镜像中预装好了 jupyter,启动 docker 即运行 jupyter 服务
registry.baidubce.com/paddlepaddle/paddle:2.1.0-gpu-cuda11.2-cudnn8 安装了 2.1.0 版本 paddle 的 GPU 镜像,cuda 版本为 11.2,cudnn 版本为 8.1 registry.baidubce.com/paddlepaddle/paddle:2.3.2-gpu-cuda11.2-cudnn8 安装了 2.3.2 版本 paddle 的 GPU 镜像,cuda 版本为 11.2,cudnn 版本为 8.1
registry.baidubce.com/paddlepaddle/paddle:2.1.0-gpu-cuda10.2-cudnn7 安装了 2.1.0 版本 paddle 的 GPU 镜像,cuda 版本为 10.2,cudnn 版本为 7 registry.baidubce.com/paddlepaddle/paddle:2.3.2-gpu-cuda10.2-cudnn7 安装了 2.3.2 版本 paddle 的 GPU 镜像,cuda 版本为 10.2,cudnn 版本为 7
@@ -154,22 +160,18 @@ 您可以在 [DockerHub](https://hub.docker.com/r/paddlepaddle/paddle/tags/) 中找到 PaddlePaddle 的各个发行的版本的 docker 镜像。 -### 注意事项 - -* 镜像中 Python 版本为 3.7 - -### 补充说明 +## 补充说明 * 当您需要第二次进入 Docker 容器中,使用如下命令: 启动之前创建的容器 ``` - docker start [Name of container] + docker start ``` 进入启动的容器 ``` - docker attach [Name of container] + docker attach ``` * 如您是 Docker 新手,您可以参考互联网上的资料学习,例如[Docker 教程](http://www.runoob.com/docker/docker-hello-world.html) @@ -188,4 +190,4 @@ pip uninstall paddlepaddle-gpu ``` -或通过`docker rm [Name of container]`来直接删除 Docker 容器 +或通过`docker rm `来直接删除 Docker 容器 diff --git a/docs/install/docker/linux-docker_en.md b/docs/install/docker/linux-docker_en.md index 1bb0141440c..0964ce78143 100644 --- a/docs/install/docker/linux-docker_en.md +++ b/docs/install/docker/linux-docker_en.md @@ -1,128 +1,136 @@ # **Install on Linux via 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 +[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. +In the following Docker installation and use process, a specific version of PaddlePaddle has been installed in docker. ## Environment preparation -- Currently supported system types, please see [Installation instruction](../index_en.html), please note that Docker is not currently supported in CentOS 6 +- Currently supported system types, please see [Installation instruction](/documentation/docs/en/install/index_en.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) +- On the local host [Install Docker](https://docs.docker.com/engine/install/) - To enable GPU support on Linux, please [Install nvidia-docker](https://github.com/NVIDIA/nvidia-docker) +- Python version in the image is 3.7 + ## Installation steps -1. Pull PaddlePaddle image +### 1. Pull PaddlePaddle image - * CPU version of PaddlePaddle: - ``` - docker pull registry.baidubce.com/paddlepaddle/paddle:[version number] - ``` +For domestic users, when downloading docker is slow due to network problems, you can use the mirror provided by Baidu: - * CPU version of PaddlePaddle, and the image is pre-installed with jupyter: - ``` - docker pull registry.baidubce.com/paddlepaddle/paddle:[version number]-jupyter - ``` +* CPU version of PaddlePaddle: + ``` + docker pull registry.baidubce.com/paddlepaddle/paddle:2.3.2 + ``` - * GPU version of PaddlePaddle: - ``` - docker pull registry.baidubce.com/paddlepaddle/paddle:[version number]-gpu-cuda10.2-cudnn7 - ``` +* CPU version of PaddlePaddle, and the image is pre-installed with jupyter: + ``` + docker pull registry.baidubce.com/paddlepaddle/paddle:2.3.2-jupyter + ``` - If your machine is not in mainland China, you can pull the image directly from DockerHub: +* GPU version of PaddlePaddle: + ``` + nvidia-docker pull registry.baidubce.com/paddlepaddle/paddle:2.3.2-gpu-cuda10.2-cudnn7 + ``` + ``` + nvidia-docker pull registry.baidubce.com/paddlepaddle/paddle:2.3.2-gpu-cuda11.2-cudnn8 + ``` - * CPU version of PaddlePaddle: - ``` - docker pull paddlepaddle/paddle:[version number] - ``` +If your machine is not in mainland China, you can pull the image directly from DockerHub: - * CPU version of PaddlePaddle, and the image is pre-installed with jupyter: - ``` - docker pull paddlepaddle/paddle:[version number]-jupyter - ``` +* CPU version of PaddlePaddle: + ``` + docker pull paddlepaddle/paddle:2.3.2 + ``` - * GPU version of PaddlePaddle: - ``` - docker pull paddlepaddle/paddle:[version number]-gpu-cuda10.2-cudnn7 - ``` +* CPU version of PaddlePaddle, and the image is pre-installed with jupyter: + ``` + docker pull paddlepaddle/paddle:2.3.2-jupyter + ``` - After `:`, please fill in the PaddlePaddle version number, such as the current version `2.1.0`. For more details, please refer to [image profile](#dockers). +* GPU version of PaddlePaddle: + ``` + nvidia-docker pull paddlepaddle/paddle:2.3.2-gpu-cuda10.2-cudnn7 + ``` + ``` + nvidia-docker pull paddlepaddle/paddle:2.3.2-gpu-cuda11.2-cudnn8 + ``` - In the above example, `cuda10.2-cudnn7` is only for illustration, indicating that the GPU version of the image is installed. If you want to install another `cuda/cudnn` version of the image, you can replace it with `cuda11.2-cudnn8` etc. +You can see [DockerHub](https://hub.docker.com/r/paddlepaddle/paddle/tags/) to get more images. - 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 -2. Build and enter Docker container +* Use CPU version of PaddlePaddle: - * Use CPU version of PaddlePaddle: + ``` + docker run --name paddle_docker -it -v $PWD:/paddle registry.baidubce.com/paddlepaddle/paddle:2.3.2 /bin/bash + ``` - ``` - docker run --name [Name of container] -it -v $PWD:/paddle /bin/bash - ``` + - `--name paddle_docker`: set name of Docker, `paddle_docker` is name of docker you set; - > --name [Name of container] set name of Docker; + - `-it`: The parameter indicates that the container has been operated interactively with the local machine; - > -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; - > -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; + - `registry.baidubce.com/paddlepaddle/paddle:2.3.2`: 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 - > `` 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: - * Use GPU version of PaddlePaddle: + ``` + nvidia-docker run --name paddle_docker -it -v $PWD:/paddle registry.baidubce.com/paddlepaddle/paddle:2.3.2-gpu-cuda10.2-cudnn7 /bin/bash + ``` - ``` - nvidia-docker run --name [Name of container] -it -v $PWD:/paddle /bin/bash - ``` + - `--name paddle_docker`: set name of Docker, `paddle_docker` is name of docker you set; - > --name [Name of container] set name of Docker; + - `-it`: The parameter indicates that the container has been operated interactively with the local machine; - > -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; - > -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; + - `registry.baidubce.com/paddlepaddle/paddle:2.3.2-gpu-cuda10.2-cudnn7`: 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 - > `` 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 CPU version of PaddlePaddle: +* Use CPU version of PaddlePaddle with jupyter: - ``` - mkdir ./jupyter_docker - ``` - ``` - chmod 777 ./jupyter_docker - ``` - ``` - cd ./jupyter_docker - ``` - ``` - docker run -p 80:80 --rm --env USER_PASSWD=[password you set] -v $PWD:/home/paddle - ``` + ``` + mkdir ./jupyter_docker + ``` + ``` + chmod 777 ./jupyter_docker + ``` + ``` + cd ./jupyter_docker + ``` + ``` + docker run -p 80:80 --rm --env USER_PASSWD="password you set" -v $PWD:/home/paddle registry.baidubce.com/paddlepaddle/paddle:2.3.2-jupyter + ``` - > --rm Delete the container after closing it; + - `--rm`: Delete the container after closing it; - > --env USER_PASSWD=[password you set] Set the login password for jupyter, [password you set] is the password you set; + - `--env USER_PASSWD="password you set"`: Set the login password for jupyter, `password you set` is the password you set; - > -v $PWD:/home/paddle Specifies to mount the current path (the PWD variable will be expanded to the absolute path of the current path) to the /home/paddle directory inside the container; + - `-v $PWD:/home/paddle`: Specifies to mount the current path (the PWD variable will be expanded to the absolute path of the current path) to the /home/paddle directory inside the container; - > `` Specify the name of the image to be used, you can view it through the `docker images` command + - `registry.baidubce.com/paddlepaddle/paddle:2.3.2-jupyter`: Specify the name of the image to be used, you can view it through the `docker images` command 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** +## **Introduction to mirror images**

@@ -133,20 +141,20 @@ Now you have successfully used Docker to install PaddlePaddle. For more informat - - + + - - + + - - + + - - + +
registry.baidubce.com/paddlepaddle/paddle:2.1.0 CPU image with 2.1.0 version of paddle installed registry.baidubce.com/paddlepaddle/paddle:2.3.2 CPU image with 2.3.2 version of paddle installed
registry.baidubce.com/paddlepaddle/paddle:2.1.0-jupyter CPU image of paddle version 2.1.0 is installed, and jupyter is pre-installed in the image. Start the docker to run the jupyter service registry.baidubce.com/paddlepaddle/paddle:2.3.2-jupyter CPU image of paddle version 2.3.2 is installed, and jupyter is pre-installed in the image. Start the docker to run the jupyter service
registry.baidubce.com/paddlepaddle/paddle:2.1.0-gpu-cuda11.2-cudnn8 GPU image of paddle version 2.1.0 is installed, cuda version is 11.2, cudnn version is 8.1 registry.baidubce.com/paddlepaddle/paddle:2.3.2-gpu-cuda11.2-cudnn8 GPU image of paddle version 2.3.2 is installed, cuda version is 11.2, cudnn version is 8.1
registry.baidubce.com/paddlepaddle/paddle:2.1.0-gpu-cuda10.2-cudnn7 GPU image of paddle version 2.1.0 is installed, cuda version is 10.2, cudnn version is 7 registry.baidubce.com/paddlepaddle/paddle:2.3.2-gpu-cuda10.2-cudnn7 GPU image of paddle version 2.3.2 is installed, cuda version is 10.2, cudnn version is 7
@@ -155,22 +163,18 @@ Now you have successfully used Docker to install PaddlePaddle. For more informat 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 3.7 - -### 补充说明 +## Supplement * 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] + docker start ``` Enter the starting container ``` - docker attach [Name of container] + docker attach ``` * 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) @@ -189,4 +193,4 @@ After entering the Docker container, execute the following command: pip uninstall paddlepaddle-gpu ``` -Or delete the docker container directly through `docker rm [Name of container]` +Or delete the docker container directly through `docker rm ` diff --git a/docs/install/docker/macos-docker.md b/docs/install/docker/macos-docker.md index b967f944cac..069da618e41 100644 --- a/docs/install/docker/macos-docker.md +++ b/docs/install/docker/macos-docker.md @@ -1,85 +1,90 @@ -# **macOS 下的 Docker 安装** +# **MacOS 下的 Docker 安装** -[Docker](https://docs.docker.com/install/)是一个开源的应用容器引擎。使用 Docker,既可以将 PaddlePaddle 的安装&使用与系统环境隔离,也可以与主机共享 GPU、网络等资源 +[Docker](https://docs.docker.com/install/)是一个开源的应用容器引擎。使用 Docker,既可以将 PaddlePaddle 的安装&使用与系统环境隔离,也可以与主机共享 GPU、网络等资源。 +以下 Docker 安装与使用流程中,docker 里已经安装好了特定版本的 PaddlePaddle。 ## 环境准备 -- macOS 版本 10.11/10.12/10.13/10.14 (64 bit) (不支持 GPU 版本) +- MacOS 版本 10.x/11.x (64 bit) (不支持 GPU 版本) -- 在本地主机上[安装 Docker](https://hub.docker.com/search/?type=edition&offering=community) +- 在本地主机上[安装 Docker](https://docs.docker.com/engine/install/) + +- 镜像中 Python 版本为 3.7 ## 安装步骤 -1. 拉取 PaddlePaddle 镜像 +### 1. 拉取 PaddlePaddle 镜像 - * CPU 版的 PaddlePaddle: - ``` - docker pull registry.baidubce.com/paddlepaddle/paddle:[版本号] - ``` +对于国内用户,因为网络问题下载 docker 比较慢时,可使用百度提供的镜像: - * CPU 版的 PaddlePaddle,且镜像中预装好了 jupyter: - ``` - docker pull registry.baidubce.com/paddlepaddle/paddle:[版本号]-jupyter - ``` +* CPU 版的 PaddlePaddle: + ``` + docker pull registry.baidubce.com/paddlepaddle/paddle:2.3.2 + ``` - 如果您的机器不在中国大陆地区,可以直接从 DockerHub 拉取镜像: +* CPU 版的 PaddlePaddle,且镜像中预装好了 jupyter: + ``` + docker pull registry.baidubce.com/paddlepaddle/paddle:2.3.2-jupyter + ``` - * CPU 版的 PaddlePaddle: - ``` - docker pull paddlepaddle/paddle:[版本号] - ``` +如果您的机器不在中国大陆地区,可以直接从 DockerHub 拉取镜像: - * CPU 版的 PaddlePaddle,且镜像中预装好了 jupyter: - ``` - docker pull paddlepaddle/paddle:[版本号]-jupyter - ``` +* CPU 版的 PaddlePaddle: + ``` + docker pull paddlepaddle/paddle:2.3.2 + ``` - 在`:`后请您填写 PaddlePaddle 版本号,您可以访问[DockerHub](https://hub.docker.com/r/paddlepaddle/paddle/tags/)获取与您机器适配的镜像。 +* CPU 版的 PaddlePaddle,且镜像中预装好了 jupyter: + ``` + docker pull paddlepaddle/paddle:2.3.2-jupyter + ``` + +您还可以访问[DockerHub](https://hub.docker.com/r/paddlepaddle/paddle/tags/)获取更多镜像。 -2. 构建、进入 Docker 容器 +### 2. 构建并进入 docker 容器 - * 使用 CPU 版本的 PaddlePaddle: +* 使用 CPU 版本的 PaddlePaddle: - ``` - docker run --name [Name of container] -it -v $PWD:/paddle /bin/bash - ``` + ``` + docker run --name paddle_docker -it -v $PWD:/paddle registry.baidubce.com/paddlepaddle/paddle:2.3.2 /bin/bash + ``` - > --name [Name of container] 设定 Docker 的名称; + - `--name paddle_docker`:设定 Docker 的名称,`paddle_docker` 是自己设置的名称; - > -it 参数说明容器已和本机交互式运行; + - `-it`:参数说明容器已和本机交互式运行; - > -v $PWD:/paddle 指定将当前路径(PWD 变量会展开为当前路径的绝对路径)挂载到容器内部的 /paddle 目录; + - `-v $PWD:/paddle`:指定将当前路径(PWD 变量会展开为当前路径的绝对路径)挂载到容器内部的 /paddle 目录; - > `` 指定需要使用的 image 名称,您可以通过`docker images`命令查看;/bin/bash 是在 Docker 中要执行的命令 + - `registry.baidubce.com/paddlepaddle/paddle:2.3.2`:指定需要使用的 image 名称,您可以通过`docker images`命令查看;/bin/bash 是在 Docker 中要执行的命令 - * 使用 CPU 版本的 PaddlePaddle,且镜像中预装好了 jupyter: +* 使用 CPU 版本的 PaddlePaddle,且镜像中预装好了 jupyter: - ``` - mkdir ./jupyter_docker - ``` - ``` - chmod 777 ./jupyter_docker - ``` - ``` - cd ./jupyter_docker - ``` - ``` - docker run -p 80:80 --rm --env USER_PASSWD=[password you set] -v $PWD:/home/paddle - ``` + ``` + mkdir ./jupyter_docker + ``` + ``` + chmod 777 ./jupyter_docker + ``` + ``` + cd ./jupyter_docker + ``` + ``` + docker run -p 80:80 --rm --env USER_PASSWD="password you set" -v $PWD:/home/paddle registry.baidubce.com/paddlepaddle/paddle:2.3.2-jupyter + ``` - > --rm 关闭容器后删除容器; + - `--rm`:关闭容器后删除容器; - > --env USER_PASSWD=[password you set] 为 jupyter 设置登录密码,[password you set] 是自己设置的密码; + - `--env USER_PASSWD="password you set"`:为 jupyter 设置登录密码,`password you set` 是自己设置的密码; - > -v $PWD:/home/paddle 指定将当前路径(PWD 变量会展开为当前路径的绝对路径)挂载到容器内部的 /home/paddle 目录; + - `-v $PWD:/home/paddle`:指定将当前路径(PWD 变量会展开为当前路径的绝对路径)挂载到容器内部的 /home/paddle 目录; - > `` 指定需要使用的 image 名称,您可以通过`docker images`命令查看 + - `registry.baidubce.com/paddlepaddle/paddle:2.3.2-jupyter`:指定需要使用的 image 名称,您可以通过`docker images`命令查看 @@ -88,7 +93,7 @@

-### **镜像简介** +## **镜像简介**

@@ -99,12 +104,20 @@ - - + + - - + + + + + + + + + +
registry.baidubce.com/paddlepaddle/paddle:2.1.0 安装了 2.1.0 版本 paddle 的 CPU 镜像 registry.baidubce.com/paddlepaddle/paddle:2.3.2 安装了 2.3.2 版本 paddle 的 CPU 镜像
registry.baidubce.com/paddlepaddle/paddle:2.1.0-jupyter 安装了 2.1.0 版本 paddle 的 CPU 镜像,且镜像中预装好了 jupyter,启动 docker 即运行 jupyter 服务 registry.baidubce.com/paddlepaddle/paddle:2.3.2-jupyter 安装了 2.3.2 版本 paddle 的 CPU 镜像,且镜像中预装好了 jupyter,启动 docker 即运行 jupyter 服务
registry.baidubce.com/paddlepaddle/paddle:2.3.2-gpu-cuda11.2-cudnn8 安装了 2.3.2 版本 paddle 的 GPU 镜像,cuda 版本为 11.2,cudnn 版本为 8.1
registry.baidubce.com/paddlepaddle/paddle:2.3.2-gpu-cuda10.2-cudnn7 安装了 2.3.2 版本 paddle 的 GPU 镜像,cuda 版本为 10.2,cudnn 版本为 7
@@ -113,22 +126,18 @@ 您可以在 [DockerHub](https://hub.docker.com/r/paddlepaddle/paddle/tags/) 中找到 PaddlePaddle 的各个发行的版本的 docker 镜像。 -### 注意事项 - -* 镜像中 Python 版本为 3.7 - -### 补充说明 +## 补充说明 * 当您需要第二次进入 Docker 容器中,使用如下命令: 启动之前创建的容器 ``` - docker start [Name of container] + docker start ``` 进入启动的容器 ``` - docker attach [Name of container] + docker attach ``` * 如您是 Docker 新手,您可以参考互联网上的资料学习,例如[Docker 教程](http://www.runoob.com/docker/docker-hello-world.html) @@ -142,4 +151,4 @@ pip uninstall paddlepaddle ``` -或通过`docker rm [Name of container]`来直接删除 Docker 容器 +或通过`docker rm `来直接删除 Docker 容器 diff --git a/docs/install/docker/macos-docker_en.md b/docs/install/docker/macos-docker_en.md index fcbe3eff72d..ab9730d5568 100644 --- a/docs/install/docker/macos-docker_en.md +++ b/docs/install/docker/macos-docker_en.md @@ -1,85 +1,92 @@ -# **Install on macOS via Docker** +# **Install on MacOS via 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 +[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. +In the following Docker installation and use process, a specific version of PaddlePaddle has been installed in docker. ## Environment preparation -- macOS version 10.11/10.12/10.13/10.14 (64 bit)(not support GPU version) +- MacOS version 10.x/11.x (64 bit)(not support GPU version) -- On the local host [Install Docker](https://hub.docker.com/search/?type=edition&offering=community) +- On the local host [Install Docker](https://docs.docker.com/engine/install/) + +- Python version in the image is 3.7 ## Installation steps -1. Pull PaddlePaddle image +### 1. Pull PaddlePaddle image + +For domestic users, when downloading docker is slow due to network problems, you can use the mirror provided by Baidu: - * CPU version of PaddlePaddle: - ``` - docker pull registry.baidubce.com/paddlepaddle/paddle:[version number] - ``` +* CPU version of PaddlePaddle: + ``` + docker pull registry.baidubce.com/paddlepaddle/paddle:2.3.2 + ``` + +* CPU version of PaddlePaddle, and the image is pre-installed with jupyter: + ``` + docker pull registry.baidubce.com/paddlepaddle/paddle:2.3.2-jupyter + ``` - * CPU version of PaddlePaddle, and the image is pre-installed with jupyter: - ``` - docker pull registry.baidubce.com/paddlepaddle/paddle:[version number]-jupyter - ``` +If your machine is not in mainland China, you can pull the image directly from DockerHub: - If your machine is not in mainland China, you can pull the image directly from DockerHub: +* CPU version of PaddlePaddle: + ``` + docker pull paddlepaddle/paddle:2.3.2 + ``` - * CPU version of PaddlePaddle: - ``` - docker pull paddlepaddle/paddle:[version number] - ``` +* CPU version of PaddlePaddle, and the image is pre-installed with jupyter: + ``` + docker pull paddlepaddle/paddle:2.3.2-jupyter + ``` - * CPU version of PaddlePaddle, and the image is pre-installed with jupyter: - ``` - docker pull paddlepaddle/paddle:[version number]-jupyter +You can see [DockerHub](https://hub.docker.com/r/paddlepaddle/paddle/tags/) to get more images. - After `:`please fill in the PaddlePaddle version number, 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 -2. Build and enter Docker container +* Use CPU version of PaddlePaddle: - * Use CPU version of PaddlePaddle: + ``` + docker run --name paddle_docker -it -v $PWD:/paddle registry.baidubce.com/paddlepaddle/paddle:2.3.2 /bin/bash + ``` - ``` - docker run --name [Name of container] -it -v $PWD:/paddle /bin/bash - ``` + - `--name paddle_docker`: set name of Docker, `paddle_docker` is name of docker you set; - > --name [Name of container] set name of Docker; + - `-it`: The parameter indicates that the container has been operated interactively with the local machine; - > -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; - > -v $PWD:/paddle specifies to mount the current path of the host (PWD variable will expand to the absolute path of the current path) to the /paddle directory inside the container; + - `registry.baidubce.com/paddlepaddle/paddle:2.3.2`: 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 - > `` 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 CPU version of PaddlePaddle: +* Use CPU version of PaddlePaddle with jupyter: - ``` - mkdir ./jupyter_docker - ``` - ``` - chmod 777 ./jupyter_docker - ``` - ``` - cd ./jupyter_docker - ``` - ``` - docker run -p 80:80 --rm --env USER_PASSWD=[password you set] -v $PWD:/home/paddle - ``` + ``` + mkdir ./jupyter_docker + ``` + ``` + chmod 777 ./jupyter_docker + ``` + ``` + cd ./jupyter_docker + ``` + ``` + docker run -p 80:80 --rm --env USER_PASSWD="password you set" -v $PWD:/home/paddle registry.baidubce.com/paddlepaddle/paddle:2.3.2-jupyter + ``` - > --rm Delete the container after closing it; + - `--rm`: Delete the container after closing it; - > --env USER_PASSWD=[password you set] Set the login password for jupyter, [password you set] is the password you set; + - `--env USER_PASSWD="password you set"`: Set the login password for jupyter, `password you set` is the password you set; - > -v $PWD:/home/paddle Specifies to mount the current path (the PWD variable will be expanded to the absolute path of the current path) to the /home/paddle directory inside the container; + - `-v $PWD:/home/paddle`: Specifies to mount the current path (the PWD variable will be expanded to the absolute path of the current path) to the /home/paddle directory inside the container; - > `` Specify the name of the image to be used, you can view it through the `docker images` command + - `registry.baidubce.com/paddlepaddle/paddle:2.3.2-jupyter`: Specify the name of the image to be used, you can view it through the `docker images` command @@ -87,7 +94,7 @@ Now you have successfully used Docker to install PaddlePaddle. For more informat

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

@@ -98,12 +105,20 @@ Now you have successfully used Docker to install PaddlePaddle. For more informat - - + + - - + + + + + + + + + +
registry.baidubce.com/paddlepaddle/paddle:2.1.0 CPU image with 2.1.0 version of paddle installed registry.baidubce.com/paddlepaddle/paddle:2.3.2 CPU image with 2.3.2 version of paddle installed
registry.baidubce.com/paddlepaddle/paddle:2.1.0-jupyter CPU image of paddle version 2.1.0 is installed, and jupyter is pre-installed in the image. Start the docker to run the jupyter service registry.baidubce.com/paddlepaddle/paddle:2.3.2-jupyter CPU image of paddle version 2.3.2 is installed, and jupyter is pre-installed in the image. Start the docker to run the jupyter service
registry.baidubce.com/paddlepaddle/paddle:2.3.2-gpu-cuda11.2-cudnn8 GPU image of paddle version 2.3.2 is installed, cuda version is 11.2, cudnn version is 8.1
registry.baidubce.com/paddlepaddle/paddle:2.3.2-gpu-cuda10.2-cudnn7 GPU image of paddle version 2.3.2 is installed, cuda version is 10.2, cudnn version is 7
@@ -111,23 +126,18 @@ Now you have successfully used Docker to install PaddlePaddle. For more informat 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 3.7 - -### 补充说明 +## Supplement * 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] + docker start ``` Enter the starting container ``` - docker attach [Name of container] + docker attach ``` * 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) @@ -141,4 +151,4 @@ After entering the Docker container, execute the following command: pip uninstall paddlepaddle ``` -Or delete the docker container directly through `docker rm [Name of container]` +Or delete the docker container directly through `docker rm ` diff --git a/docs/install/index_cn.rst b/docs/install/index_cn.rst index 2df915dbda2..0f15fc3fd28 100644 --- a/docs/install/index_cn.rst +++ b/docs/install/index_cn.rst @@ -5,18 +5,6 @@ ========= ------------ - 重要更新 ------------ - -* 新增对 python3.9 的支持,并不再支持 python2.7 和 python3.5 -* 新增对 CUDA 11.2 的支持,并不再支持 CUDA 9.0、CUDA 10.0 和 CUDA 11.0 -* 新增对 ROCm 平台的支持(2.1 中飞桨对 ROCm 平台的支持是 experimental 的) -* Linux 系统相关的包已被拆分为 avx 和 noavx 两种类型的包(大部分机器都使用 avx 指令集,可使用 `Linux 下的 PIP 安装 `_ 页面中的命令查看您的机器是否支持) -* 新增预装好 jupyter 的 CPU 镜像,启动镜像后即启动 jupyter 服务 -* 新增支持 Windows Visual Studio 2017 编译,由 VS2015 全面升级至 VS2017 - - ----------- 安装说明 ----------- @@ -26,7 +14,7 @@ **1. 操作系统要求:** * Windows 7 / 8 / 10,专业版 / 企业版 -* Ubuntu 16.04 / 18.04 +* Ubuntu 16.04 / 18.04 / 20.04 * CentOS 7 * MacOS 10.11 / 10.12 / 10.13 / 10.14 * 操作系统要求是 64 位版本 @@ -34,18 +22,18 @@ **2. 处理器要求** * 处理器支持 MKL -* 处理器架构是 x86_64(或称作 x64、Intel 64、AMD64)架构,目前 PaddlePaddle 不支持 arm64 架构 +* 处理器架构是 x86_64(或称作 x64、Intel 64、AMD64)架构,目前 PaddlePaddle 不支持 arm64 架构(mac M1 除外,paddle 已支持 Mac M1 芯片) **3. Python 和 pip 版本要求:** -* Python 的版本要求 3.6/3.7/3.8/3.9 +* Python 的版本要求 3.6/3.7/3.8/3.9/3.10 * Python 具有 pip, 且 pip 的版本要求 20.2.2+ * Python 和 pip 要求是 64 位版本 **4. PaddlePaddle 对 GPU 支持情况:** * 目前 **PaddlePaddle** 支持 **NVIDIA** 显卡的 **CUDA** 驱动和 **AMD** 显卡的 **ROCm** 架构 -* 需要安装 `cuDNN `_ ,版本要求 7.6+(For CUDA10.1/10.2) +* 需要安装 `cuDNN `_ ,版本要求 7.6(For CUDA10.1/10.2) * 如果您需要 GPU 多卡模式,需要安装 `NCCL 2 `_ * 仅 Ubuntu/CentOS 支持 NCCL 2 技术 @@ -53,21 +41,20 @@ * Windows 安装 GPU 版本 - * Windows 7/8/10 支持 CUDA 10.1/10.2/11.2 单卡模式 + * Windows 7/8/10 支持 CUDA 10.1/10.2/11.1/11.2/11.6 单卡模式 * 不支持 **nvidia-docker** 方式安装 * Ubuntu 安装 GPU 版本 - * Ubuntu 16.04 支持 CUDA 10.1/10.2/11.2 - * Ubuntu 18.04 支持 CUDA 10.1/10.2/11.2 + * Ubuntu 16.04/18.04/20.04 支持 CUDA 10.1/10.2/11.1/11.2/11.6 * 如果您是使用 **nvidia-docker** 安装,支持 CUDA 10.2/11.2 * CentOS 安装 GPU 版本 * 如果您是使用本机 **pip** 安装: - * CentOS 7 支持 CUDA 10.1/10.2/11.2 + * CentOS 7 支持 CUDA 10.1/10.2/11.1/11.2/11.6 * 如果您是使用本机源码编译安装: - * CentOS 7 支持 CUDA 10.1/10.2/11.2 + * CentOS 7 支持 CUDA 10.1/10.2/11.1/11.2/11.6 * CentOS 6 不推荐,不提供编译出现问题时的官方支持 * 如果您是使用 **nvidia-docker** 安装,在 CentOS 7 下支持 CUDA 10.2/11.2 * MacOS 不支持:MacOS 平台不支持 GPU 安装 @@ -81,10 +68,7 @@ * 不支持 NCCL * Ubuntu 支持情况 - * Ubuntu 16.04: - - * CUDA10.1 下支持 NCCL v2.4.2-v2.4.8 - * Ubuntu 18.04: + * Ubuntu 16.04/18.04/20.04: * CUDA10.1 下支持 NCCL v2.4.2-v2.4.8 * CentOS 支持情况 @@ -126,7 +110,7 @@ 4. 检查 Python 的版本 - 使用以下命令确认是 3.6/3.7/3.8/3.9 + 使用以下命令确认是 3.6/3.7/3.8/3.9/3.10 :: python --version @@ -139,7 +123,7 @@ python -m pip --version -6. 确认 Python 和 pip 是 64 bit,并且处理器架构是 x86_64(或称作 x64、Intel 64、AMD64)架构,目前 PaddlePaddle 不支持 arm64 架构。下面的第一行输出的是 "64bit" ,第二行输出的是 "x86_64" 、 "x64" 或 "AMD64" 即可: +6. 确认 Python 和 pip 是 64 bit,并且处理器架构是 x86_64(或称作 x64、Intel 64、AMD64)架构,目前 PaddlePaddle 不支持 arm64 架构(mac M1 除外,paddle 已支持 Mac M1 芯片)。下面的第一行输出的是 "64bit" ,第二行输出的是 "x86_64" 、 "x64" 或 "AMD64" 即可: :: @@ -153,11 +137,11 @@ 安装 CPU 版本的命令为: :: - python -m pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple + python -m pip install paddlepaddle==2.3.2 -i https://mirror.baidu.com/pypi/simple 或 - python -m pip install paddlepaddle -i https://pypi.tuna.tsinghua.edu.cn/simple + python -m pip install paddlepaddle==2.3.2 -i https://pypi.tuna.tsinghua.edu.cn/simple (2). **GPU 版本** :如果您想使用 GPU 版本请参考如下命令安装 @@ -169,11 +153,11 @@ 请注意用以下指令安装的 PaddlePaddle 在 Windows、Ubuntu、CentOS 下只支持 CUDA10.2: :: - python -m pip install paddlepaddle-gpu -i https://mirror.baidu.com/pypi/simple + python -m pip install paddlepaddle-gpu==2.3.2 -i https://mirror.baidu.com/pypi/simple 或 - python -m pip install paddlepaddle-gpu -i https://pypi.tuna.tsinghua.edu.cn/simple + python -m pip install paddlepaddle-gpu==2.3.2 -i https://pypi.tuna.tsinghua.edu.cn/simple 请确认需要安装 PaddlePaddle 的 Python 是您预期的位置,因为您计算机可能有多个 Python。根据您的环境您可能需要将说明中所有命令行中的 python 替换为具体的 Python 路径。 @@ -199,12 +183,14 @@ - 如果您有开发 PaddlePaddle 的需求,请参考:`从源码编译 `_ -.. toctree:: - :hidden: +.. toctree:: + :hidden: - pip/frompip.rst - compile/fromsource.rst - install_Kunlun_zh.md - install_ROCM_zh.md - instalL_NGC_PaddlePaddle_ch.rst - Tables.md + pip/frompip.rst + conda/fromconda.rst + docker/fromdocker.rst + compile/fromsource.rst + install_Kunlun_zh.md + install_ROCM_zh.md + install_NGC_PaddlePaddle_ch.rst + Tables.md diff --git a/docs/install/index_en.rst b/docs/install/index_en.rst index 412b8d4040b..bd0385d3cd9 100644 --- a/docs/install/index_en.rst +++ b/docs/install/index_en.rst @@ -5,17 +5,6 @@ ======================= ----------------------- - Important updates ----------------------- - -* Add support for python3.9, and no longer supports python2.7 and python3.5 -* Add support for CUDA 11.2, and no longer supports CUDA 9.0, CUDA 10.0 and CUDA 11.0 -* Add support for ROCm platform (2.1 Paddle's support for ROCm platform is experimental) -* Linux system-related packages have been split into two types of packages, avx and noavx (Most machines use the avx instruction set. You can check whether your machine supports it through commands on the `PIP installation under Linux `_ page ) -* Add a CPU image with jupyter pre-installed. Jupyter service will be started after starting the image -* Added support for Windows Visual Studio 2017 compilation, fully upgraded from VS2015 to VS2017 - ------------------------ Installation Manuals @@ -28,7 +17,7 @@ The manuals will guide you to build and install PaddlePaddle on your 64-bit desk >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> * Windows 7 / 8 / 10, Pro/Enterprise -* Ubuntu 16.04 / 18.04 +* Ubuntu 16.04 / 18.04 / 20.04 * CentOS 7 * MacOS 10.11 / 10.12 / 10.13 / 10.14 * 64-bit operating system is required @@ -42,7 +31,7 @@ The manuals will guide you to build and install PaddlePaddle on your 64-bit desk 3. Version requirements of python and pip: >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> -* Python requires version 3.6/3.7/3.8/3.9 +* Python requires version 3.6/3.7/3.8/3.9/3.10 * Python needs pip, and pip requires version 20.2.2 or above * Python and pip requires 64-bit @@ -50,7 +39,7 @@ The manuals will guide you to build and install PaddlePaddle on your 64-bit desk >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> * Currently, **PaddlePaddle** supports **CUDA** driver of **NVIDIA** graphics card and **ROCm** driver of **AMD** card. -* You need to install `cuDNN `_ , and version 7.6+ is required(For CUDA10.1/10.2) +* You need to install `cuDNN `_ , and version 7.6 is required(For CUDA10.1/10.2) * If you need GPU multi-card mode, you need to install `NCCL 2 `_ * Only Ubuntu/CentOS support NCCL 2 @@ -58,21 +47,20 @@ The manuals will guide you to build and install PaddlePaddle on your 64-bit desk * Windows install GPU version - * Windows 7 / 8 / 10 support CUDA 10.1/10.2/11.2 single-card mode, but don't support CUDA 9.1/9.2/10.1 + * Windows 7 / 8 / 10 support CUDA 10.1/10.2/11.1/11.2/11.6 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 - * Ubuntu 16.04 supports CUDA 10.1/10.2/11.2 - * Ubuntu 18.04 supports CUDA 10.1/10.2/11.2 + * Ubuntu 16.04 / 18.04 / 20.04 supports CUDA 10.1/10.2/11.1/11.2/11.6 * If you install using **nvidia-docker** , it supports CUDA 10.2/11.2 * CentOS install GPU version * If you install using native **pip** : - * CentOS 7 supports CUDA 10.1/10.2/11.2 + * CentOS 7 supports CUDA 10.1/10.2/11.1/11.2/11.6 * If you compile and install using native source code: - * CentOS 7 supports CUDA 10.1/10.2/11.2 + * CentOS 7 supports CUDA 10.1/10.2/11.1/11.2/11.6 * If you install using **nvidia-docker** , CentOS 7 supports CUDA 10.2/11.2 * MacOS isn't supported: PaddlePaddle has no GPU support in Mac OS platform @@ -86,12 +74,9 @@ Please make sure your environment meets the above conditions. If you have other * not support NCCL * Support for Ubuntu - * Ubuntu 16.04: + * Ubuntu 16.04 / 18.04 / 20.04: * support NCCL v2.4.2-v2.4.8 under CUDA10.1 - * Ubuntu 18.04: - - * support v2.4.2-v2.4.8 under CUDA10.1 * Support for CentOS * CentOS 6: not support NCCL @@ -133,7 +118,7 @@ This section describes how to use pip to install. 4. Check the version of Python - Confirm the Python is 3.6/3.7/3.8/3.9 using command + Confirm the Python is 3.6/3.7/3.8/3.9/3.10 using command :: python --version @@ -160,11 +145,11 @@ This section describes how to use pip to install. Command to install CPU version is: :: - python -m pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple + python -m pip install paddlepaddle==2.3.2 -i https://mirror.baidu.com/pypi/simple or - python -m pip install paddlepaddle -i https://pypi.tuna.tsinghua.edu.cn/simple + python -m pip install paddlepaddle==2.3.2 -i https://pypi.tuna.tsinghua.edu.cn/simple (2). **GPU version** : If you only want to install GPU version, please refer to command below @@ -177,11 +162,11 @@ This section describes how to use pip to install. Please attention that PaddlePaddle installed through command below only supports CUDA10.2 under Windows、Ubuntu、CentOS: :: - python -m pip install paddlepaddle-gpu -i https://mirror.baidu.com/pypi/simple + python -m pip install paddlepaddle-gpu==2.3.2 -i https://mirror.baidu.com/pypi/simple or - python -m pip install paddlepaddle-gpu -i https://pypi.tuna.tsinghua.edu.cn/simple + python -m pip install paddlepaddle-gpu==2.3.2 -i https://pypi.tuna.tsinghua.edu.cn/simple Please confirm that the Python where you need to install PaddlePaddle is your expected location, because your computer may have multiple Python. Depending on the environment, you may need to replace Python in all command lines in the instructions with Python 3 or specific Python path. @@ -208,10 +193,12 @@ The second way to install: compile and install with source code - If you use PaddlePaddle only, we suggest you installation methods **pip** to install. - If you need to develop PaddlePaddle, please refer to `compile from source code `_ -.. toctree:: +.. toctree:: :hidden: pip/frompip_en.rst + conda/fromconda_en.rst + docker/fromdocker_en.rst compile/fromsource_en.rst install_Kunlun_en.md install_NGC_PaddlePaddle_en.rst diff --git a/docs/install/install_NGC_PaddlePaddle_ch.rst b/docs/install/install_NGC_PaddlePaddle_ch.rst new file mode 100644 index 00000000000..0621c2a873d --- /dev/null +++ b/docs/install/install_NGC_PaddlePaddle_ch.rst @@ -0,0 +1,110 @@ +.. _install_NGC_PaddlePaddle_container introduction: + +================================ +NGC 飞桨容器安装指南 +================================ + +---------------------- + 整体介绍 +---------------------- + +NGC 飞桨容器针对 NVIDIA GPU 加速进行了优化,并包含一组经过验证的库,可启用和优化 NVIDIA GPU 性能。此容器还可能包含对 PaddlePaddle 源代码的修改,以最大限度地提高性能和兼容性。此容器还包含用于加速 ETL (`DALI `_, `RAPIDS `_),、训练(`cuDNN `_, `NCCL `_)和推理(`TensorRT `_)工作负载的软件。 + +---------------------- + 环境准备 +---------------------- + +使用 NGC 飞桨容器需要主机系统安装以下内容: + +* `Docker 引擎 `_ + +* `NVIDIA GPU 驱动程序 `_ + +* `NVIDIA 容器工具包 `_ + +有关支持的版本,请参阅 `NVIDIA 框架容器支持矩阵 `_ 和 `NVIDIA 容器工具包文档 `_。 + +不需要其他安装、编译或依赖管理。 无需安装 NVIDIA CUDA Toolkit。 + +---------------------- + 安装步骤 +---------------------- + +要运行容器,请按照 NVIDIA Containers For Deep Learning Frameworks User's Guide 中 `Running A Container `_ 一章中的说明发出适当的命令,并指定注册表、存储库和标签。 有关使用 NGC 的更多信息,请参阅 NGC 容器用户指南。 +如果您有 Docker 19.03 或更高版本,启动容器的典型命令是: + + :: + + docker run --gpus all --shm-size=1g --ulimit memlock=-1 -it --rm nvcr.io/nvidia/paddlepaddle:22.07-py3 + + +如果您有 Docker 19.02 或更早版本,启动容器的典型命令是: + + :: + + nvidia-docker run --shm-size=1g --ulimit memlock=-1 -it --rm nvcr.io/nvidia/paddlepaddle:22.07-py3 + + + +其中: +* 22.07 是容器版本。 +PaddlePaddle 通过将其作为 Python 模块导入来运行: + + :: + + $ python -c 'import paddle; paddle.utils.run_check()' + Running verify PaddlePaddle program ... + W0516 06:36:54.208734 442 device_context.cc:451] Please NOTE: device: 0, GPU Compute Capability: 8.0, Driver API Version: 11.7, Runtime API Version: 11.7 + W0516 06:36:54.212574 442 device_context.cc:469] device: 0, cuDNN Version: 8.4. + PaddlePaddle works well on 1 GPU. + W0516 06:37:12.706600 442 fuse_all_reduce_op_pass.cc:76] Find all_reduce operators: 2. To make the speed faster, some all_reduce ops are fused during training, after fusion, the number of all_reduce ops is 2. + PaddlePaddle works well on 8 GPUs. + PaddlePaddle is installed successfully! Let's start deep learning with PaddlePaddle now. + +有关入门和自定义 PaddlePaddle 映像的信息,请参阅容器内的 /workspace/README.md。 + +您可能希望从容器外部的位置提取数据和模型描述以供 PaddlePaddle 使用。 为此,最简单的方法是将一个或多个主机目录挂载为 `Docker 绑定挂载 `_。 例如: + + :: + + docker run --gpus all -it --rm -v local_dir:container_dir nvcr.io/nvidia/paddlepaddle:22.07-py3 + + +注意:为了在队列之间共享数据,NCCL 可能需要共享系统内存用于 IPC 和固定(页面锁定)系统内存资源。 操作系统对这些资源的限制可能需要相应增加。 有关详细信息,请参阅系统文档。 特别是,Docker 容器默认使用有限的共享和固定内存资源。 在容器内使用 NCCL 时,建议您通过发出以下命令来增加这些资源: + + :: + + --shm-size=1g --ulimit memlock=-1 + +在 docker run 命令中。 + +---------------------- + NGC 容器介绍 +---------------------- + +有关内容的完整列表,请参阅 `NGC 飞桨容器发行说明 `_。 +此容器映像包含 NVIDIA 版 PaddlePaddle 的完整源代码,位于 /opt/paddle/paddle。它是作为系统 Python 模块预构建和安装的。 +NVIDIA PaddlePaddle 容器针对与 NVIDIA GPU 一起使用进行了优化,并包含以下用于 GPU 加速的软件: + +* `CUDA `_ + +* `cuBLAS `_ + +* `NVIDIA cuDNN `_ + +* `NVIDIA NCCL `_ (optimized for `NVLink `_ ) + +* `NVIDIA Data Loading Library (DALI) `_ + +* `TensorRT `__ + +* `PaddlePaddle with TensorRT (Paddle-TRT) `_ + +此容器中的软件堆栈已经过兼容性验证,不需要最终用户进行任何额外的安装或编译。此容器可以帮助您从端到端加速深度学习工作流程。 + + +-------------------------------------------- + NGC 飞桨容器软件许可协议 +-------------------------------------------- + +当您下载或使用 NGC 飞桨容器时,即表示您已经同意并接受此 `最终用户许可协议 `_ 的条款及其对应约束。 diff --git a/docs/install/install_NGC_PaddlePaddle_en.rst b/docs/install/install_NGC_PaddlePaddle_en.rst index 9ee73559770..95f3c746ffc 100644 --- a/docs/install/install_NGC_PaddlePaddle_en.rst +++ b/docs/install/install_NGC_PaddlePaddle_en.rst @@ -16,11 +16,11 @@ The PaddlePaddle NGC Container is optimized for GPU acceleration, and contains a Using the PaddlePaddle NGC Container requires the host system to have the following installed: -* `Docker Engine `_ +* `Docker Engine `_ -* `NVIDIA GPU Drivers `_ +* `NVIDIA GPU Drivers `_ -* `NVIDIA Container Toolkit `_ +* `NVIDIA Container Toolkit `_ For supported versions, see the `Framework Containers Support Matrix `_ and the `NVIDIA Container Toolkit Documentation `_ . @@ -50,7 +50,7 @@ If you have Docker 19.02 or earlier, a typical command to launch the container i Where: -* 22.07 is the container version. +* 22.07 is the container version. PaddlePaddle is run by importing it as a Python module: @@ -96,19 +96,19 @@ This container image contains the complete source of the NVIDIA version of Paddl The NVIDIA PaddlePaddle Container is optimized for use with NVIDIA GPUs, and contains the following software for GPU acceleration: -* `CUDA `_ +* `CUDA `_ -* `cuBLAS `_ +* `cuBLAS `_ -* `NVIDIA cuDNN `_ +* `NVIDIA cuDNN `_ -* `NVIDIA NCCL `_ (optimized for `NVLink `_ ) +* `NVIDIA NCCL `_ (optimized for `NVLink `_ ) -* `NVIDIA Data Loading Library (DALI) `_ +* `NVIDIA Data Loading Library (DALI) `_ -* `TensorRT `__ +* `TensorRT `__ -* `PaddlePaddle with TensorRT (Paddle-TRT) `_ +* `PaddlePaddle with TensorRT (Paddle-TRT) `_ The software stack in this container has been validated for compatibility, and does not require any additional installation or compilation from the end user. This container can help accelerate your deep learning workflow from end to end. diff --git a/docs/install/install_script.md b/docs/install/install_script.md index 72300a97a7e..a2edfcb1f07 100644 --- a/docs/install/install_script.md +++ b/docs/install/install_script.md @@ -8,17 +8,17 @@ 脚本会执行以下几步: -1. GPU 检测 +1. GPU 检测 - 检测您的机器是否含有我们支持的 GPU,如果有,会安装 GPU 版本的 PaddlePaddle,否则会安装 CPU 版本。 - (PaddlePaddle 目前支持 NVIDIA[官网](https://developer.nvidia.com/cuda-gpus#collapseOne)列出的,算力 7.0 以下的 GPU 和 v100 系列的 GPU) + 检测您的机器是否含有我们支持的 GPU,如果有,会安装 GPU 版本的 PaddlePaddle,否则会安装 CPU 版本。 + (PaddlePaddle 目前支持 NVIDIA[官网](https://developer.nvidia.com/cuda-gpus#collapseOne)列出的,算力 7.0 以下的 GPU 和 v100 系列的 GPU) 2. CUDA,cuDNN 检测 - 检测您的机器是否安装我们支持的 CUDA,cuDNN,具体地: + 检测您的机器是否安装我们支持的 CUDA,cuDNN,具体地: - 1. 在`/usr/local/` 及其子目录下寻找 `cuda10.1/cuda10.2/cuda11.0/cuda11.2` 目录下的`version.txt`文件(通常如果您以默认方式安装了 CUDA)。 如果提示未找到 CUDA 请使用命令`find / -name version.txt`找到您所需要的 CUDA 目录下的“version.txt”路径,然后按照提示输入。 - 2. 在`/usr` 及其子目录下寻找文件 `cudnn.h` , 如果您的 cuDNN 未安装在默认路径请使用命令`find / -name cudnn.h`寻找您希望使用的 cuDNN 版本的`cudnn.h`路径并按提示输入 + 1. 在`/usr/local/` 及其子目录下寻找 `cuda10.1/cuda10.2/cuda11.0/cuda11.2` 目录下的`version.txt`文件(通常如果您以默认方式安装了 CUDA)。 如果提示未找到 CUDA 请使用命令`find / -name version.txt`找到您所需要的 CUDA 目录下的“version.txt”路径,然后按照提示输入。 + 2. 在`/usr` 及其子目录下寻找文件 `cudnn.h` , 如果您的 cuDNN 未安装在默认路径请使用命令`find / -name cudnn.h`寻找您希望使用的 cuDNN 版本的`cudnn.h`路径并按提示输入 如果未找到相应文件,则会安装 CPU 版本的 PaddlePaddle @@ -39,14 +39,14 @@ 以上检查完成后就会为您安装对应您系统的 PaddlePaddle 了,安装一般需要 1~2 分钟会根据您的网络来决定,请您耐心等待。 -### macOS +### MacOS 脚本会执行以下几步: 1. 选择 PaddlePaddle 版本 我们为您提供 2 种版本:开发版和稳定版,推荐您选择测试验证过的稳定版 -2. 检查 Python 版本 -由于 macOS 自带的 Python 通常依赖于系统环境,因此我们不支持 macOS 自带的 Python 环境,请重新从 Python.org 安装 Python,然后根据提示输入您希望使用的 Python 的路径 +2. 检查 Python 版本 +由于 MacOS 自带的 Python 通常依赖于系统环境,因此我们不支持 MacOS 自带的 Python 环境,请重新从 Python.org 安装 Python,然后根据提示输入您希望使用的 Python 的路径 3. 检查是否支持[AVX](https://zh.wikipedia.org/zh-hans/AVX 指令集)指令集 diff --git a/docs/install/pip/frompip.rst b/docs/install/pip/frompip.rst index 931460df602..c6e9e3c2a2b 100644 --- a/docs/install/pip/frompip.rst +++ b/docs/install/pip/frompip.rst @@ -2,7 +2,7 @@ **Pip 安装** =========================== -.. toctree:: +.. toctree:: :maxdepth: 1 linux-pip.md diff --git a/docs/install/pip/frompip_en.rst b/docs/install/pip/frompip_en.rst index 7706c500279..273c7c9ab96 100644 --- a/docs/install/pip/frompip_en.rst +++ b/docs/install/pip/frompip_en.rst @@ -2,7 +2,7 @@ **Install via pip** ============================== -.. toctree:: +.. toctree:: linux-pip_en.md diff --git a/docs/install/pip/linux-pip.md b/docs/install/pip/linux-pip.md index 4300319363f..8caeb0f74ae 100644 --- a/docs/install/pip/linux-pip.md +++ b/docs/install/pip/linux-pip.md @@ -6,11 +6,12 @@ * **Linux 版本 (64 bit)** - * **CentOS 7 (GPU 版本支持 CUDA 10.1/10.2/11.2)** - * **Ubuntu 16.04 (GPU 版本支持 CUDA 10.1/10.2/11.1/11.2)** - * **Ubuntu 18.04 (GPU 版本支持 CUDA 10.1/10.2/11.1/11.2)** + * **CentOS 7 (GPU 版本支持 CUDA 10.1/10.2/11.1/11.2/11.6)** + * **Ubuntu 16.04 (GPU 版本支持 CUDA 10.1/10.2/11.1/11.2/11.6)** + * **Ubuntu 18.04 (GPU 版本支持 CUDA 10.1/10.2/11.1/11.2/11.6)** + * **Ubuntu 20.04 (GPU 版本支持 CUDA 10.1/10.2/11.1/11.2/11.6)** -* **Python 版本 3.6/3.7/3.8/3.9 (64 bit)** +* **Python 版本 3.6/3.7/3.8/3.9/3.10 (64 bit)** * **pip 或 pip3 版本 20.2.2 或更高版本 (64 bit)** @@ -35,7 +36,7 @@ * 需要确认 python 的版本是否满足要求 - * 使用以下命令确认是 3.6/3.7/3.8/3.9 + * 使用以下命令确认是 3.6/3.7/3.8/3.9/3.10 python --version @@ -51,7 +52,7 @@ -* 需要确认 Python 和 pip 是 64bit,并且处理器架构是 x86_64(或称作 x64、Intel 64、AMD64)架构,目前 PaddlePaddle 不支持 arm64 架构。下面的第一行输出的是"64bit",第二行输出的是"x86_64"、"x64"或"AMD64"即可: +* 需要确认 Python 和 pip 是 64bit,并且处理器架构是 x86_64(或称作 x64、Intel 64、AMD64)架构。下面的第一行输出的是"64bit",第二行输出的是"x86_64"、"x64"或"AMD64"即可: ``` @@ -62,7 +63,7 @@ * 默认提供的安装包需要计算机支持 MKL -* 如果您对机器环境不了解,请下载使用[快速安装脚本](https://fast-install.bj.bcebos.com/fast_install.sh),配套说明请参考[这里](https://github.com/PaddlePaddle/docs/blob/develop/docs/install/install_script.md)。 +* 如果您对机器环境不了解,请下载使用[快速安装脚本](https://fast-install.bj.bcebos.com/fast_install.sh),配套说明请参考[这里](https://github.com/PaddlePaddle/FluidDoc/tree/develop/doc/fluid/install/install_script.md)。 @@ -70,23 +71,27 @@ 本文档为您介绍 pip 安装方式 -### 首先请您选择您的版本 +### 首先请选择您的版本 * 如果您的计算机没有 NVIDIA® GPU,请安装[CPU 版的 PaddlePaddle](#cpu) * 如果您的计算机有 NVIDIA® GPU,请确保满足以下条件并且安装[GPU 版 PaddlePaddle](#gpu) - * **CUDA 工具包 10.1/10.2 配合 cuDNN v7.6+(如需多卡支持,需配合 NCCL2.7 及更高)** + * **CUDA 工具包 10.1/10.2 配合 cuDNN 7 (cuDNN 版本>=7.6.5, 如需多卡支持,需配合 NCCL2.7 及更高)** + + * **CUDA 工具包 11.1 配合 cuDNN v8.1.1(如需多卡支持,需配合 NCCL2.7 及更高)** * **CUDA 工具包 11.2 配合 cuDNN v8.1.1(如需多卡支持,需配合 NCCL2.7 及更高)** + * **CUDA 工具包 11.6 配合 cuDNN v8.4.0(如需多卡支持,需配合 NCCL2.7 及更高)** + * **GPU 运算能力超过 3.5 的硬件设备** 您可参考 NVIDIA 官方文档了解 CUDA 和 CUDNN 的安装流程和配置方法,请见[CUDA](https://docs.nvidia.com/cuda/cuda-installation-guide-linux/),[cuDNN](https://docs.nvidia.com/deeplearning/sdk/cudnn-install/) -* 如果您需要使用多卡环境请确保您已经正确安装 nccl2,或者按照以下指令安装 nccl2(这里提供的是 CUDA9,cuDNN7 下 nccl2 的安装指令,更多版本的安装信息请参考 NVIDIA[官方网站](https://developer.nvidia.com/nccl)): +* 如果您需要使用多卡环境请确保您已经正确安装 nccl2,或者按照以下指令安装 nccl2(这里提供的是 CUDA10.2,cuDNN7 下 nccl2 的安装指令,更多版本的安装信息请参考 NVIDIA[官方网站](https://developer.nvidia.com/nccl)): - * **CentOS 系统可以参考以下命令** + * **Centos 系统可以参考以下命令** 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 @@ -99,7 +104,7 @@ ``` ``` - 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 + yum install -y libnccl-2.7.8-1+cuda10.2 libnccl-devel-2.7.8-1+cuda10.2 libnccl-static-2.7.8-1+cuda10.2 ``` * **Ubuntu 系统可以参考以下命令** @@ -113,27 +118,27 @@ ``` ``` - sudo apt-get install -y libnccl2=2.3.7-1+cuda9.0 libnccl-dev=2.3.7-1+cuda9.0 + sudo apt install -y libnccl2=2.7.8-1+cuda10.2 libnccl-dev=2.7.8-1+cuda10.2 ``` -#### 2.1 CPU 版的 PaddlePaddle +#### 2.1 CPU 版的 PaddlePaddle ``` - python -m pip install paddlepaddle==0.0.0 -f https://www.paddlepaddle.org.cn/whl/linux/cpu-mkl/develop.html + python -m pip install paddlepaddle==2.3.2 -i https://pypi.tuna.tsinghua.edu.cn/simple ``` -#### 2.2 GPU 版的 PaddlePaddle +#### 2.2 GPU 版的 PaddlePaddle 2.2.1 CUDA10.1 的 PaddlePaddle ``` - python -m pip install paddlepaddle-gpu==0.0.0.post101 -f https://www.paddlepaddle.org.cn/whl/linux/gpu/develop.html + python -m pip install paddlepaddle-gpu==2.3.2.post101 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html ``` @@ -142,39 +147,89 @@ ``` - python -m pip install paddlepaddle-gpu==0.0.0.post102 -f https://www.paddlepaddle.org.cn/whl/linux/gpu/develop.html + python -m pip install paddlepaddle-gpu==2.3.2 -i https://pypi.tuna.tsinghua.edu.cn/simple ``` -2.2.3 CUDA11.0 的 PaddlePaddle + +2.2.3 CUDA11.1 的 PaddlePaddle ``` - python -m pip install paddlepaddle-gpu==0.0.0.post110 -f https://www.paddlepaddle.org.cn/whl/linux/gpu/develop.html + python -m pip install paddlepaddle-gpu==2.3.2.post111 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html ``` -2.2.4 CUDA11.1 的 PaddlePaddle + +2.2.4 CUDA11.2 的 PaddlePaddle ``` - python -m pip install paddlepaddle-gpu==0.0.0.post111 -f https://www.paddlepaddle.org.cn/whl/linux/gpu/develop.html + python -m pip install paddlepaddle-gpu==2.3.2.post112 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html ``` -2.2.5 CUDA11.2 的 PaddlePaddle +2.2.5 CUDA11.6 的 PaddlePaddle ``` - python -m pip install paddlepaddle-gpu==0.0.0.post112 -f https://www.paddlepaddle.org.cn/whl/linux/gpu/develop.html + python -m pip install paddlepaddle-gpu==2.3.2.post116 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html ``` 注: -* 如果你使用的是安培架构的 GPU,推荐使用 CUDA11.2。如果你使用的是非安培架构的 GPU,推荐使用 CUDA10.2,性能更优。请参考: [GPU 架构对照表](https://www.paddlepaddle.org.cn/documentation/docs/zh/install/Tables.html#nvidia-gpu) +* 如果你使用的是安培架构的 GPU,推荐使用 CUDA11 以上。如果你使用的是非安培架构的 GPU,推荐使用 CUDA10.2,性能更优。 * 请确认需要安装 PaddlePaddle 的 Python 是您预期的位置,因为您计算机可能有多个 Python。根据您的环境您可能需要将说明中所有命令行中的 python 替换为 python3 或者替换为具体的 Python 路径。 +* 如果您需要使用清华源,可以通过以下命令 + + ``` + python -m pip install paddlepaddle-gpu==[版本号] -i https://pypi.tuna.tsinghua.edu.cn/simple + ``` + +* 上述命令默认安装`avx`的包。如果你的机器不支持`avx`,需要安装`noavx`的 Paddle 包,可以通过以下命令安装,仅支持 python3.8: + + 首先使用如下命令将 wheel 包下载到本地,再使用`python -m pip install [name].whl`本地安装([name]为 wheel 包名称): + + * cpu、mkl 版本 noavx 机器安装: + + ``` + python -m pip download paddlepaddle==2.3.2 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/noavx/stable.html --no-index --no-deps + ``` + + * cpu、openblas 版本 noavx 机器安装: + + ``` + python -m pip download paddlepaddle==2.3.2 -f https://www.paddlepaddle.org.cn/whl/linux/openblas/noavx/stable.html --no-index --no-deps + ``` + + + * gpu 版本 cuda10.1 noavx 机器安装: + + ``` + python -m pip download paddlepaddle-gpu==2.3.2.post101 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/noavx/stable.html --no-index --no-deps + ``` + + * gpu 版本 cuda10.2 noavx 机器安装: + + ``` + python -m pip download paddlepaddle-gpu==2.3.2 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/noavx/stable.html --no-index --no-deps + ``` + + 判断你的机器是否支持`avx`,可以输入以下命令,如果输出中包含`avx`,则表示机器支持`avx` + ``` + cat /proc/cpuinfo | grep -i avx + ``` + +* 如果你想安装`avx`、`openblas`的 Paddle 包,可以通过以下命令将 wheel 包下载到本地,再使用`python -m pip install [name].whl`本地安装([name]为 wheel 包名称): + + ``` + python -m pip download paddlepaddle==2.3.2 -f https://www.paddlepaddle.org.cn/whl/linux/openblas/avx/stable.html --no-index --no-deps + ``` + +* 如果你想安装联编`tensorrt`的 Paddle 包,可以参考[下载安装 Linux 预测库](https://paddleinference.paddlepaddle.org.cn/user_guides/download_lib.html)。 + diff --git a/docs/install/pip/linux-pip_en.md b/docs/install/pip/linux-pip_en.md index 1478aeb5d0e..2042d6c3b6c 100644 --- a/docs/install/pip/linux-pip_en.md +++ b/docs/install/pip/linux-pip_en.md @@ -5,11 +5,12 @@ ### 1.1 PREQUISITES * **Linux Version (64 bit)** - * **CentOS 7 (GPUVersion Supports CUDA 10.1/10.2/11.2**)** - * **Ubuntu 16.04 (GPUVersion Supports CUDA 10.1/10.2/11.2)** - * **Ubuntu 18.04 (GPUVersion Supports CUDA 10.1/10.2/11.2)** + * **CentOS 7 (GPUVersion Supports CUDA 10.1/10.2/11.1/11.2/11.6)** + * **Ubuntu 16.04 (GPUVersion Supports CUDA 10.1/10.2/11.1/11.2/11.6)** + * **Ubuntu 18.04 (GPUVersion Supports CUDA 10.1/10.2/11.1/11.2/11.6)** + * **Ubuntu 20.04 (GPUVersion Supports CUDA 10.1/10.2/11.1/11.2/11.6)** -* **Python Version: 3.6/3.7/3.8/3.9 (64 bit)** +* **Python Version: 3.6/3.7/3.8/3.9/3.10 (64 bit)** * **pip or pip3 Version 20.2.2 or above (64 bit)** @@ -35,7 +36,7 @@ * You need to confirm whether the version of Python meets the requirements - * Use the following command to confirm that it is 3.6/3.7/3.8/3.9 + * Use the following command to confirm that it is 3.6/3.7/3.8/3.9/3.10 python --version @@ -52,7 +53,7 @@ -* 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" +* You need to confirm that Python and pip are 64bit, and the processor architecture is x86_64(or called x64、Intel 64、AMD64). The first line below outputs "64bit", and the second line outputs "x86_64", "x64" or "AMD64" ``` python -c "import platform;print(platform.architecture()[0]);print(platform.machine())" @@ -62,7 +63,7 @@ * 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/docs/blob/develop/docs/install/install_script.md)。 +* 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/install_script.md)。 @@ -76,17 +77,21 @@ If you installed Python via Homebrew or the Python website, `pip` was installed * If your computer has NVIDIA® GPU, please make sure that the following conditions are met and install [the GPU Version of PaddlePaddle](#gpu) - * **CUDA toolkit 10.1/10.2 with cuDNN v7.6+(for multi card support, NCCL2.7 or higher)** + * **CUDA toolkit 10.1/10.2 with cuDNN 7 (cuDNN version>=7.6.5, for multi card support, NCCL2.7 or higher)** + + * **CUDA toolkit 11.1 with cuDNN v8.1.1(for multi card support, NCCL2.7 or higher)** * **CUDA toolkit 11.2 with cuDNN v8.1.1(for multi card support, NCCL2.7 or higher)** + * **CUDA toolkit 11.6 with cuDNN v8.4.0(for multi card support, NCCL2.7 or higher)** + * **Hardware devices with GPU computing power over 3.5** 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/) -* If you need to use a multi-card environment, please make sure that you have installed nccl2 correctly, or install nccl2 according to the following instructions (here are the installation instructions of nccl2 under CUDA9 and cuDNN7. For more version installation information, please refer to NVIDIA [Official Website](https://developer.nvidia.com/nccl)): +* If you need to use a multi-card environment, please make sure that you have installed nccl2 correctly, or install nccl2 according to the following instructions (here are the installation instructions of nccl2 under CUDA10.2 and cuDNN7. For more version installation information, please refer to NVIDIA [Official Website](https://developer.nvidia.com/nccl)): - * **CentOS system can refer to the following commands** + * **Centos system can refer to the following commands** 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 @@ -99,7 +104,7 @@ If you installed Python via Homebrew or the Python website, `pip` was installed ``` ``` - 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 + yum install -y libnccl-2.7.8-1+cuda10.2 libnccl-devel-2.7.8-1+cuda10.2 libnccl-static-2.7.8-1+cuda10.2 ``` * **Ubuntu system can refer to the following commands** @@ -113,7 +118,7 @@ If you installed Python via Homebrew or the Python website, `pip` was installed ``` ``` - sudo apt-get install -y libnccl2=2.3.7-1+cuda9.0 libnccl-dev=2.3.7-1+cuda9.0 + sudo apt install -y libnccl2=2.7.8-1+cuda10.2 libnccl-dev=2.7.8-1+cuda10.2 ``` @@ -124,16 +129,16 @@ You can choose the following version of PaddlePaddle to start installation: -#### 2.1 CPU Versoion of PaddlePaddle +#### 2.1 CPU Version of PaddlePaddle ``` - python -m pip install paddlepaddle==0.0.0 -f https://www.paddlepaddle.org.cn/whl/linux/cpu-mkl/develop.html + python -m pip install paddlepaddle==2.3.2 -i https://pypi.tuna.tsinghua.edu.cn/simple ``` -#### 2.2 GPU Version of PaddlePaddle +#### 2.2 GPU Version of PaddlePaddle @@ -141,7 +146,7 @@ You can choose the following version of PaddlePaddle to start installation: ``` - python -m pip install paddlepaddle-gpu==0.0.0.post101 -f https://www.paddlepaddle.org.cn/whl/linux/gpu/develop.html + python -m pip install paddlepaddle-gpu==2.3.2.post101 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html ``` @@ -150,41 +155,83 @@ You can choose the following version of PaddlePaddle to start installation: ``` - python -m pip install paddlepaddle-gpu==0.0.0.post102 -f https://www.paddlepaddle.org.cn/whl/linux/gpu/develop.html + python -m pip install paddlepaddle-gpu==2.3.2 -i https://pypi.tuna.tsinghua.edu.cn/simple ``` +2.2.3 If you are using CUDA 11.1 + + + ``` + python -m pip install paddlepaddle-gpu==2.3.2.post111 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html + ``` -2.2.3 If you are using CUDA 11.0 + +2.2.4 If you are using CUDA 11.2 ``` - python -m pip install paddlepaddle-gpu==0.0.0.post110 -f https://www.paddlepaddle.org.cn/whl/linux/gpu/develop.html + python -m pip install paddlepaddle-gpu==2.3.2.post112 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html ``` -2.2.4 If you are using CUDA 11.1 +2.2.5 If you are using CUDA 11.6 ``` - python -m pip install paddlepaddle-gpu==0.0.0.post111 -f https://www.paddlepaddle.org.cn/whl/linux/gpu/develop.html + python -m pip install paddlepaddle-gpu==2.3.2.post116 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html ``` +Note: +* If you are using ampere-based GPU, CUDA 11 above version is recommended; otherwise CUDA 10.2 is recommended for better performance. -2.2.5 If you are using CUDA 11.2 +* Please confirm that the Python where you need to install PaddlePaddle is your expected location, because your computer may have multiple Python. Depending on the environment, you may need to replace Python in all command lines in the instructions with Python 3 or specific Python path. +* If you want to use the tsinghua pypi, you can use the following command: ``` - python -m pip install paddlepaddle-gpu==0.0.0.post112 -f https://www.paddlepaddle.org.cn/whl/linux/gpu/develop.html + python -m pip install paddlepaddle-gpu==[Version] -i https://pypi.tuna.tsinghua.edu.cn/simple ``` +* The above commands install the `avx` package by default. If your machine does not support `avx`, you need to install the Paddle package of `noavx`, you can use the following command to install,noavx version paddle wheel only support python3.8: + First use the following command to download the wheel package to the local, and then use `python -m pip install [name].whl` to install locally ([name] is the name of the wheel package): -Note: + * cpu and mkl version installed on noavx machine: -* If you are using ampere-based GPU, CUDA 11.2 is recommended; otherwise CUDA 10.2 is recommended for better performance. please refer to: [GPU architecture comparison table](https://www.paddlepaddle.org.cn/documentation/docs/en/install/Tables.html#nvidia-gpu) + ``` + python -m pip download paddlepaddle==2.3.2 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/noavx/stable.html --no-index --no-deps + ``` -* Please confirm that the Python where you need to install PaddlePaddle is your expected location, because your computer may have multiple Python. Depending on the environment, you may need to replace Python in all command lines in the instructions with Python 3 or specific Python path. + * cpu and openblas version installed on noavx machine: + + ``` + python -m pip download paddlepaddle==2.3.2 -f https://www.paddlepaddle.org.cn/whl/linux/openblas/noavx/stable.html --no-index --no-deps + ``` + + + * GPU cuda10.1 version install on noavx machine: + + ``` + python -m pip download paddlepaddle-gpu==2.3.2.post101 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/noavx/stable.html --no-index --no-deps + ``` + + * GPU cuda10.2 version install on noavx machine: + + ``` + python -m pip download paddlepaddle-gpu==2.3.2 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/noavx/stable.html --no-index --no-deps + ``` + + To determine whether your machine supports `avx`, you can use the following command. If the output contains `avx`, it means that the machine supports `avx`: + ``` + cat /proc/cpuinfo | grep -i avx + ``` + +* If you want to install the Paddle package with `avx` and `openblas`, you can use the following command to download the wheel package to the local, and then use `python -m pip install [name].whl` to install locally ([name] is the name of the wheel package): + + ``` + python -m pip download paddlepaddle==2.3.2 -f https://www.paddlepaddle.org.cn/whl/linux/openblas/avx/stable.html --no-index --no-deps + ``` @@ -198,5 +245,5 @@ If `PaddlePaddle is installed successfully!` appears, to verify that the install Please use the following command to uninstall PaddlePaddle: -- ***CPU version of PaddlePaddle\***: `python -m pip uninstall paddlepaddle` -- ***GPU version of PaddlePaddle\***: `python -m pip uninstall paddlepaddle-gpu` +- **CPU version of PaddlePaddle**: `python -m pip uninstall paddlepaddle` +- **GPU version of PaddlePaddle**: `python -m pip uninstall paddlepaddle-gpu` diff --git a/docs/install/pip/macos-pip.md b/docs/install/pip/macos-pip.md index 849d08b03ff..7b77859aad6 100644 --- a/docs/install/pip/macos-pip.md +++ b/docs/install/pip/macos-pip.md @@ -1,12 +1,14 @@ -# macOS 下的 PIP 安装 +# MacOS 下的 PIP 安装 ## 一、环境准备 ### 1.1 目前飞桨支持的环境 -* **macOS 版本 10.11/10.12/10.13/10.14 (64 bit) (不支持 GPU 版本)** +* **macOS 版本 10.x/11.x (64 bit) (不支持 GPU 版本)** -* **Python 版本 3.6/3.7/3.8/3.9 (64 bit)** +* **mac 机器上支持 mac M1 芯片、Intel 芯片** + +* **Python 版本 3.6/3.7/3.8/3.9/3.10 (64 bit)** * **pip 或 pip3 版本 20.2.2 或更高版本 (64 bit)** @@ -33,7 +35,7 @@ * 需要确认 python 的版本是否满足要求 - * 使用以下命令确认是 3.6/3.7/3.8/3.9 + * 使用以下命令确认是 3.6/3.7/3.8/3.9/3.10 ``` python --version @@ -52,7 +54,7 @@ -* 需要确认 Python 和 pip 是 64bit,并且处理器架构是 x86_64(或称作 x64、Intel 64、AMD64)架构,目前 PaddlePaddle 不支持 arm64 架构。下面的第一行输出的是"64bit",第二行输出的是"x86_64"、"x64"或"AMD64"即可: +* 需要确认 Python 和 pip 是 64bit,并且处理器架构是 x86_64(或称作 x64、Intel 64、AMD64)架构 或 arm64 架构(paddle 已原生支持 Mac M1 芯片): ``` python -c "import platform;print(platform.architecture()[0]);print(platform.machine())" @@ -62,7 +64,7 @@ * 默认提供的安装包需要计算机支持 MKL -* 如果您对机器环境不了解,请下载使用[快速安装脚本](https://fast-install.bj.bcebos.com/fast_install.sh),配套说明请参考[这里](https://github.com/PaddlePaddle/docs/blob/develop/docs/install/install_script.md)。 +* 如果您对机器环境不了解,请下载使用[快速安装脚本](https://fast-install.bj.bcebos.com/fast_install.sh),配套说明请参考[这里](https://github.com/PaddlePaddle/FluidDoc/tree/develop/doc/fluid/install/install_script.md)。 @@ -70,9 +72,9 @@ 本文档为您介绍 pip 安装方式 -### 首先请您选择您的版本 +### 首先请选择您的版本 -* 目前在 macOS 环境仅支持 CPU 版 PaddlePaddle +* 目前在 MacOS 环境仅支持 CPU 版 PaddlePaddle ### 根据版本进行安装 @@ -81,15 +83,15 @@ ``` - python -m pip install paddlepaddle==0.0.0 -f https://www.paddlepaddle.org.cn/whl/mac/cpu/develop.html + python -m pip install paddlepaddle==2.3.2 -i https://pypi.tuna.tsinghua.edu.cn/simple ``` -* 注: -* macOS 上您需要安装 unrar 以支持 PaddlePaddle,可以使用命令 `brew install rar` +注: +* MacOS 上您需要安装 unrar 以支持 PaddlePaddle,可以使用命令`brew install unrar` * 请确认需要安装 PaddlePaddle 的 Python 是您预期的位置,因为您计算机可能有多个 Python。根据您的环境您可能需要将说明中所有命令行中的 python 替换为具体的 Python 路径。 -* 默认下载最新稳定版的安装包,如需获取开发版安装包,请参考[这里](https://www.paddlepaddle.org.cn/install/quick/zh/1.8.5-windows-pip) -* 使用 macOS 中自带 Python 可能会导致安装失败。请使用[Python.org](https://www.python.org/downloads/mac-osx/)提供的 python3.6.x、python3.7.x、python3.8.x 或 python3.9.x。 +* 默认下载最新稳定版的安装包,如需获取 develop 版本 nightly build 的安装包,请参考[这里](https://www.paddlepaddle.org.cn/install/quick/zh/1.8.5-windows-pip) +* 使用 MacOS 中自带 Python 可能会导致安装失败。请使用[python 官网](https://www.python.org/downloads/mac-osx/)提供的 python3.6.x、python3.7.x、python3.8.x、python3.9.x、python3.10.x。 ## **三、验证安装** diff --git a/docs/install/pip/macos-pip_en.md b/docs/install/pip/macos-pip_en.md index 29cd9e7762b..c2282d74177 100644 --- a/docs/install/pip/macos-pip_en.md +++ b/docs/install/pip/macos-pip_en.md @@ -1,14 +1,16 @@ -# Install on macOS via PIP +# Install on MacOS via PIP ## Environmental preparation ### 1.1 PREQUISITES -* **macOS version 10.11/10.12/10.13/10.14 (64 bit) (not support GPU version)** +* **MacOS version 10.x/11.x (64 bit) (not support GPU version)** -* **Python version 3.6/3.7/3.8/3.9 (64 bit)** +* **Mac machine supports Mac M1 chip, Intel chip** -* **pip or pip3 版本 20.2.2 or above (64 bit)** +* **Python version 3.6/3.7/3.8/3.9/3.10 (64 bit)** + +* **pip or pip3 Version 20.2.2 or above (64 bit)** ### 1.2 How to check your environment @@ -33,7 +35,7 @@ * You need to confirm whether the version of Python meets the requirements - * Use the following command to confirm that it is 3.6/3.7/3.8/3.9 + * Use the following command to confirm that it is 3.6/3.7/3.8/3.9/3.10 python --version @@ -48,7 +50,7 @@ ``` -* 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" +* You need to confirm that Python and pip are 64bit, and the processor architecture is x86_64(or called x64、Intel 64、AMD64) or arm64 (PaddlePaddle already supports Mac M1): ``` @@ -58,7 +60,7 @@ * 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/docs/blob/develop/docs/install/install_script.md)。 +* 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/install_script.md)。 @@ -68,7 +70,7 @@ If you installed Python via Homebrew or the Python website, `pip` was installed ### Choose CPU/GPU -* Currently, only the CPU version of PaddlePaddle is supported in the macOS environment +* Currently, only the CPU version of PaddlePaddle is supported in the MacOS environment ### Installation Step @@ -79,7 +81,7 @@ You can choose the following version of PaddlePaddle to start installation: ``` -python -m pip install paddlepaddle==0.0.0 -f https://www.paddlepaddle.org.cn/whl/mac/cpu/develop.html +python -m pip install paddlepaddle==2.3.2 -i https://pypi.tuna.tsinghua.edu.cn/simple ``` Note: diff --git a/docs/install/pip/windows-pip.md b/docs/install/pip/windows-pip.md index 44f7d443175..76a1c48860c 100644 --- a/docs/install/pip/windows-pip.md +++ b/docs/install/pip/windows-pip.md @@ -5,15 +5,15 @@ ### 1.1 目前飞桨支持的环境 * **Windows 7/8/10 专业版/企业版 (64bit)** -* **GPU 版本支持 CUDA 10.1/10.2/11.0/11.1/11.2,且仅支持单卡** -* **Python 版本 3.6+/3.7+/3.8+/3.9+ (64 bit)** +* **GPU 版本支持 CUDA 10.1/10.2/11.1/11.2/11.6,且仅支持单卡** +* **Python 版本 3.6+/3.7+/3.8+/3.9+/3.10+ (64 bit)** * **pip 版本 20.2.2 或更高版本 (64 bit)** ### 1.2 如何查看您的环境 * 需要确认 python 的版本是否满足要求 - * 使用以下命令确认是 3.6/3.7/3.8/3.9 + * 使用以下命令确认是 3.6/3.7/3.8/3.9/3.10 ``` python --version @@ -30,7 +30,7 @@ ``` -* 需要确认 Python 和 pip 是 64bit,并且处理器架构是 x86_64(或称作 x64、Intel 64、AMD64)架构,目前 PaddlePaddle 不支持 arm64 架构。下面的第一行输出的是"64bit",第二行输出的是"x86_64"、"x64"或"AMD64"即可: +* 需要确认 Python 和 pip 是 64bit,并且处理器架构是 x86_64(或称作 x64、Intel 64、AMD64)架构。下面的第一行输出的是"64bit",第二行输出的是"x86_64"、"x64"或"AMD64"即可: ``` python -c "import platform;print(platform.architecture()[0]);print(platform.machine())" @@ -51,17 +51,17 @@ * 如果您的计算机有 NVIDIA® GPU,请确保满足以下条件并且安装 GPU 版 PaddlePaddle - * **CUDA 工具包 10.1/10.2 配合 cuDNN v7.6.5+** - - * **CUDA 工具包 11.0 配合 cuDNN v8.0.2** + * **CUDA 工具包 10.1/10.2 配合 cuDNN v7.6.5** * **CUDA 工具包 11.1 配合 cuDNN v8.1.1** * **CUDA 工具包 11.2 配合 cuDNN v8.2.1** + * **CUDA 工具包 11.6 配合 cuDNN v8.4.0** + * **GPU 运算能力超过 3.5 的硬件设备** - * 注:目前官方发布的 windows 安装包仅包含 CUDA 10.1/10.2/11.0/11.1/11.2,如需使用其他 cuda 版本,请通过源码自行编译。您可参考 NVIDIA 官方文档了解 CUDA 和 CUDNN 的安装流程和配置方法,请见[CUDA](https://docs.nvidia.com/cuda/cuda-installation-guide-microsoft-windows/index.html),[cuDNN](https://docs.nvidia.com/deeplearning/sdk/cudnn-install/) + * 注:目前官方发布的 windows 安装包仅包含 CUDA 10.1/10.2/11.1/11.2/11.6,如需使用其他 cuda 版本,请通过源码自行编译。您可参考 NVIDIA 官方文档了解 CUDA 和 CUDNN 的安装流程和配置方法,请见[CUDA](https://docs.nvidia.com/cuda/cuda-installation-guide-linux/),[cuDNN](https://docs.nvidia.com/deeplearning/sdk/cudnn-install/) @@ -70,14 +70,14 @@ -#### 2.1 CPU 版的 PaddlePaddle +#### 2.1 CPU 版的 PaddlePaddle ``` - python -m pip install paddlepaddle==0.0.0 -f https://www.paddlepaddle.org.cn/whl/windows/cpu-mkl-avx/develop.html + python -m pip install paddlepaddle==2.3.2 -i https://pypi.tuna.tsinghua.edu.cn/simple ``` -#### 2.2 GPU 版的 PaddlePaddle +#### 2.2 GPU 版的 PaddlePaddle @@ -85,7 +85,7 @@ ``` - python -m pip install paddlepaddle-gpu==0.0.0.post101 -f https://www.paddlepaddle.org.cn/whl/windows/gpu/develop.html + python -m pip install paddlepaddle-gpu==2.3.2.post101 -f https://www.paddlepaddle.org.cn/whl/windows/mkl/avx/stable.html ``` @@ -93,38 +93,75 @@ ``` - python -m pip install paddlepaddle-gpu==0.0.0.post102 -f https://www.paddlepaddle.org.cn/whl/windows/gpu/develop.html + python -m pip install paddlepaddle-gpu==2.3.2 -i https://pypi.tuna.tsinghua.edu.cn/simple ``` -2.2.3 CUDA11.0 的 PaddlePaddle +2.2.3 CUDA11.1 的 PaddlePaddle + + ``` + python -m pip install paddlepaddle-gpu==2.3.2.post111 -f https://www.paddlepaddle.org.cn/whl/windows/mkl/avx/stable.html + ``` + +2.2.4 CUDA11.2 的 PaddlePaddle ``` - python -m pip install paddlepaddle-gpu==0.0.0.post110 -f https://www.paddlepaddle.org.cn/whl/windows/gpu/develop.html + python -m pip install paddlepaddle-gpu==2.3.2.post112 -f https://www.paddlepaddle.org.cn/whl/windows/mkl/avx/stable.html ``` -2.2.4 CUDA11.1 的 PaddlePaddle +2.2.5 CUDA11.6 的 PaddlePaddle + + ``` + python -m pip install paddlepaddle-gpu==2.3.2.post116 -f https://www.paddlepaddle.org.cn/whl/windows/mkl/avx/stable.html + ``` + + +注: + +* 如果你使用的是安培架构的 GPU,推荐使用 CUDA11 以上。如果你使用的是非安培架构的 GPU,推荐使用 CUDA10.2,性能更优。 + +* 请确认需要安装 PaddlePaddle 的 Python 是您预期的位置,因为您计算机可能有多个 Python。根据您的环境您可能需要将说明中所有命令行中的 python 替换为具体的 Python 路径。 + +* 上述命令默认安装`avx`的包。如果你的机器不支持`avx`,需要安装`noavx`的 Paddle 包,可以通过以下命令安装,仅支持 python3.8: + 首先使用如下命令将 wheel 包下载到本地,再使用`python -m pip install [name].whl`本地安装([name]为 wheel 包名称): + + * cpu、mkl 版本 noavx 机器安装: ``` - python -m pip install paddlepaddle-gpu==0.0.0.post111 -f https://www.paddlepaddle.org.cn/whl/windows/gpu/develop.html + python -m pip download paddlepaddle==2.3.2 -f https://www.paddlepaddle.org.cn/whl/windows/mkl/noavx/stable.html --no-index --no-deps ``` + * cpu、openblas 版本 noavx 机器安装: + + ``` + python -m pip download paddlepaddle==2.3.2 -f https://www.paddlepaddle.org.cn/whl/windows/openblas/noavx/stable.html --no-index --no-deps + ``` -2.2.5 CUDA11.2 的 PaddlePaddle + * gpu 版本 cuda10.1 noavx 机器安装: ``` - python -m pip install paddlepaddle-gpu==0.0.0.post112 -f https://www.paddlepaddle.org.cn/whl/windows/gpu/develop.html + python -m pip download paddlepaddle-gpu==2.3.2.post101 -f https://www.paddlepaddle.org.cn/whl/windows/mkl/noavx/stable.html --no-index --no-deps ``` + * gpu 版本 cuda10.2 noavx 机器安装: -注: + ``` + python -m pip download paddlepaddle-gpu==2.3.2 -f https://www.paddlepaddle.org.cn/whl/windows/mkl/noavx/stable.html --no-index --no-deps + ``` -* 如果你使用的是安培架构的 GPU,推荐使用 CUDA11.2。如果你使用的是非安培架构的 GPU,推荐使用 CUDA10.2,性能更优。请参考: [GPU 架构对照表](https://www.paddlepaddle.org.cn/documentation/docs/zh/install/Tables.html#nvidia-gpu) + 判断你的机器是否支持`avx`,可以安装[CPU-Z](https://www.cpuid.com/softwares/cpu-z.html)工具查看“处理器-指令集”。 + +* 如果你想安装`avx`、`openblas`的 Paddle 包,可以通过以下命令将 wheel 包下载到本地,再使用`python -m pip install [name].whl`本地安装([name]为 wheel 包名称): + + ``` + python -m pip download paddlepaddle==2.3.2 -f https://www.paddlepaddle.org.cn/whl/windows/openblas/avx/stable.html --no-index --no-deps + ``` + +* 如果你想安装联编`tensorrt`的 Paddle 包,可以参考[下载安装 Windows 预测库](https://paddleinference.paddlepaddle.org.cn/user_guides/download_lib.html#windows)。 -* 请确认需要安装 PaddlePaddle 的 Python 是您预期的位置,因为您计算机可能有多个 Python。根据您的环境,可能需要将上述命令行中所有 `python` 替换为具体的 `Python 解释器` 路径(例如 C:\Python37\python.exe)。 ## **三、验证安装** @@ -133,10 +170,6 @@ 如果出现`PaddlePaddle is installed successfully!`,说明您已成功安装。 -注: - -* 由于飞桨使用 Visual Studio 进行编译,使用时需要操作系统自带 Visual C++运行时库,大部分情况下 Windows 系统已默认自带,但对于某些纯净版系统可能未安装,若 `import paddle` 后出现 `DLL load failed` 报错,请下载 https://aka.ms/vs/17/release/vc_redist.x64.exe 安装后再次尝试。 - ## **四、如何卸载** 请使用以下命令卸载 PaddlePaddle: diff --git a/docs/install/pip/windows-pip_en.md b/docs/install/pip/windows-pip_en.md index 3ca6cf109be..6c3157c2fc2 100644 --- a/docs/install/pip/windows-pip_en.md +++ b/docs/install/pip/windows-pip_en.md @@ -5,15 +5,15 @@ ### 1.1 PREQUISITES * **Windows 7/8/10 Pro/Enterprise (64bit)** -* **GPU Version support CUDA 10.1/10.2/11.0/11.1/11.2, and only support single GPU** -* **Python version 3.6+/3.7+/3.8+/3.9+(64bit)** +* **GPU Version support CUDA 10.1/10.2/11.1/11.2/11.6, and only support single GPU** +* **Python version 3.6+/3.7+/3.8+/3.9+/3.10+(64bit)** * **pip version 20.2.2 or above (64bit)** ### 1.2 How to check your environment * Confirm whether the Python version meets the requirements - * Use the following command to confirm that it is 3.6+/3.7+/3.8+/3.9+ + * Use the following command to confirm that it is 3.6+/3.7+/3.8+/3.9+/3.10+ python --version @@ -28,7 +28,7 @@ python -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" +* You need to confirm that Python and pip are 64bit, and the processor architecture is x86_64(or called x64、Intel 64、AMD64). The first line below outputs "64bit", and the second line outputs "x86_64", "x64" or "AMD64" ``` python -c "import platform;print(platform.architecture()[0]);print(platform.machine())" @@ -50,14 +50,14 @@ If you installed Python via Homebrew or the Python website, `pip` was installed * If your computer has NVIDIA® GPU, please make sure that the following conditions are met and install [the GPU Version of PaddlePaddle](#gpu) - * **CUDA toolkit 10.1/10.2 with cuDNN v7.6.5+** - - * **CUDA toolkit 11.0 with cuDNN v8.0.2** + * **CUDA toolkit 10.1/10.2 with cuDNN v7.6.5** * **CUDA toolkit 11.1 with cuDNN v8.1.1** * **CUDA toolkit 11.2 with cuDNN v8.2.1** + * **CUDA toolkit 11.6 with cuDNN v8.4.0** + * **GPU CUDA capability over 3.5** 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/) @@ -68,60 +68,95 @@ If you installed Python via Homebrew or the Python website, `pip` was installed You can choose the following version of PaddlePaddle to start installation: -#### 2.1 CPU Versoion of PaddlePaddle + +#### 2.1 CPU Version of PaddlePaddle ``` - python -m pip install paddlepaddle==0.0.0 -f https://www.paddlepaddle.org.cn/whl/windows/cpu-mkl-avx/develop.html + python -m pip install paddlepaddle==2.3.2 -i https://pypi.tuna.tsinghua.edu.cn/simple ``` -#### 2.2 GPU Version of PaddlePaddle +#### 2.2 GPU Version of PaddlePaddle 2.2.1 If you are using CUDA 10.1 ``` - python -m pip install paddlepaddle-gpu==0.0.0.post101 -f https://www.paddlepaddle.org.cn/whl/windows/gpu/develop.html + python -m pip install paddlepaddle-gpu==2.3.2.post101 -f https://www.paddlepaddle.org.cn/whl/windows/mkl/avx/stable.html ``` 2.2.2 If you are using CUDA 10.2 ``` - python -m pip install paddlepaddle-gpu==0.0.0.post102 -f https://www.paddlepaddle.org.cn/whl/windows/gpu/develop.html + python -m pip install paddlepaddle-gpu==2.3.2 -i https://pypi.tuna.tsinghua.edu.cn/simple ``` -2.2.3 If you are using CUDA 11.0 +2.2.3 If you are using CUDA 11.1 ``` - python -m pip install paddlepaddle-gpu==0.0.0.post110 -f https://www.paddlepaddle.org.cn/whl/windows/gpu/develop.html + python -m pip install paddlepaddle-gpu==2.3.2.post111 -f https://www.paddlepaddle.org.cn/whl/windows/mkl/avx/stable.html ``` -2.2.4 If you are using CUDA 11.1 - +2.2.4 If you are using CUDA 11.2 ``` - python -m pip install paddlepaddle-gpu==0.0.0.post111 -f https://www.paddlepaddle.org.cn/whl/windows/gpu/develop.html + python -m pip install paddlepaddle-gpu==2.3.2.post112 -f https://www.paddlepaddle.org.cn/whl/windows/mkl/avx/stable.html ``` - -2.2.5 If you are using CUDA 11.2 +2.2.5 If you are using CUDA 11.6 ``` - python -m pip install paddlepaddle-gpu==0.0.0.post112 -f https://www.paddlepaddle.org.cn/whl/windows/gpu/develop.html + python -m pip install paddlepaddle-gpu==2.3.2.post116 -f https://www.paddlepaddle.org.cn/whl/windows/mkl/avx/stable.html ``` Note: -* If you are using ampere-based GPU, CUDA 11.2 is recommended; otherwise CUDA 10.2 is recommended for better performance. please refer to: [GPU architecture comparison table](https://www.paddlepaddle.org.cn/documentation/docs/en/install/Tables.html#nvidia-gpu) +* If you are using ampere-based GPU, CUDA 11 above version is recommended; otherwise CUDA 10.2 is recommended for better performance. * Please confirm that the Python where you need to install PaddlePaddle is your expected location, because your computer may have multiple Python. Depending on the environment, you may need to replace Python in all command lines in the instructions with specific Python path. +* The above commands install the `avx` package by default. If your machine does not support `avx`, you need to install the Paddle package of `noavx`, you can use the following command to install,noavx version paddle wheel only support python3.8: + + First use the following command to download the wheel package to the local, and then use `python -m pip install [name].whl` to install locally ([name] is the name of the wheel package): + + * cpu and mkl version installed on noavx machine: + + ``` + python -m pip download paddlepaddle==2.3.2 -f https://www.paddlepaddle.org.cn/whl/windows/mkl/noavx/stable.html --no-index --no-deps + ``` + + * cpu and openblas version installed on noavx machine: + + ``` + python -m pip download paddlepaddle==2.3.2 -f https://www.paddlepaddle.org.cn/whl/windows/openblas/noavx/stable.html --no-index --no-deps + ``` + + * GPU cuda10.1 version install on noavx machine: + + ``` + python -m pip download paddlepaddle-gpu==2.3.2.post101 -f https://www.paddlepaddle.org.cn/whl/windows/mkl/noavx/stable.html --no-index --no-deps + ``` + + * GPU cuda10.2 version install on noavx machine: + + ``` + python -m pip download paddlepaddle-gpu==2.3.2 -f https://www.paddlepaddle.org.cn/whl/windows/mkl/noavx/stable.html --no-index --no-deps + ``` + + To determine whether your machine supports `avx`, you can install the [CPU-Z](https://www.cpuid.com/softwares/cpu-z.html) tool to view the "processor-instruction set". + + +* If you want to install the Paddle package with `avx` and `openblas`, you can use the following command to download the wheel package to the local, and then use `python -m pip install [name].whl` to install locally ([name] is the name of the wheel package): + + ``` + python -m pip download paddlepaddle==2.3.2 -f https://www.paddlepaddle.org.cn/whl/windows/openblas/avx/stable.html --no-index --no-deps + ``` ## Verify installation