[router] add basic usage doc (#8640)
This commit is contained in:
@@ -54,12 +54,35 @@ pip install -e .
|
|||||||
```bash
|
```bash
|
||||||
# Build Rust components
|
# Build Rust components
|
||||||
cargo build
|
cargo build
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Launch Router with Worker URLs in regular mode
|
||||||
|
```bash
|
||||||
# Launch router with worker URLs
|
# Launch router with worker URLs
|
||||||
python -m sglang_router.launch_router \
|
python -m sglang_router.launch_router \
|
||||||
--worker-urls http://worker1:8000 http://worker2:8000
|
--worker-urls http://worker1:8000 http://worker2:8000
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### Launch Router with Worker URLs in prefill-decode mode
|
||||||
|
```bash
|
||||||
|
# Note that the prefill and decode URLs must be provided in the following format:
|
||||||
|
# http://<ip>:<port> for decode nodes
|
||||||
|
# http://<ip>:<port> bootstrap-port for prefill nodes, where bootstrap-port is optional
|
||||||
|
# Launch router with worker URLs
|
||||||
|
python -m sglang_router.launch_router \
|
||||||
|
--pd-disaggregation \
|
||||||
|
--policy cache_aware \
|
||||||
|
--prefill http://127.0.0.1:30001 9001 \
|
||||||
|
--prefill http://127.0.0.2:30002 9002 \
|
||||||
|
--prefill http://127.0.0.3:30003 9003 \
|
||||||
|
--prefill http://127.0.0.4:30004 9004 \
|
||||||
|
--decode http://127.0.0.5:30005 \
|
||||||
|
--decode http://127.0.0.6:30006 \
|
||||||
|
--decode http://127.0.0.7:30007 \
|
||||||
|
--host 0.0.0.0 \
|
||||||
|
--port 8080
|
||||||
|
````
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
### Logging
|
### Logging
|
||||||
|
|||||||
Reference in New Issue
Block a user