Installation of Baidu Flying Paddle in Ubuntu

1. Introduction to Paddle

  Baidu Paddle (PaddlePaddle) is an open source deep learning platform developed by Baidu based on deep learning technology. It provides a comprehensive deep learning framework and tools, and supports a variety of deep learning algorithms and models, including image recognition, natural language processing, speech recognition and other fields. Flying Paddle uses a combination of dynamic and static graphs, which is efficient, flexible, and easy to use. It helps users quickly build and train deep learning models and accelerate the implementation of deep learning applications. At the same time, Baidu Flying Paddle also provides a wealth of deep learning application scenarios and practical tutorials to help users gain an in-depth understanding of deep learning technology and applications. The blog post experiment environment is as follows:

  • Operating system: Ubuntu20.04.3 LTS
  • cuda version: 11.6
  • Python version: 3.8
  • Paddle version: 2.4

2. Installation steps

1. Install anconda3

  It is recommended to use pip or conda to install, so it is recommended to create a python virtual environment first, and you can install anconda3 first to create and manage the python virtual environment. For the installation steps, see the Anaconda3 installation in the blog post Ubuntu .

wuhs@jqxxpc:~$ wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-2020.02-Linux-x86_64.sh
wuhs@jqxxpc:~$ sh Anaconda3-2020.02-Linux-x86_64.sh

2. Create a paddle virtual environment

(base) wuhs@jqxxpc:~$ conda create --name paddle python=3.8
(base) wuhs@jqxxpc:~$ conda activate paddle
(paddle) wuhs@jqxxpc:~$

3. Select the installation method on the official website to obtain the installation command

  Visit the official website of Feijiang , select the Feijiang version to be installed, the type of operating system, the installation method, and the computing platform. The blogger here is an Ubuntu system, which is equipped with a cuda11.6 computing platform with graphics card selection. To view the cuda version, use the nvcc -V command. For the installation of cuda, please refer to the blog post Ubuntu cuda installation and historical version installation .
insert image description here

4. Execute the installation command

  Click the copy button to copy the installation command, and execute this command directly in the paddle virtual environment.

(paddle) wuhs@jqxxpc:~$ conda install paddlepaddle-gpu==2.4.2 cudatoolkit=11.6 -c https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/ -c conda-forge

Proceed ([y]/n)? y

Preparing transaction: done
Verifying transaction: done
Executing transaction: | b’By downloading and using the CUDA Toolkit conda packages, you accept the terms and conditions of the CUDA End User License Agreement (EULA): https://docs.nvidia.com/cuda/eula/index.html\n’
| b’By downloading and using the cuDNN conda packages, you accept the terms and conditions of the NVIDIA cuDNN EULA -\n https://docs.nvidia.com/deeplearning/cudnn/sla/index.html\n’
done

5. Installation verification

  After the installation is complete, enter the python command to enter the python interactive mode, and use the following method to check whether the paddle is successfully installed. If you see "PaddlePaddle is installed successfully!", the installation is successful. Use paddle.__version__ to view the paddle version.

(paddle) wuhs@jqxxpc:~$ python
>>> import paddle
>>> paddle.utils.run_check()
Running verify PaddlePaddle program …
PaddlePaddle works well on 1 GPU.
W0509 17:21:14.797003 3684118 fuse_all_reduce_op_pass.cc:79] 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 2 GPUs.
PaddlePaddle is installed successfully! Let’s start deep learning with PaddlePaddle now.
#使用paddle.__version__查看paddle版本。
>>> import paddle
>>> paddle.version
‘2.4.2’

Guess you like

Origin blog.csdn.net/carefree2005/article/details/130582356