From a82a144f6de5d4dd751ab3550794fad05068b479 Mon Sep 17 00:00:00 2001 From: LauraGPT <18321252+LauraGPT@users.noreply.github.com> Date: Sun, 30 Aug 2026 10:11:59 +0000 Subject: [PATCH] docs(container): stop advertising private GHCR pulls Keep local Docker builds as the public path until the SenseVoice package is made public. Cover both READMEs with a regression test. Refs #339 Signed-off-by: LauraGPT <18321252+LauraGPT@users.noreply.github.com> --- README.md | 21 ++++++--------------- README_zh.md | 26 ++++++++++++++++++-------- tests/test_container_contract.py | 13 +++++++++++-- 3 files changed, 35 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 1cb8aba..d7c157e 100644 --- a/README.md +++ b/README.md @@ -303,32 +303,23 @@ pip3 install -e ./ SenseVoice can be built and run using Docker to simplify setup, ensure reproducibility, and support both CPU and GPU inference. -### Official image - -The official `linux/amd64` runtime image is published to GitHub Container Registry. Model weights are not embedded in the image; they are downloaded into the mounted `/models` cache on first start. - -```bash -docker pull ghcr.io/qwenaudio/sensevoice:latest -docker run --rm --gpus all \ - -p 50000:50000 \ - -v sensevoice-models:/models \ - ghcr.io/qwenaudio/sensevoice:latest -``` - -Open `http://127.0.0.1:50000/docs` after the container becomes healthy. Release tags and immutable `sha-` tags are available in the [container package](https://github.com/QwenAudio/SenseVoice/pkgs/container/sensevoice). - ### Build with Docker ```bash docker build -t sensevoice . ``` +> The build workflow also publishes `ghcr.io/qwenaudio/sensevoice`, but the +> package is currently private and anonymous pulls return HTTP 401. Use the +> local build above until the [container package](https://github.com/QwenAudio/SenseVoice/pkgs/container/sensevoice) +> is marked Public. + ### Run (GPU – default) ```bash docker run --gpus all -p 50000:50000 sensevoice ``` ### Run (CPU-only) ```bash -docker run --rm -e SENSEVOICE_DEVICE=cpu -p 50000:50000 -v sensevoice-models:/models ghcr.io/qwenaudio/sensevoice:latest +docker run --rm -e SENSEVOICE_DEVICE=cpu -p 50000:50000 -v sensevoice-models:/models sensevoice ``` ### Docker Compose Docker Compose provides an easier way to run SenseVoice with persistent model caching, networking etc. diff --git a/README_zh.md b/README_zh.md index ce0e7fe..30e2790 100644 --- a/README_zh.md +++ b/README_zh.md @@ -274,19 +274,29 @@ export SENSEVOICE_DEVICE=cuda:0 fastapi run --port 50000 ``` -### Docker 官方镜像 +### 使用 Docker 构建 -官方 `linux/amd64` 运行时镜像发布在 GitHub Container Registry。镜像不内置模型权重;首次启动会把权重下载到挂载的 `/models` 缓存。 +```bash +docker build -t sensevoice . +``` + +> 构建工作流也会发布 `ghcr.io/qwenaudio/sensevoice`,但该容器包当前为 +> private,匿名拉取会返回 HTTP 401。在[容器包页面](https://github.com/QwenAudio/SenseVoice/pkgs/container/sensevoice) +> 显示 Public 之前,请使用上面的本地构建。 + +### 运行(GPU,默认) + +```bash +docker run --rm --gpus all -p 50000:50000 -v sensevoice-models:/models sensevoice +``` + +### 运行(仅 CPU) ```bash -docker pull ghcr.io/qwenaudio/sensevoice:latest -docker run --rm --gpus all \ - -p 50000:50000 \ - -v sensevoice-models:/models \ - ghcr.io/qwenaudio/sensevoice:latest +docker run --rm -e SENSEVOICE_DEVICE=cpu -p 50000:50000 -v sensevoice-models:/models sensevoice ``` -容器健康后访问 `http://127.0.0.1:50000/docs`。版本 tag 和不可变的 `sha-` tag 见 [容器包页面](https://github.com/QwenAudio/SenseVoice/pkgs/container/sensevoice)。CPU 模式增加 `-e SENSEVOICE_DEVICE=cpu` 并移除 `--gpus all`。 +容器健康后访问 `http://127.0.0.1:50000/docs`。 ## 微调 diff --git a/tests/test_container_contract.py b/tests/test_container_contract.py index 082b4c5..d1fc0c0 100644 --- a/tests/test_container_contract.py +++ b/tests/test_container_contract.py @@ -39,16 +39,25 @@ def test_container_workflow_builds_prs_and_only_pushes_trusted_refs(self): workflow, ) - def test_readme_uses_public_ghcr_image_and_real_service_port(self): + def test_readme_uses_real_service_port_and_no_retired_registry(self): readme = (ROOT / "README.md").read_text(encoding="utf-8") - self.assertIn("ghcr.io/qwenaudio/sensevoice", readme.lower()) self.assertIn("-p 50000:50000", readme) self.assertNotIn( "registry.cn-hangzhou.aliyuncs.com/funasr/sensevoice", readme, ) + def test_readmes_do_not_offer_private_ghcr_image_as_anonymous_pull(self): + for name in ("README.md", "README_zh.md"): + readme = (ROOT / name).read_text(encoding="utf-8").lower() + + self.assertNotIn( + "docker pull ghcr.io/qwenaudio/sensevoice:latest", + readme, + ) + self.assertIn("docker build -t sensevoice .", readme) + if __name__ == "__main__": unittest.main()