-
Notifications
You must be signed in to change notification settings - Fork 13
Docker Quick Start #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
Harry-Yu-Shuhang
wants to merge
10
commits into
Open-LLM-VTuber:main
Choose a base branch
from
Harry-Yu-Shuhang:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
32ff45f
Docker Init
Harry-Yu-Shuhang ad8a480
TO Run Docker Image Part
Harry-Yu-Shuhang 0b0e1bf
Remind user to modify conf.yaml before start
Harry-Yu-Shuhang 7fd6abb
Update docker.md
Harry-Yu-Shuhang bd3a80e
魔法上网更新
Harry-Yu-Shuhang 98cfdb6
Merge branch 'Open-LLM-VTuber:main' into main
Harry-Yu-Shuhang 2c7e0ca
sildebar position adjust
Harry-Yu-Shuhang a01a650
Merge branch 'main' of https://github.com/Harry-Yu-Shuhang/open-llm-v…
Harry-Yu-Shuhang a62d345
add conf download
Harry-Yu-Shuhang 59cc4e7
docker顺序更改
Harry-Yu-Shuhang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| --- | ||
| sidebar_position: 5 | ||
| sidebar_position: 6 | ||
| --- | ||
|
|
||
| # 智能体 (Agent) | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,56 +1,126 @@ | ||
| --- | ||
| sidebar_position: 8 | ||
| sidebar_position: 3 | ||
| --- | ||
|
|
||
| import Tabs from '@theme/Tabs'; | ||
| import TabItem from '@theme/TabItem'; | ||
|
|
||
| # Docker 部署 | ||
|
|
||
| :::danger | ||
| 由于重构幅度较大,Docker 镜像暂时还没有更新到 `v1.0.0` 版本,但是很快会更新。 | ||
| :::info 开始之前 | ||
| 请复制一份配置文件模板 | ||
|
|
||
| [点击这里前往中文配置文件网页](https://github.com/Open-LLM-VTuber/Open-LLM-VTuber/blob/main/config_templates/conf.ZH.default.yaml) | ||
|
|
||
| 在网页右上角,有一个"Download raw file"按钮,如下图,点击进行下载 | ||
|
|
||
|  | ||
|
|
||
| 下载完成后,将您的配置文件改名为conf.yaml,并将以下部分 | ||
|
|
||
| ```yaml | ||
| 'system_config': | ||
| 'host': '127.0.0.1' | ||
| ``` | ||
|
|
||
| 的**host改为0.0.0.0** | ||
| ```yaml | ||
| 'system_config': | ||
| 'host': '0.0.0.0' | ||
| ``` | ||
|
|
||
| 然后,如果自己有想修改的配置,就修改conf.yaml,更换asr,llm,tts等。将改好的conf.yaml放到一个特定的路径,后面运行 Docker 容器这一步的Volumes需要填写conf.yaml所在的文件夹。 | ||
|
|
||
| ::: | ||
| :::tip 关于安装方式 | ||
| 目前支持两种方式。 | ||
| - 如果您是小白,推荐您[使用Docker DeskTop](#使用docker-desktop)。 | ||
| - 如果您对Docker比较熟悉,也可以[使用终端命令](#使用终端命令)。 | ||
| ::: | ||
|
|
||
| :::warning | ||
| ⚠️ 请注意:此功能目前处于实验阶段,但在大多数情况下可以正常工作。 | ||
| :::caution 关于GPU支持 | ||
| 目前**仅支持CPU和Nvidia GPU**, 且GPU需要配置好Nvidia驱动, 如果还没配置好, 请[**点击这里查看配置攻略**](../../quick-start.md#nvidia-gpu-支持)。 | ||
|
|
||
| 如果您不打算使用GPU,而是**调用api**(这也是**绝大多数用户体验最好的方式**),或者使用CPU,可以忽略此步。 | ||
| ::: | ||
|
|
||
| 您可以选择自行构建 Docker 镜像,或者直接从 Docker Hub 拉取已构建的镜像:[](https://hub.docker.com/r/t41372/open-llm-vtuber) | ||
| :::note 关于我们的docker团队 | ||
| 我们在 docker hub 成立了[openllmvtuber团队](https://hub.docker.com/orgs/openllmvtuber/members),目前docker镜像由[@Harry_Y](https://github.com/Harry-Yu-Shuhang)维护。 | ||
| ::: | ||
Harry-Yu-Shuhang marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| ## 使用须知 | ||
| ## 使用 Docker Desktop 安装 | ||
|
|
||
| - Docker 镜像体积较大(约 13GB),且某些可选模型在使用时需要额外下载,会占用更多存储空间 | ||
| - 仅支持 NVIDIA GPU 的设备 | ||
| - 需要安装并配置 [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html) 以支持 GPU 直通 | ||
| - 目前存在的问题:容器停止后部分模型需要重新下载(该问题将在后续版本修复) | ||
| - 不建议在 ARM 架构的设备上构建镜像,因为依赖项 gRPC 可能会出现构建失败的情况([相关 issue](https://github.com/grpc/grpc/issues/34998)) | ||
| - 如需在远程服务器上运行,必须配置 HTTPS。这是因为前端网页的麦克风/摄像头/屏幕录制功能只能在安全上下文(localhost 或 HTTPS 环境)中使用 | ||
| ### 下载 Docker Desktop | ||
|
|
||
| ## 预装模型说明 | ||
| 访问 [Docker Desktop 下载页面](https://www.docker.com/products/docker-desktop)。 | ||
|
|
||
| 默认镜像已预装大部分语音识别(ASR)和文本转语音(TTS)模型。但考虑到体积因素(约 8GB,会使总体积增加到 25GB)和性能表现,默认构建不包含以下模型: | ||
| - Bark TTS | ||
| - 原版 OpenAI Whisper(注意:这里指的是 Whisper,而非 WhisperCPP) | ||
| 点击 "Download Docker Desktop" | ||
|
|
||
| 如需在镜像中包含这些模型,请在构建时添加参数: | ||
| ```bash | ||
| --build-arg INSTALL_ORIGINAL_WHISPER=true --build-arg INSTALL_BARK=true | ||
| ``` | ||
|  | ||
|
|
||
| ## 部署步骤 | ||
| 根据电脑类型选择对应版本 | ||
|
|
||
| 1. 在构建镜像前,请先检查并调整 `conf.yaml` 配置文件(当前配置会被构建进镜像) | ||
| :::tip 如何选择适用于自己电脑的版本 | ||
| - **Mac Apple Silicon** → 新款 Mac (M1/M2/M3 芯片) | ||
| - **Mac Intel Chip** → 老款 Mac (Intel 处理器) | ||
| - **Windows AMD64** → 大部分 Windows 电脑 (Intel/AMD 64 位) | ||
| - **Windows ARM64** → 少见,仅 ARM 架构 Windows (如 Surface Pro X) | ||
| ::: | ||
|
|
||
| 2. 构建 Docker 镜像: | ||
| ```bash | ||
| docker build -t open-llm-vtuber . | ||
| ``` | ||
| > 提示:构建过程可能需要较长时间 | ||
| 如果您还不确定,可以按如下方法查看系统设置: | ||
|
|
||
| <Tabs groupId="operating-systems"> | ||
| <TabItem value="windows" label="Windows"> | ||
|
|
||
| 1. 右键 **此电脑 → 属性** | ||
| 2. 在 **系统类型** 一栏查看: | ||
| - “基于 x64 的处理器” → 选择 **Windows AMD64** | ||
| - “基于 ARM 的处理器” → 选择 **Windows ARM64** | ||
|
|
||
| 3. 准备 `conf.yaml` 配置文件 | ||
| 您可以从项目仓库获取,或直接通过此[链接](https://raw.githubusercontent.com/t41372/Open-LLM-VTuber/main/conf.yaml)下载 | ||
| </TabItem> | ||
| <TabItem value="macos" label="macOS"> | ||
|
|
||
| 4. 运行容器: | ||
| ```bash | ||
| docker run -it --net=host --rm -v $(pwd)/conf.yaml:/app/conf.yaml -p 12393:12393 open-llm-vtuber | ||
| 1. 点击屏幕左上角苹果图标 → **关于本机** | ||
| 2. 在“芯片”一栏查看: | ||
| - 显示 **Apple M1/M2/M3** → 选择 **Mac Apple Silicon** | ||
| - 显示 **Intel** → 选择 **Mac Intel Chip** | ||
|
|
||
| </TabItem> | ||
| </Tabs> | ||
|
|
||
| ### 启动 Docker Desktop | ||
|
|
||
| 双击下载好的安装包,按照提示完成安装。 | ||
|
|
||
| 安装完成后,点击 Docker Desktop 图标启动 Docker。 | ||
|
|
||
| 首次启动时,Docker Desktop 会要求您登录 Docker Hub 账号。如果您没有账号,需要先注册一个。 | ||
|
|
||
| ### 获取 Docker 镜像 | ||
|
|
||
| 点击顶部菜单的 **Search** 图标(或使用快捷键 `Ctrl + K`(Windows)或者`Cmd + K`(MacOS))。 | ||
|
|
||
|  | ||
|
|
||
| 在搜索框中输入以下内容,搜索到以后点击右侧的**Pull**按钮。 | ||
|
|
||
| ``` | ||
| openllmvtuber/open-llm-vtuber:latest | ||
| ``` | ||
| 注意:请将 `$(pwd)/conf.yaml` 替换为您的配置文件实际路径 | ||
|
|
||
| 5. 访问 `localhost:12393` 进行测试 | ||
|  | ||
|
|
||
| ### 运行 Docker 镜像 | ||
|
|
||
| 点击**Images**, 找到**openllmvtuber/open-llm-vtuber**, 点击右侧的运行按钮。 | ||
|  | ||
|
|
||
| ### 运行 Docker 容器 | ||
|
|
||
| 点开"Optional settings", 按照下图配置, | ||
|  | ||
|
|
||
| 然后等待,第一次拉取会比较慢。 | ||
|
|
||
|
|
||
| ## 使用终端命令安装 | ||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| --- | ||
| sidebar_position: 7 | ||
| sidebar_position: 8 | ||
| --- | ||
|
|
||
| # 翻译 (Translate) | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| --- | ||
| sidebar_position: 6 | ||
| sidebar_position: 7 | ||
| --- | ||
|
|
||
| # 语音合成 (TTS) | ||
|
|
||
2 changes: 1 addition & 1 deletion
2
i18n/en/docusaurus-plugin-content-docs/current/user-guide/backend/docker.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| --- | ||
| sidebar_position: 8 | ||
| sidebar_position: 2 | ||
| --- | ||
|
|
||
| # Docker Deployment | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
您好,这次更新移除了旧文档中的“使用须知”和“预装模型说明”部分,其中包含了一些关键信息,例如:
这些信息对于用户评估硬件需求、环境配置和功能选择至关重要,即使是使用 Docker Desktop 的用户也需要了解。建议在文档开头位置重新加入一个“部署要求”或“注意事项”部分,以确保用户能够顺利部署。