use fast souces

This commit is contained in:
2026-10-08 11:40:52 +08:00
parent 4746331515
commit 176d722c77
8 changed files with 70 additions and 8 deletions

View File

@@ -15,3 +15,7 @@ WHISPER_TTL=-1
# 模型下载地址:国内默认走 hf-mirror.com 镜像;能直连 Hugging Face 时改为空值(HF_ENDPOINT=)
HF_ENDPOINT=https://hf-mirror.com
# 国内拉取 ghcr 较慢时走 DaoCloud;能直连 GitHub 时改为:
# WHISPER_IMAGE=ghcr.io/speaches-ai/speaches:latest-cuda
WHISPER_IMAGE=docker.m.daocloud.io/ghcr.io/speaches-ai/speaches:latest-cuda

View File

@@ -9,7 +9,7 @@ OpenAI 兼容语音转写服务,使用 faster-whisper(CTranslate2)推理
```text
whisper/
docker-compose.yml GPU 服务编排(ghcr.io/speaches-ai/speaches:latest-cuda)
docker-compose.yml GPU 服务编排(默认经 DaoCloud 拉 ghcr 镜像)
.env.example 配置模板(模型、端口、计算类型)
systemd/whisper-transcribe.service systemd 模板
verify.sh 部署验证脚本
@@ -27,7 +27,7 @@ sudo chown "$USER":"$USER" /opt/whisper
cp -a whisper/. /opt/whisper/ # 注意用 whisper/. 而不是 whisper/*,否则不会复制 .env.example 等隐藏文件
cd /opt/whisper
cp .env.example .env # 按需修改 WHISPER_MODEL
cp .env.example .env # 按需修改 WHISPER_MODEL / WHISPER_IMAGE
docker compose up -d
docker compose logs -f whisper # 首次启动下载模型(约 3 GB),看到启动完成即可
```
@@ -79,6 +79,8 @@ L4(24 GB 显存)可同时常驻两个模型;Speaches 支持在请求的 `m
## 常见问题
- 拉取 Speaches 镜像慢:默认镜像为 `docker.m.daocloud.io/ghcr.io/speaches-ai/speaches:latest-cuda`;
能直连 GitHub 时在 `.env` 设 `WHISPER_IMAGE=ghcr.io/speaches-ai/speaches:latest-cuda`。
- 首次启动下载模型慢或失败:默认已使用国内镜像 `https://hf-mirror.com`(可在 `.env`
的 `HF_ENDPOINT` 覆盖);仍失败可改用代理,在 `docker-compose.yml` 的
`environment` 里加 `HTTP_PROXY`/`HTTPS_PROXY` 后 `docker compose up -d`。

View File

@@ -1,6 +1,6 @@
services:
whisper:
image: ghcr.io/speaches-ai/speaches:latest-cuda
image: ${WHISPER_IMAGE:-docker.m.daocloud.io/ghcr.io/speaches-ai/speaches:latest-cuda}
container_name: whisper-transcribe
restart: unless-stopped
ports: