INSTALL.md 2.4 KB
Newer Older
W
wangguibao 已提交
1 2 3 4 5
# Install

## 系统需求

OS: Linux
W
wangguibao 已提交
6

W
wangguibao 已提交
7
CMake: 3.2
W
wangguibao 已提交
8

W
wangguibao 已提交
9 10 11 12
python

## 编译
```shell
W
wangguibao 已提交
13 14
$ git clone https://github.com/PaddlePaddle/serving.git
$ cd serving
W
wangguibao 已提交
15 16 17 18 19 20
$ mkdir build
$ cd build
$ cmake ..
$ make -j4
$ make install
```
W
wangguibao 已提交
21 22 23 24 25

`make install`将把目标产出放在/path/to/paddle-serving/build/output/目录下,目录结构:

```
.
W
wangguibao 已提交
26
|-- bin                             # Paddle Serving protobuf编译插件pdcodegen所在目录
W
wangguibao 已提交
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
|-- demo                            # demo总目录
|   |-- client
|   |   |-- dense_format            # dense_format客户端
|   |   |   |-- bin                 # bin/dense_format是dense_format客户端bin
|   |   |   `-- conf
|   |   |-- echo                    # echo服务客户端
|   |   |   |-- bin                 # bin/echo是echo客户端bin
|   |   |   \-- conf
|   |   |-- image_classification    # image_classification服务客户端
|   |   |   |-- bin                 # bin/ximage是image_classification客户端bin
|   |   |   |-- conf
|   |   |   |-- data
|   |   |      `-- images
|   |   |-- int64tensor_format      # int64tensor_format服务客户端
|   |   |   |-- bin                 # bin/int64tensor_format是客户端bin
|   |   |   `-- conf
|   |   `-- sparse_format           # sparse_format客户端
|   |       |-- bin                 # bin/sparse_format是客户端bin
|   |       `-- conf
|   `-- serving                     # serving端,同时提供echo/dense_format/sparse_format/int64tensor_format/image_class等5种服务
|       |-- bin                     # bin/serving是serving端可执行bin
|       |-- conf                    # 配置文件目录
|       |-- data
|       |   `-- model
|       |       `-- paddle
|       |           `-- fluid
|       |               `-- SE_ResNeXt50_32x4d  # image_classification模型
W
wangguibao 已提交
54
`-- lib                             # Paddle Serving产出的静态库文件: libpdseving.a, libsdk-cpp.a, libconfigure.a, libfluid_cpu_engine.a
W
wangguibao 已提交
55 56 57
```

如要编写新的预测服务,请参考[从零开始写一个预测服务](CREATING.md)
W
wangguibao 已提交
58 59 60

# CMake编译选项说明

61 62
| 编译选项 | 说明 |
|----------|------|
W
Wang Guibao 已提交
63 64 65
| WITH_AVX | For configuring PaddlePaddle. Compile PaddlePaddle with AVX intrinsics |
| WITH_MKL | For configuring PaddlePaddle. Compile PaddlePaddle with MKLML library |
| WITH_GPU | For configuring PaddlePaddle. Compile PaddlePaddle with NVIDIA GPU |
66
| CLINET_ONLY | Compile client libraries and demos only |