Skip to content

Commit 46962eb

Browse files
TingquanGaocuicheng01
authored andcommitted
docs: merge docs about paddle & paddleclas installation
1 parent 307620f commit 46962eb

File tree

3 files changed

+59
-61
lines changed

3 files changed

+59
-61
lines changed

docs/en/installation/install_paddle_en.md renamed to docs/en/installation.md

Lines changed: 59 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,46 @@
1-
# Install PaddlePaddle
1+
# Preparation
22

33
---
4-
54
## Catalogue
5+
- [1. Prepara Environment](#1)
6+
- [1.1 Install PaddlePaddle](#1.1)
7+
- [1.1.1 By Docker](#1.1.1)
8+
- [1.1.2 By pip](#1.1.2)
9+
- [1.1.3 Check Installation](#1.1.3)
10+
- [1.2 Get PaddleClas](#1.2)
11+
- [1.3 Install Requirements](#1.3)
12+
- [2. 快速创建PaddlePaddle, PaddleClas环境](#2)
13+
614

715
- [1. Environment requirements](#1)
816
- [2.(Recommended) Prepare a docker environment](#2)
917
- [3. Install PaddlePaddle using pip](#3)
1018
- [4. Verify installation](#4)
1119

12-
At present, **PaddleClas** requires **PaddlePaddle** version `>=2.0`. Docker is recomended to run Paddleclas, for more detailed information about docker and nvidia-docker, you can refer to the [tutorial](https://docs.docker.com/get-started/). If you do not want to use docker, you can skip section [2. (Recommended) Prepare a docker environment](#2), and go into section [3. Install PaddlePaddle using pip](#3).
20+
Docker is recomended to run Paddleclas, for more detailed information about docker and nvidia-docker, you can refer to the [tutorial](https://docs.docker.com/get-started/). If you do not want to use docker, you can skip section [1.1.1 (Recommended) Install PaddlePaddle by docker](#1.1.1), and go into section [1.1.2 Install PaddlePaddle by pip](#1.1.2).
1321

1422
<a name="1"></a>
1523

16-
## 1. Environment requirements
24+
## 1. Prepara Environment
25+
26+
<a name="1.1"></a>
27+
28+
## 1.1 Install PaddlePaddle
1729

1830
- python 3.x
19-
- cuda >= 10.1 (necessary if paddlepaddle-gpu is used)
31+
- cuda >= 10.2 (necessary if paddlepaddle-gpu is used)
2032
- cudnn >= 7.6.4 (necessary if paddlepaddle-gpu is used)
2133
- nccl >= 2.1.2 (necessary distributed training/eval is used)
2234
- gcc >= 8.2
2335

2436
**Recomends**:
25-
* When CUDA version is 10.1, the driver version `>= 418.39`;
37+
2638
* When CUDA version is 10.2, the driver version `>= 440.33`;
2739
* For more CUDA versions and specific driver versions, please refer to [link](https://docs.nvidia.com/deploy/cuda-compatibility/index.html).
2840

41+
<a name="1.1.1"></a>
2942

30-
<a name="2"></a>
31-
## 2. (Recommended) Prepare a docker environment
43+
## 1.1.1 (Recommended) Install PaddlePaddle by Docker
3244

3345
* Switch to the working directory
3446

@@ -41,10 +53,10 @@ The following commands will create a docker container named ppcls and map the cu
4153

4254
```shell
4355
# For GPU users
44-
sudo nvidia-docker run --name ppcls -v $PWD:/paddle --shm-size=8G --network=host -it paddlepaddle/paddle:2.1.0-gpu-cuda10.2-cudnn7 /bin/bash
56+
sudo nvidia-docker run --name ppcls -v $PWD:/paddle --shm-size=8G --network=host -it registry.baidubce.com/paddlepaddle/paddle:2.4.2-gpu-cuda10.2-cudnn7.6-trt7.0 /bin/bash
4557

4658
# For CPU users
47-
sudo docker run --name ppcls -v $PWD:/paddle --shm-size=8G --network=host -it paddlepaddle/paddle:2.1.0 /bin/bash
59+
sudo docker run --name ppcls -v $PWD:/paddle --shm-size=8G --network=host -it registry.baidubce.com/paddlepaddle/paddle:2.4.2 /bin/bash
4860
```
4961

5062
**Notices**:
@@ -56,12 +68,12 @@ sudo docker run --name ppcls -v $PWD:/paddle --shm-size=8G --network=host -it pa
5668
* After entering the docker container, you can exit the current container by pressing `Ctrl + P + Q` without closing the container;
5769
* To re-enter the container, use the following command:
5870
```shell
59-
sudo Docker exec -it ppcls /bin/bash
71+
sudo docker exec -it ppcls /bin/bash
6072
```
6173

62-
<a name="3"></a>
74+
<a name="1.1.2"></a>
6375

64-
## 3. Install PaddlePaddle using pip
76+
## 1.1.2 Install PaddlePaddle by pip
6577

6678
If you want to use PaddlePaddle on GPU, you can use the following command to install PaddlePaddle.
6779

@@ -79,9 +91,9 @@ pip install paddlepaddle --upgrade -i https://mirror.baidu.com/pypi/simple
7991
* If you have already installed CPU version of PaddlePaddle and want to use GPU version now, you should uninstall CPU version of PaddlePaddle and then install GPU version to avoid package confusion.
8092
* You can also compile PaddlePaddle from source code, please refer to [PaddlePaddle Installation tutorial](http://www.paddlepaddle.org.cn/install/quick) to more compilation options.
8193

82-
<a name="4"></a>
94+
<a name="1.1.3"></a>
8395

84-
## 4. Verify Installation
96+
## 1.1.3 Check Installation
8597

8698
```python
8799
import paddle
@@ -98,3 +110,35 @@ Note:
98110
* Make sure the compiled source code is later than PaddlePaddle2.0.
99111
* Indicate `WITH_DISTRIBUTE=ON` when compiling, Please refer to [Instruction](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/install/Tables.html#id3) for more details.
100112
* When running in docker, in order to ensure that the container has enough shared memory for dataloader acceleration of Paddle, please set the parameter `--shm-size=8g` at creating a docker container, if conditions permit, you can set it to a larger value.
113+
114+
<a name="1.2"></a>
115+
116+
## 1.2 Get PaddleClas
117+
118+
Clone PaddleClas source code
119+
120+
```shell
121+
git clone https://github.com/PaddlePaddle/PaddleClas.git -b develop
122+
```
123+
124+
If it is too slow for you to download from github, you can download PaddleClas from gitee. The command is as follows.
125+
126+
```shell
127+
git clone https://gitee.com/paddlepaddle/PaddleClas.git -b develop
128+
```
129+
130+
<a name="1.3"></a>
131+
132+
## 1.3 Install Requirements
133+
134+
* **[Recommended]** Installing from PyPI:
135+
136+
```shell
137+
pip install paddleclas
138+
```
139+
140+
* Please build and install locally if you need to use the develop branch of PaddleClas to experience the latest functions, or need to redevelop based on PaddleClas. The command is as follows:
141+
142+
```shell
143+
python setup.py install
144+
```

docs/en/installation/index.rst

Lines changed: 0 additions & 8 deletions
This file was deleted.

docs/en/installation/install_paddleclas_en.md

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
 (0)