快速开始
本指南帮助您安装并运行 vLLM Semantic Router。路由器完全在 CPU 上运行,推理侧不需要 GPU。
系统要求
备注
无需 GPU——路由器在 CPU 上使用优化的 BERT 模型高效运行。
要求:
- Python:3.10 或更高
- 容器运行时:Docker(运行路由器容器所必需)
快速开始
1. 一行安装脚本(macOS/Linux)
curl -fsSL https://vllm-sr.ai/install.sh | bash
安装脚本会:
- 检测 Python 3.10 或更新版本
- 将最新开发版
vllm-sr安装到~/.local/share/vllm-sr - 在
~/.local/bin/vllm-sr写入启动器 - 除非您选择退出,否则为
vllm-sr serve准备 Docker - 在可能的情况下自动启动
vllm-sr serve并打开控制台 - 若无法打开浏览器,则打印控制台访问方式与远程服务器提示
若 ~/.local/bin 尚未在 PATH 中,安装脚本会打印需要添加的 export 行。
若您需要最新稳定版,请运行:
curl -fsSL https://vllm-sr.ai/install.sh | bash -s -- --channel stable
Windows 用户请使用下文手动 PyPI 流程。
2. 手动 PyPI 安装
# 建议创建虚拟环境
python -m venv vsr
source vsr/bin/activate # Windows:vsr\Scripts\activate
# 安装最新开发版
pip install --pre vllm-sr
# 若需要最新稳定版
pip install vllm-sr
验证安装:
vllm-sr --version