install_en.md 2.4 KB
Newer Older
1 2 3 4
# Installation

---

L
littletomatodonkey 已提交
5
## Introduction
6 7 8 9 10

This document introduces how to install PaddleClas and its requirements.

## Install PaddlePaddle

L
littletomatodonkey 已提交
11
Python 3.x, CUDA 10.0, CUDNN7.6.4 nccl2.1.2 and later version are required at first, For now, PaddleClas only support training on the GPU device. Please follow the instructions in the [Installation](http://www.paddlepaddle.org.cn/install/quick) if the PaddlePaddle on the device is lower than 2.0.0.
12

L
littletomatodonkey 已提交
13 14 15 16

### Install PaddlePaddle using pip

If you want to use PaddlePaddle on GPU, you can use the following command to install PaddlePaddle.
17 18

```bash
19
pip3 install paddlepaddle-gpu==2.0.0 --upgrade -i https://mirror.baidu.com/pypi/simple
20 21
```

L
littletomatodonkey 已提交
22 23 24
If you want to use PaddlePaddle on CPU, you can use the following command to install PaddlePaddle.

```bash
25
pip3 install paddlepaddle==2.0.0 --upgrade -i https://mirror.baidu.com/pypi/simple
L
littletomatodonkey 已提交
26 27 28 29 30
```

### Install PaddlePaddle from source code

You can also compile PaddlePaddle from source code, please refer to [Installation](http://www.paddlepaddle.org.cn/install/quick).
31 32 33 34

Verify Installation

```python
35 36
import paddle
paddle.utils.run_check()
37 38 39 40 41
```

Check PaddlePaddle version:

```bash
42
python3 -c "import paddle; print(paddle.__version__)"
43 44 45
```

Note:
L
littletomatodonkey 已提交
46
- Make sure the compiled version is later than PaddlePaddle2.0.
47
- 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.
48
- When running in docker, in order to ensure that the container has enough shared memory for data read 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.
49 50 51 52 53 54 55


## Install PaddleClas

**Clone PaddleClas: **

```
56
git clone https://github.com/PaddlePaddle/PaddleClas.git -b release/2.0
57 58
```

59
If it is too slow for you to download from github, you can download PaddleClas from gitee. The command is as follows.
60

61 62 63 64 65
```bash
git clone https://gitee.com/paddlepaddle/PaddleClas.git -b release/2.0
```

**Install requirements**
66 67

```
68
pip3 install --upgrade -r requirements.txt -i https://mirror.baidu.com/pypi/simple
69 70 71 72 73
```

If the install process of visualdl failed, you can try the following commands.

```
74
pip3 install --upgrade visualdl==2.1.1 -i https://mirror.baidu.com/pypi/simple
75 76 77 78

```

What's more, visualdl is just supported in python3, so python3 is needed if you want to use visualdl.