MASS-Base 是一个开源的模型服务(Model-as-a-Service)基础平台,用于高效管理和调度 AI 模型推理服务。它支持多种推理引擎(vLLM、SGLang、TensorRT-LLM 等),可跨多节点进行性能优化与资源编排。
MASS-Base 由以下核心组件构成:
sudo docker run -d --name mass-base \
--restart unless-stopped \
-p 80:80 \
--volume mass-base-data:/var/lib/mass-base \
mass-base/mass-base
启动后查看日志:
sudo docker logs -f mass-base
获取默认管理员密码:
sudo docker exec mass-base cat /var/lib/mass-base/initial_admin_password
在浏览器中访问 http://your_host_ip,使用用户名 admin 和获取到的密码登录。
使用 API Key 调用 OpenAI 兼容接口:
export MASS_API_KEY=your_api_key
curl http://your_mass_base_server_url/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $MASS_API_KEY" \
-d '{
"model": "your-model-name",
"messages": [
{ "role": "system", "content": "You are a helpful assistant." },
{ "role": "user", "content": "Tell me a joke." }
],
"stream": true
}'
安装 Python 3.10 ~ 3.12。
执行构建:
make build
构建产物位于 dist 目录。
# 安装开发依赖
make install
# 本地开发启动(需先运行数据库)
uv run gpustack start \
--database-url postgresql://postgres:mysecretpassword@localhost:5432/postgres \
--gateway-mode disabled \
--api-port 80
更多开发指南请参考 Development Guide。
完整文档请访问 官方文档站点。
有任何问题或建议,欢迎加入我们的 Discord 社区 获取支持。
Copyright (c) 2024-2026 The MASS-Base authors
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at LICENSE.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.