-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix install doc and yaml path #843
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 6 commits
dc72af9
a71945d
c4125c2
56fc2ae
74a9d69
ce88e66
a29c2a6
0cf4563
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,48 @@ | ||
# Installation | ||
|
||
--- | ||
This tutorial introduces how to install PaddleClas and its requirements. | ||
|
||
## Introduction | ||
## 1. Install PaddlePaddle | ||
|
||
This document introduces how to install PaddleClas and its requirements. | ||
`PaddlePaddle 2.0` or later is required for PaddleClas. You can use the following steps to install PaddlePaddle. | ||
|
||
## Install PaddlePaddle | ||
### 1.1 Environment requirements | ||
|
||
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. | ||
- python 3.x | ||
- cuda >= 10.1 (necessary if you want to use paddlepaddle-gpu) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 我们现在对显卡驱动版本是不是也有限制?是要大于440还是多少来着? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 已补充相关信息 |
||
- cudnn >= 7.6.4 (necessary if you want to use paddlepaddle-gpu) | ||
- nccl >= 2.1.2 (necessary if you want the use distributed training/eval) | ||
- gcc 8.2 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 这里是正好是8.2还是要高于,gcc版本是个不太好调的东西,如果高版本可用,最好标>=吧 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 好的,我改成大于等于,目前paddle提供的安装包和docker都是要求gcc82或者以上了 |
||
|
||
Docker is recomended to run Paddleclas, for more detailed information about docker and nvidia-docker, you can refer to the [tutorial](https://www.runoob.com/docker/docker-tutorial.html). | ||
|
||
### Install PaddlePaddle using pip | ||
If you do not want to use docker, you can skip section 1.2 and go into section 1.3 directly. | ||
|
||
|
||
### 1.2 (Recommended) Prepare a docker environment. The first time you use this docker image, it will be downloaded automatically. Please be patient. | ||
|
||
|
||
``` | ||
# Switch to the working directory | ||
cd /home/Projects | ||
# You need to create a docker container for the first run, and do not need to run the current command when you run it again | ||
# Create a docker container named ppcls and map the current directory to the /paddle directory of the container | ||
# It is recommended to set a shared memory greater than or equal to 8G through the --shm-size parameter | ||
sudo docker run --name ppcls -v $PWD:/paddle --shm-size=8G --network=host -it docker pull paddlepaddle/paddle:2.1.0 /bin/bash | ||
|
||
# Use the following command to create a container if you want to use GPU in the container | ||
sudo nvidia-docker run --name ppcls -v $PWD:/paddle --shm-size=8G --network=host -it docker pull paddlepaddle/paddle:2.1.0-gpu-cuda10.2-cudnn7 /bin/bash | ||
``` | ||
|
||
You can also visit [DockerHub](https://hub.docker.com/r/paddlepaddle/paddle/tags/) to get more docker images. | ||
|
||
``` | ||
# use ctrl+P+Q to exit docker, to re-enter docker using the following command: | ||
sudo docker container exec -it ppcls /bin/bash | ||
``` | ||
|
||
### 1.3 Install PaddlePaddle using pip | ||
|
||
If you want to use PaddlePaddle on GPU, you can use the following command to install PaddlePaddle. | ||
|
||
|
@@ -25,11 +56,11 @@ If you want to use PaddlePaddle on CPU, you can use the following command to ins | |
pip3 install paddlepaddle --upgrade -i https://mirror.baidu.com/pypi/simple | ||
``` | ||
|
||
### Install PaddlePaddle from source code | ||
|
||
You can also compile PaddlePaddle from source code, please refer to [Installation](http://www.paddlepaddle.org.cn/install/quick). | ||
**Note:** | ||
* 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. | ||
* 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. | ||
|
||
Verify Installation | ||
### 1.4 Verify Installation process | ||
|
||
```python | ||
import paddle | ||
|
@@ -43,14 +74,15 @@ python3 -c "import paddle; print(paddle.__version__)" | |
``` | ||
|
||
Note: | ||
- Make sure the compiled version is later than PaddlePaddle2.0. | ||
- Make sure the compiled source code is later than PaddlePaddle2.0. | ||
- 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. | ||
- 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. | ||
- 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. | ||
|
||
|
||
|
||
## Install PaddleClas | ||
## 2. Install PaddleClas | ||
|
||
**Clone PaddleClas: ** | ||
### 2.1 Clone PaddleClas source code | ||
|
||
``` | ||
git clone https://github.com/PaddlePaddle/PaddleClas.git -b develop | ||
|
@@ -62,16 +94,10 @@ If it is too slow for you to download from github, you can download PaddleClas f | |
git clone https://gitee.com/paddlepaddle/PaddleClas.git -b develop | ||
``` | ||
|
||
**Install requirements** | ||
### 2.2 Install requirements | ||
|
||
``` | ||
pip3 install --upgrade -r requirements.txt -i https://mirror.baidu.com/pypi/simple | ||
``` | ||
|
||
If the install process of visualdl failed, you can try the following commands. | ||
PaddleClas dependencies are listed in file `requirements.txt`, you can use the following command to install the dependencies. | ||
|
||
``` | ||
pip3 install --upgrade visualdl -i https://mirror.baidu.com/pypi/simple | ||
pip3 install --upgrade -r requirements.txt -i https://mirror.baidu.com/pypi/simple | ||
``` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 这个是不是区分国内和国外用户?国内用户才建议使用baidu的源 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 国外用户应该也是可以用百度源的,显式地写出来,可以更换 |
||
|
||
What's more, visualdl is just supported in python3, so python3 is needed if you want to use visualdl. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2.0我记得是不是有点问题,这里是不是要写的更细一些,比如2.0.2