---
comments: true
---
# PaddleX Serving Guide
Serving is a common deployment strategy in real-world production environments. By encapsulating inference functions into services, clients can access these services via network requests to obtain inference results. PaddleX supports various solutions for serving pipelines.
Demonstration of PaddleX pipeline serving:
To address different user needs, PaddleX offers multiple pipeline serving solutions:
- **Basic serving**: A simple and easy-to-use serving solution with low development costs.
- **High-stability serving**: Built on [NVIDIA Triton Inference Server](https://developer.nvidia.com/triton-inference-server). Compared to basic serving, this solution offers higher stability and allows users to adjust configurations to optimize performance.
**It is recommended to first use the basic serving solution for quick verification**, and then evaluate whether to try more complex solutions based on actual needs.
Note
- PaddleX serves pipelines rather than modules.
## 1. Basic Serving
### 1.1 Install the Serving Plugin
Execute the following command to install the serving plugin:
```bash
paddlex --install serving
```
### 1.2 Run the Server
Run the server via PaddleX CLI:
```bash
paddlex --serve --pipeline {pipeline name or path to pipeline config file} [{other commandline options}]
```
Take the general image classification pipeline as an example:
```bash
paddlex --serve --pipeline image_classification
```
You can see the following information:
```text
INFO: Started server process [63108]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:8080 (Press CTRL+C to quit)
```
`--pipeline` can be specified as the official pipeline name or the path to a local pipeline configuration file. PaddleX builds the pipeline and deploys it as a service. If you need to adjust configurations (such as model paths, batch size, device for deployment, etc.), please refer to the "Model Application" section in [General Image Classification Pipeline Tutorial](../pipeline_usage/tutorials/cv_pipelines/image_classification.en.md).
The command-line options related to serving are as follows:
| Name | Description |
|---|---|
--pipeline |
Pipeline name or path to the pipeline configuration file. |
--device |
Device for pipeline deployment. By default the GPU will be used when it is available; otherwise, the CPU will be used. |
--host |
Hostname or IP address the server binds to. Defaults to 0.0.0.0. |
--port |
Port number the server listens on. Defaults to 8080. |
--use_hpip |
If specified, enables the high-performance inference plugin. |
--hpi_config |
High-performance inference configuration |