Skip to content

chore(deploy): 新增自建识别服务,一条命令在 GPU 服务器上部署 Qwen3-ASR - #184

Merged
sunerpy merged 4 commits into
mainfrom
deploy/selfhost-asr
Oct 24, 2026
Merged

sunerpy merged 4 commits into
mainfrom
deploy/selfhost-asr

Conversation

@sunerpy

@sunerpy sunerpy commented Oct 24, 2026

Copy link
Copy Markdown
Owner

概要

  • 新增 deploy/selfhost/:一条命令在装有 NVIDIA 显卡的 Linux 服务器上部署 vLLM 和 Qwen3-ASR,前面是 nginx 网关和 Caddy(有域名时自动 HTTPS)。Voltip 以「自定义接口」使用它。
    • 网关:只放行 tokens 文件中的令牌(日志只记行号),只开放 POST /v1/audio/transcriptions 和 GET /v1/models,按客户端地址限流(只信任本机 Caddy 发来的 X-Forwarded-For),上传 32 MB 以内且只在内存中处理,识别超过 120 秒返回 504。
    • install.sh:检查显卡、驱动和 CUDA 版本,选择模型(8 GB 显存起默认 1.7B)、精度(计算能力低于 8.0 用 float16)和 vLLM 镜像(CUDA 13 或 12.9);--install-deps 时安装 nvidia-utils、Docker 和 NVIDIA Container Toolkit;重跑即升级,令牌和设置保留。
    • vLLM 镜像用 docker run + docker commit 加上 vllm[audio]:用 docker build 时 BuildKit 缓存会多留一份约 23 GB 的基础镜像。
  • 网站新增「自建识别服务」页(中英文),云端服务页加链接;验收台账新增一行;verify-all 的 web 组新增 selfhost-gateway(需要 Docker)。

测试

  • deploy/selfhost/test_gateway.py:9 个测试,用真实 nginx 镜像加 vLLM 桩。去掉令牌检查和真实地址信任后有 4 个失败。
  • AWS 首尔区域临时实例(测试后已删除实例、磁盘和安全组):
    • g6.xlarge(L4):从只装驱动的 Ubuntu 24.04 一键安装(含 Docker 等)12 分 34 秒;HTTPS 证书;401、404 和 HTTP 跳转;从外部经 HTTPS 识别。
    • voltip-server 0.1.7 以自定义接口识别,词典中的写法作为热词生效。
    • 延迟、并发、6 种显存设置、ModelScope 下载,结果写在页面中。
    • 同一台改为 g4dn.xlarge(T4):开机自启,重跑安装改用 float16,从本分支 curl | sh 全新安装 12 分 20 秒,按页面的方法卸载后没有残留。
  • shellcheck、验收台账、生产主机名检查、release helpers(150 个)通过。

未覆盖

  • 驱动低于 580 时使用的 CUDA 12.9 镜像没有在真机上测试(测试机的驱动是 595)。
  • 网站侧栏在 firlab 的 config/zh.ts、config/en.ts 中手写,内容同步后另开 firlab PR 加上本页。

deploy/selfhost/ 部署 vLLM 与 Qwen3-ASR,前面是检查访问令牌、按地址限流的 nginx 网关和 Caddy(有域名时 HTTPS);网站新增「自建识别服务」页面,附实测的用时、显存和调优说明。
@codecov

codecov Bot commented Oct 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #184      +/-   ##
==========================================
- Coverage   93.79%   93.79%   -0.01%     
==========================================
  Files         388      388              
  Lines       55271    55271              
  Branches     3743     3743              
==========================================
- Hits        51842    51840       -2     
- Misses       2933     2935       +2     
  Partials      496      496              
Flag Coverage Δ
rust 93.91% <ø> (-0.01%) ⬇️
web 93.30% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 6 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sunerpy
sunerpy merged commit 3c1b643 into main Oct 24, 2026
28 of 30 checks passed
@sunerpy
sunerpy deleted the deploy/selfhost-asr branch October 24, 2026 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant