diff --git a/docs/development-guide/backend/docker.mdx b/docs/development-guide/backend/docker.mdx new file mode 100644 index 000000000..cfb0fb47a --- /dev/null +++ b/docs/development-guide/backend/docker.mdx @@ -0,0 +1,54 @@ +--- +sidebar_position: 2 +--- + +# Docker 本地构建指南 + +> 如果你想要的是使用我们提供的 docker 镜像部署 Open-LLM-VTuber 项目,可以看看 [Docker 部署](../../user-guide/backend/docker.md) + +## 说明 +- 项目的多架构镜像构建与推送已由 GitHub Actions 自动完成。 +- 本文档仅用于开发者本地构建调试镜像,不使用 `docker buildx`。 + +## 本地环境要求 +- 已安装 `git` +- 已安装 Docker(建议 Docker Engine 24+ 或 Docker Desktop 最新稳定版) +- 可选:已安装 Docker Compose 插件(仅在你需要 `docker compose` 时) +- 建议预留至少 `10GB` 可用磁盘空间(首次构建会下载较多依赖) + +可用以下命令自检: +``` +git --version +docker --version +docker compose version +``` + +## 获取代码 +``` +git clone https://github.com/Open-LLM-VTuber/Open-LLM-VTuber.git +cd Open-LLM-VTuber +``` + +## 本地构建镜像(单架构) +在项目根目录执行: +``` +docker build -t openllmvtuber/open-llm-vtuber:local -f dockerfile . +``` + +如需自定义镜像名或标签,替换 `openllmvtuber/open-llm-vtuber:local` 即可。 + +## 可选:本地运行验证 +运行前请确认 `conf/conf.yaml` 已存在: +``` +docker run --rm -it \ + -p 12393:12393 \ + -v "$(pwd)/conf:/app/conf" \ + -v "$(pwd)/models:/app/models" \ + openllmvtuber/open-llm-vtuber:local +``` + +## 清理本地 Docker 数据 +``` +docker system prune -a --volumes +``` + diff --git a/docs/quick-start.md b/docs/quick-start.md index 37068354d..a34d9cb17 100644 --- a/docs/quick-start.md +++ b/docs/quick-start.md @@ -63,6 +63,23 @@ Groq Whisper API、OpenAI API 等国外大模型/推理平台 API 一般无法 对于本快速开始文档选择的组件,你需要一个速度正常的 CPU (ASR),一个 Ollama 支持的 GPU (LLM),以及网路链接 (TTS)。 +## Docker 快速启动 + +:::info 说明 +Docker是**最适合小白**的部署方式,它可以一键部署所有组件,无需手动配置。 +::: + +如果你对 Docker 感兴趣,请移步[Docker 部署指南](./user-guide/backend/docker.md)。 + +如果不感兴趣,您也可以跳转到常规配置方法,从下一步,也就是[环境准备](#环境准备)步骤开始。 + +:::note 目前的docker镜像对平台支持情况如下表 +| 平台 | CPU 支持 | NVIDIA GPU 支持 | AMD/Intel GPU 支持 | +|----------|----------|-----------------|--------------------| +| Linux | ✅ | ✅ | ❌ | +| Windows | ✅ | ✅[(需安装Nvidia驱动)](#nvidia-gpu-支持) | ❌ | +| macOS | ✅ | ❌ | ❌ | +::: ## 环境准备 @@ -377,9 +394,6 @@ source ~/.zshrc # 如果使用 zsh - - - ### 2. 安装项目依赖 :::info diff --git a/docs/user-guide/backend/agent.md b/docs/user-guide/backend/agent.md index dcc73a191..6220c4934 100644 --- a/docs/user-guide/backend/agent.md +++ b/docs/user-guide/backend/agent.md @@ -1,5 +1,5 @@ --- -sidebar_position: 5 +sidebar_position: 6 --- # 智能体 (Agent) diff --git a/docs/user-guide/backend/asr.md b/docs/user-guide/backend/asr.md index 373770359..a51a5d3f6 100644 --- a/docs/user-guide/backend/asr.md +++ b/docs/user-guide/backend/asr.md @@ -1,5 +1,5 @@ --- -sidebar_position: 3 +sidebar_position: 4 --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; diff --git a/docs/user-guide/backend/docker.md b/docs/user-guide/backend/docker.md index ac8e49ba2..a133300b2 100644 --- a/docs/user-guide/backend/docker.md +++ b/docs/user-guide/backend/docker.md @@ -1,56 +1,258 @@ --- -sidebar_position: 8 +sidebar_position: 3 --- +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + # Docker 部署 -:::danger -由于重构幅度较大,Docker 镜像暂时还没有更新到 `v1.0.0` 版本,但是很快会更新。 +> 关于本地构建 docker 镜像,参考 [Docker 本地构建指南](../../development-guide/backend/docker.mdx) + +## 关于我们的docker团队 +我们在 docker hub 成立了[openllmvtuber团队](https://hub.docker.com/orgs/openllmvtuber/members),目前docker镜像由[@Harry_Y](https://github.com/Harry-Yu-Shuhang)维护。 + +## 下载配置文件 + +### git下载(适合有git基础的用户) +先[按照Quick Start安装 git](../../quick-start.md#安装-git) +, 然后下载docker用户配置文件: + +```bash +git clone https://github.com/Open-LLM-VTuber/OLV-Docker-Config +``` + +### zip下载(适合没有代码基础的用户) +:::warning +这样下载的话,配置文件`conf.yaml`只能[手动更新](#手动更新)。 +::: +首先,[点击这里前往用户配置代码仓库](https://github.com/Open-LLM-VTuber/OLV-Docker-Config) + +然后,在网页右上角,点击 `Code` -> `Download ZIP` 下载 docker 用户配置, 如下图。 + +![](/docker_img/download_docker_conf_repo.png) + +## 修改配置文件 +如果自己有想修改的配置,就修改配置文件`conf.yaml`。 + +:::info 默认的 `conf.yaml` 是英文的,如果想替换成中文,请到 `config_templates` 文件夹下复制 `conf.ZH.default.yaml`, 然后回到上一级, 替换掉原来的 `conf.yaml` +::: + +如果你是小白,建议直接用默认的配置文件,可以一键启动。 + +如果你想改一些配置,比如人设、模型、asr、tts等,请修改`conf.yaml`的对应字段。 + +关于配置文件里各个字段的作用,可以参考配置文件里的注释。 + +## 安装 Docker + +:::tip 关于安装方式 +目前支持两种方式。 +- 如果您是小白,推荐您[使用 Docker DeskTop](#使用-docker-desktop-安装-docker) 。 +- 如果您对 Docker 比较熟悉,也可以[使用终端命令](#使用终端命令安装-docker)。 +::: + +:::caution 关于GPU支持 +目前**仅支持CPU和Nvidia GPU**, 且GPU需要配置好Nvidia驱动, 如果还没配置好, 请[**点击这里前往Quick Start查看配置攻略**](../../quick-start.md#nvidia-gpu-支持)。 + +如果您不打算使用GPU,而是**调用api**(这也是**绝大多数用户体验最好的方式**),或者使用CPU,可以忽略此步。 +::: + +:::note 关于我们`Docker`团队 +我们在 docker hub 成立了[openllmvtuber团队](https://hub.docker.com/orgs/openllmvtuber/members),目前Docker镜像由[@Harry_Y](https://github.com/Harry-Yu-Shuhang)维护。 +::: + +## 使用 Docker Desktop 安装 Docker + +:::warning 由于 `Docker Desktop` 退出重启经常卡死,建议尽量避免重启,如果重启很久以后没有反应,可以在任务管理器 (`Windows`) 或者 活动监视器 (`macOS`) 里杀掉 `Docker Desktop` 的后台进程,然后再次启动。 +::: + +### 下载 Docker Desktop + +访问 [Docker Desktop 下载页面](https://www.docker.com/products/docker-desktop)。 + +点击 "Download Docker Desktop" + +![alt text](/docker_img/download_docker_desktop.png) + +根据电脑类型选择对应版本 + +:::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) +::: + +如果您还不确定,可以按如下方法查看系统设置: + + + + +1. 右键 **此电脑 → 属性** +2. 在 **系统类型** 一栏查看: + - “基于 x64 的处理器” → 选择 **Windows AMD64** + - “基于 ARM 的处理器” → 选择 **Windows ARM64** + + + + +1. 点击屏幕左上角苹果图标 → **关于本机** +2. 在“芯片”一栏查看: + - 显示 **Apple M1/M2/M3** → 选择 **Mac Apple Silicon** + - 显示 **Intel** → 选择 **Mac Intel Chip** + + + + +### 启动 Docker Desktop + +双击下载好的安装包,按照提示完成安装。 + +安装完成后,点击 Docker Desktop 图标启动 Docker。 + +首次启动时,Docker Desktop 会要求您登录 Docker Hub 账号。如果您没有账号,需要先注册一个。 + +### 获取 Docker 镜像 + +点击顶部菜单的 **Search** 图标(或使用快捷键 `Ctrl + K`(Windows)或者`Cmd + K`(MacOS))。 + +![alt text](/docker_img/click_search.png) + +在搜索框中输入以下内容,搜索到以后点击右侧的**Pull**按钮。 + +``` +openllmvtuber/open-llm-vtuber:latest +``` + +![alt text](/docker_img/openllmvtuber_image.png) + +### 配置 LLM +:::info 关于调用LLM的方式 +如果您使用本地模型,比如默认配置的 `Ollama`, 这一步必须做。 + +如果你选择api调用,可以跳过这一步。 ::: -:::warning -⚠️ 请注意:此功能目前处于实验阶段,但在大多数情况下可以正常工作。 +:::info 如果您是没有代码基础的小白 +建议按照以下步骤,直接使用默认的 `Ollama` 模型调用方式,省去配置麻烦。 + +
+ 1. 从 [Ollama 官网](https://ollama.com/) 下载并安装 Ollama 客户端。 + + 2. 终端输入以下指令,验证Ollama是否安装成功: + ```bash + ollama --version + ``` + + 3. 下载并运行模型(以默认配置文件的 `qwen2.5:latest` 为例): + ```bash + ollama run qwen2.5:latest + ``` + + 4. 查看已安装的模型。 + ```bash + ollama list + ``` +
::: -您可以选择自行构建 Docker 镜像,或者直接从 Docker Hub 拉取已构建的镜像:[![](https://img.shields.io/badge/t41372%2FOpen--LLM--VTuber-%25230db7ed.svg?logo=docker&logoColor=blue&labelColor=white&color=blue)](https://hub.docker.com/r/openllmvtuber/open-llm-vtuber) -## 使用须知 +更多注意事项,可以参考 [Quick Start 里的配置 LLM 部分](../../quick-start.md#3-配置-llm)。 + + +### 运行 Docker 容器 + +点击**Images**, 找到**openllmvtuber/open-llm-vtuber**, 点击右侧的运行按钮。 +![alt text](/docker_img/run_image.png) + +点开"Optional settings", 按照下图配置, +![alt text](/docker_img/container_config_cn.png) + + +### 在浏览器打开web界面 +等到出现这几行字,如下图,就说明启动成功了。第一次拉取会比较慢,因为要安装一些必要工具,请耐心等待。 +![](/docker_img/docker_run_success.png) -- 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 环境)中使用 +点击左上角的 `12393:12393`,如下图,或者在浏览器输入 `http://localhost:12393` +![](/docker_img/click_12393.png) -## 预装模型说明 +**恭喜你,成功了**,和你的虚拟伴侣对话吧! -默认镜像已预装大部分语音识别(ASR)和文本转语音(TTS)模型。但考虑到体积因素(约 8GB,会使总体积增加到 25GB)和性能表现,默认构建不包含以下模型: -- Bark TTS -- 原版 OpenAI Whisper(注意:这里指的是 Whisper,而非 WhisperCPP) +## 使用终端命令安装 Docker +1. 安装 Docker Desktop。 + + -如需在镜像中包含这些模型,请在构建时添加参数: ```bash ---build-arg INSTALL_ORIGINAL_WHISPER=true --build-arg INSTALL_BARK=true +winget install -e --id Docker.DockerDesktop ``` -## 部署步骤 + + -1. 在构建镜像前,请先检查并调整 `conf.yaml` 配置文件(当前配置会被构建进镜像) +```bash +brew install --cask docker +``` + + + + +2. 拉取最新镜像。 -2. 构建 Docker 镜像: ```bash -docker build -t open-llm-vtuber . +docker pull openllmvtuber/open-llm-vtuber:latest +``` + +3. 打包容器。可以更改 `docker-compose.yml`,默认的也可以直接一键启动。 +```bash +cd OLV-Docker-Config +``` + +```bash +docker-compose up -d +``` + +4. 查看容器的日志。 +```bash +docker logs -f open-llm-vtuber-latest ``` - > 提示:构建过程可能需要较长时间 -3. 准备 `conf.yaml` 配置文件 - 您可以从项目仓库获取,或直接通过此[链接](https://raw.githubusercontent.com/Open-LLM-VTuber/Open-LLM-VTuber/main/conf.yaml)下载 +5. 在浏览器打开web界面。 -4. 运行容器: +等到日志里出现 `Uvicorn running on http://0.0.0.0:12393` 以后,在浏览器输入 `http://localhost:12393` 打开web界面。 + +至此,你就成功部署了 Open LLM VTuber! + +## 更新 +### 更新配置文件 +有 git 更新和手动更新两种方式。 +#### git 更新 +在 `OLV-Docker-Config` 目录下运行以下命令: +```bash +git stash +git pull +git stash pop +``` +如有冲突请手动处理。 + +#### 手动更新 +手动对比新版 `conf.yaml` 与旧版 `conf.yaml`的不同,将需要更新的部分复制到旧的 `conf.yaml` 中。 + +ChatGPT推荐这个网站 [DiffCheck.ai — YAML Diff Checker](https://diffcheck.ai/yaml),你也可以自己找合适的网站。 + +### 拉取最新镜像 +如果用 `Docker Desktop`, 点击 `Image` 旁边的 `Pull` 即可。 + +如果用终端,运行以下命令: ```bash -docker run -it --net=host --rm -v $(pwd)/conf.yaml:/app/conf.yaml -p 12393:12393 open-llm-vtuber +docker pull openllmvtuber/open-llm-vtuber:latest ``` - 注意:请将 `$(pwd)/conf.yaml` 替换为您的配置文件实际路径 -5. 访问 `localhost:12393` 进行测试 +### 重启容器 +如果用 `Docker Desktop`, 点击 `Containers` 的 `Restart` 即可。 + +如果用终端,运行以下命令: +```bash +docker-compose up -d +``` \ No newline at end of file diff --git a/docs/user-guide/backend/llm.md b/docs/user-guide/backend/llm.md index 56074a43d..bb5dbf5ac 100644 --- a/docs/user-guide/backend/llm.md +++ b/docs/user-guide/backend/llm.md @@ -1,5 +1,5 @@ --- -sidebar_position: 4 +sidebar_position: 5 --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; diff --git a/docs/user-guide/backend/translate.md b/docs/user-guide/backend/translate.md index 6b0083636..c115162d8 100644 --- a/docs/user-guide/backend/translate.md +++ b/docs/user-guide/backend/translate.md @@ -1,5 +1,5 @@ --- -sidebar_position: 7 +sidebar_position: 8 --- # 翻译 (Translate) diff --git a/docs/user-guide/backend/tts.md b/docs/user-guide/backend/tts.md index 98ef6b0bd..0b9066714 100644 --- a/docs/user-guide/backend/tts.md +++ b/docs/user-guide/backend/tts.md @@ -1,5 +1,5 @@ --- -sidebar_position: 6 +sidebar_position: 7 --- # 语音合成 (TTS) diff --git a/i18n/en/docusaurus-plugin-content-docs/current/development-guide/backend/docker.mdx b/i18n/en/docusaurus-plugin-content-docs/current/development-guide/backend/docker.mdx new file mode 100644 index 000000000..6120c1cf8 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/development-guide/backend/docker.mdx @@ -0,0 +1,54 @@ +--- +sidebar_position: 2 +--- + +# Docker Local Build Guide + +> If you want to deploy Open-LLM-VTuber using our pre-built Docker images, see [Docker Deployment](../../user-guide/backend/docker.md) + +## Notes +- Multi-architecture image builds and pushes are automatically handled by GitHub Actions. +- This document is only for developers who want to build debug images locally, without using `docker buildx`. + +## Local Environment Requirements +- `git` installed +- Docker installed (Docker Engine 24+ or the latest stable Docker Desktop recommended) +- Optional: Docker Compose plugin installed (only if you need `docker compose`) +- At least `10GB` of free disk space recommended (first build downloads many dependencies) + +You can verify your environment with these commands: +``` +git --version +docker --version +docker compose version +``` + +## Get the Code +``` +git clone https://github.com/Open-LLM-VTuber/Open-LLM-VTuber.git +cd Open-LLM-VTuber +``` + +## Build Image Locally (Single Architecture) +Run in the project root directory: +``` +docker build -t openllmvtuber/open-llm-vtuber:local -f dockerfile . +``` + +To customize the image name or tag, replace `openllmvtuber/open-llm-vtuber:local` as needed. + +## Optional: Local Run Verification +Before running, ensure `conf/conf.yaml` exists: +``` +docker run --rm -it \ + -p 12393:12393 \ + -v "$(pwd)/conf:/app/conf" \ + -v "$(pwd)/models:/app/models" \ + openllmvtuber/open-llm-vtuber:local +``` + +## Clean Up Local Docker Data +``` +docker system prune -a --volumes +``` + diff --git a/i18n/en/docusaurus-plugin-content-docs/current/quick-start.md b/i18n/en/docusaurus-plugin-content-docs/current/quick-start.md index d013b1efd..9f23b7deb 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/quick-start.md +++ b/i18n/en/docusaurus-plugin-content-docs/current/quick-start.md @@ -55,6 +55,24 @@ This project supports various backends for speech recognition (ASR), large langu For the components selected in this quick start guide, you will need a CPU with normal speed (for ASR), a GPU supported by Ollama (for LLM), and an internet connection (for TTS). +## Docker Quick Start + +:::info Note +Docker is the easiest deployment method for beginners. It can deploy all components with one click and requires no manual configuration. +::: + +If you're interested in Docker, please refer to the [Docker Deployment Guide](./user-guide/backend/docker.md). + +If you're not interested, you can skip ahead to the general setup and start from the next step: [Environment Preparation](#environment-preparation). + +:::note Current Docker image platform support is as follows +| Platform | CPU Support | NVIDIA GPU Support | AMD/Intel GPU Support | +|----------|-------------|--------------------|-----------------------| +| Linux | ✅ | ✅ | ❌ | +| Windows | ✅ | ✅ [(requires Nvidia driver installation)](#nvidia-gpu-support) | ❌ | +| macOS | ✅ | ❌ | ❌ | +::: + ## Environment Preparation ### Install Git diff --git a/i18n/en/docusaurus-plugin-content-docs/current/user-guide/backend/agent.md b/i18n/en/docusaurus-plugin-content-docs/current/user-guide/backend/agent.md index 7cfb62dc1..1b9484b88 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/user-guide/backend/agent.md +++ b/i18n/en/docusaurus-plugin-content-docs/current/user-guide/backend/agent.md @@ -1,5 +1,5 @@ --- -sidebar_position: 5 +sidebar_position: 6 --- # Agent diff --git a/i18n/en/docusaurus-plugin-content-docs/current/user-guide/backend/asr.md b/i18n/en/docusaurus-plugin-content-docs/current/user-guide/backend/asr.md index 5a378f67b..0aa58910a 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/user-guide/backend/asr.md +++ b/i18n/en/docusaurus-plugin-content-docs/current/user-guide/backend/asr.md @@ -1,5 +1,5 @@ --- -sidebar_position: 3 +sidebar_position: 4 --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; diff --git a/i18n/en/docusaurus-plugin-content-docs/current/user-guide/backend/docker.md b/i18n/en/docusaurus-plugin-content-docs/current/user-guide/backend/docker.md index 8c0745436..5c679b53d 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/user-guide/backend/docker.md +++ b/i18n/en/docusaurus-plugin-content-docs/current/user-guide/backend/docker.md @@ -1,56 +1,260 @@ --- -sidebar_position: 8 +sidebar_position: 3 --- +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + # Docker Deployment -:::danger -Due to significant refactoring, the Docker image has not yet been updated to version `v1.0.0`, but it will be updated soon. +> For building Docker images locally, refer to the [Docker Local Build Guide](../../development-guide/backend/docker.mdx) + +## About Our Docker Team +We have established the [openllmvtuber team](https://hub.docker.com/orgs/openllmvtuber/members) on Docker Hub. +The Docker images are currently maintained by [@Harry_Y](https://github.com/Harry-Yu-Shuhang). + +## Download configuration files + +### Git clone (for users familiar with git) +First, [install git following the Quick Start](../../quick-start.md#install-git), then download the Docker user configuration: + +```bash +git clone https://github.com/Open-LLM-VTuber/OLV-Docker-Config +``` + +### Download ZIP (for users without coding experience) +:::warning +If you download it this way, the configuration file `conf.yaml` can only be [updated manually](#manual-update). +::: +First, [click here to go to the user configuration repository](https://github.com/Open-LLM-Vtuber/OLV-Docker-Config) + +Then, on the repository page, click `Code` -> `Download ZIP` to download the Docker user configuration, as shown below. + +![](/docker_img/download_docker_conf_repo.png) + +## Edit configuration files +If you want to change any settings, edit the `conf.yaml` file. + +:::info +The default `conf.yaml` is in English. If you want to replace it with Chinese, copy `conf.ZH.default.yaml` from the `config_templates` folder, go back one level, and replace the original `conf.yaml`. +::: + +If you're a beginner, it's recommended to use the default configuration file for one-click startup. + +If you want to change settings like character profile, model, ASR, TTS, etc., modify the corresponding fields in `conf.yaml`. + +For information about each field in the config file, refer to the comments inside the configuration file. + +## Install Docker + +:::tip About installation methods +Two installation methods are supported currently: +- If you're a beginner, we recommend [using Docker Desktop](#install-docker-using-docker-desktop). +- If you're familiar with Docker, you can [use terminal commands](#install-docker-using-terminal-commands). +::: + +:::caution About GPU support +Currently **only CPU and Nvidia GPU** are supported. Nvidia GPUs require proper Nvidia driver configuration. If you haven't set it up yet, please [**click here to view the setup guide in Quick Start**](../../quick-start.md#nvidia-gpu-support). + +If you don't plan to use a GPU and will instead **use API calls** (this is **the best experience for most users**) or use CPU only, you can skip this step. ::: -:::warning -⚠️ Please note: This feature is currently in an experimental stage but works normally in most cases. +:::note About our Docker team +We created an [openllmvtuber team on Docker Hub](https://hub.docker.com/orgs/openllmvtuber/members). Docker images are currently maintained by [@Harry_Y](https://github.com/Harry-Yu-Shuhang). ::: -You can choose to build the Docker image yourself or pull the pre-built image directly from Docker Hub: [![](https://img.shields.io/badge/t41372%2FOpen--LLM--VTuber-%25230db7ed.svg?logo=docker&logoColor=blue&labelColor=white&color=blue)](https://hub.docker.com/r/openllmvtuber/open-llm-vtuber) +## Install Docker using Docker Desktop -## Usage Notes +:::warning +Docker Desktop may hang during restart; try to avoid restarting when possible. If it becomes unresponsive for a long time, kill the Docker Desktop background process in Task Manager (Windows) or Activity Monitor (macOS) and then start it again. +::: + +### Download Docker Desktop + +Visit the [Docker Desktop download page](https://www.docker.com/products/docker-desktop). + +Click "Download Docker Desktop" + +![alt text](/docker_img/download_docker_desktop.png) + +Choose the version that matches your computer. + +:::tip How to choose the right version for your computer +- **Mac Apple Silicon** → Newer Macs (M1/M2/M3 chips) +- **Mac Intel Chip** → Older Macs (Intel processors) +- **Windows AMD64** → Most Windows PCs (Intel/AMD 64-bit) +- **Windows ARM64** → Rare, for ARM-based Windows (e.g., Surface Pro X) +::: + +If you are not sure, check your system settings as follows: + + + + +1. Right-click "This PC" → Properties +2. Under "System type" check: + - "x64-based processor" → Choose **Windows AMD64** + - "ARM-based processor" → Choose **Windows ARM64** -- The Docker image is large (about 13GB), and some optional models require additional downloads when used, occupying more storage space -- Only supports devices with NVIDIA GPUs -- Requires installation and configuration of [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html) to support GPU passthrough -- Current issue: Some models need to be re-downloaded after the container stops (this will be fixed in future versions) -- Building the image on ARM architecture devices is not recommended due to potential build failures with the gRPC dependency ([related issue](https://github.com/grpc/grpc/issues/34998)) -- If running on a remote server, HTTPS must be configured. This is because the frontend webpage's microphone/camera/screen recording features can only be used in a secure context (localhost or HTTPS environment) + + -## Pre-installed Model Information +1. Click the Apple icon at the top-left → "About This Mac" +2. Check the "Chip" (or "Processor") field: + - Shows **Apple M1/M2/M3** → Choose **Mac Apple Silicon** + - Shows **Intel** → Choose **Mac Intel Chip** -The default image comes with most Automatic Speech Recognition (ASR) and Text-to-Speech (TTS) models pre-installed. However, considering size factors (about 8GB, which would increase the total size to 25GB) and performance, the default build does not include the following models: -- Bark TTS -- Original OpenAI Whisper (Note: This refers to Whisper, not WhisperCPP) + + + +### Start Docker Desktop + +Double-click the downloaded installer and follow the prompts to install. + +After installation, click the Docker Desktop icon to start Docker. + +On first start, Docker Desktop will ask you to sign in to a Docker Hub account. If you don't have one, register first. + +### Pull the Docker image + +Click the top menu "Search" icon (or use the shortcut `Ctrl + K` on Windows or `Cmd + K` on macOS). + +![alt text](/docker_img/click_search.png) + +Enter the following in the search box. When you find it, click the "Pull" button on the right. + +``` +openllmvtuber/open-llm-vtuber:latest +``` + +![alt text](/docker_img/openllmvtuber_image.png) + +### Configure LLM +:::info About how to use LLM +If you use a local model (for example the default `Ollama`), this step is required. + +If you choose API calls, you can skip this step. +::: + +:::info +If you are a beginner with no coding background +We recommend following these steps to use the default `Ollama` model and avoid extra configuration. + +
+ 1. Download and install the Ollama client from the [Ollama official site](https://ollama.com/). + + 2. Verify Ollama installation: + ```bash + ollama --version + ``` + + 3. Download and run a model (the default config uses `qwen2.5:latest` as an example): + ```bash + ollama run qwen2.5:latest + ``` + + 4. List installed models: + ```bash + ollama list + ``` +
+::: + +For more details, refer to the LLM configuration section in [Quick Start](/docs/quick-start.md#3-configure-llm). + +### Run the Docker container + +Click "Images", find **openllmvtuber/open-llm-vtuber**, and click the run button on the right. +![alt text](/docker_img/run_image.png) + +Open "Optional settings" and configure as shown below: +![alt text](/docker_img/container_config_en.png) + +### Open the web interface in your browser +When you see lines like the ones below, the service has started successfully. The first pull may be slow because it installs necessary tools—please be patient. +![](/docker_img/docker_run_success.png) + +Click the `12393:12393` link in the top-left as shown below, or open `http://localhost:12393` in your browser. +![](/docker_img/click_12393.png) + +**Congratulations — it's working!** Chat with your virtual companion! + +## Install Docker using terminal commands +1. Install Docker Desktop. + + + +```bash +winget install -e --id Docker.DockerDesktop +``` + + + -To include these models in the image, add the following parameters when building: ```bash ---build-arg INSTALL_ORIGINAL_WHISPER=true --build-arg INSTALL_BARK=true +brew install --cask docker ``` -## Deployment Steps + + -1. Before building the image, check and adjust the `conf.yaml` configuration file (the current configuration will be built into the image) +2. Pull the latest image. -2. Build the Docker image: ```bash -docker build -t open-llm-vtuber . +docker pull openllmvtuber/open-llm-vtuber:latest ``` - > Note: The build process may take a considerable amount of time -3. Prepare the `conf.yaml` configuration file - You can obtain it from the project repository or download it directly via this [link](https://raw.githubusercontent.com/Open-LLM-VTuber/Open-LLM-VTuber/main/conf.yaml) +3. Start the container. You can modify `docker-compose.yml` if needed; the default can also be started with one command. +```bash +cd OLV-Docker-Config +``` + +```bash +docker-compose up -d +``` -4. Run the container: +4. View container logs. ```bash -docker run -it --net=host --rm -v $(pwd)/conf.yaml:/app/conf.yaml -p 12393:12393 open-llm-vtuber +docker logs -f open-llm-vtuber-latest ``` - Note: Replace `$(pwd)/conf.yaml` with the actual path to your configuration file -5. Access `localhost:12393` for testing \ No newline at end of file +5. Open the web interface in your browser. + +After the logs show `Uvicorn running on http://0.0.0.0:12393`, open `http://localhost:12393` in your browser to access the web interface. + +That's it — you have successfully deployed Open LLM VTuber! + +## Update + +### Update configuration file +There are two ways to update: via git or manually. + +#### Git update +Run the following commands in the `OLV-Docker-Config` directory: +```bash +git stash +git pull +git stash pop +``` +If there are conflicts, please resolve them manually. + +#### Manual update +Manually compare the new `conf.yaml` with the old `conf.yaml` and copy the parts that need updating into the old `conf.yaml`. + +ChatGPT recommends this website: [DiffCheck.ai — YAML Diff Checker](https://diffcheck.ai/yaml), but you can also use any other suitable site. + +### Pull the latest image +If you're using Docker Desktop, click the `Pull` button next to `Image`. + +If you're using the terminal, run: +```bash +docker pull openllmvtuber/open-llm-vtuber:latest +``` + +### Restart the container +If you're using Docker Desktop, click `Restart` under `Containers`. + +If you're using the terminal, run: +```bash +docker-compose up -d +``` \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/user-guide/backend/llm.md b/i18n/en/docusaurus-plugin-content-docs/current/user-guide/backend/llm.md index 6ef73a2ad..cfbeb44e4 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/user-guide/backend/llm.md +++ b/i18n/en/docusaurus-plugin-content-docs/current/user-guide/backend/llm.md @@ -1,5 +1,5 @@ --- -sidebar_position: 4 +sidebar_position: 5 --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; diff --git a/i18n/en/docusaurus-plugin-content-docs/current/user-guide/backend/translate.md b/i18n/en/docusaurus-plugin-content-docs/current/user-guide/backend/translate.md index 27168c723..eace054e4 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/user-guide/backend/translate.md +++ b/i18n/en/docusaurus-plugin-content-docs/current/user-guide/backend/translate.md @@ -1,5 +1,5 @@ --- -sidebar_position: 7 +sidebar_position: 8 --- # Translation diff --git a/i18n/en/docusaurus-plugin-content-docs/current/user-guide/backend/tts.md b/i18n/en/docusaurus-plugin-content-docs/current/user-guide/backend/tts.md index 708fd70e6..10cf657ec 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/user-guide/backend/tts.md +++ b/i18n/en/docusaurus-plugin-content-docs/current/user-guide/backend/tts.md @@ -1,5 +1,5 @@ --- -sidebar_position: 6 +sidebar_position: 7 --- # Speech Synthesis (TTS) diff --git a/static/docker_img/click_12393.png b/static/docker_img/click_12393.png new file mode 100644 index 000000000..ce87e6842 Binary files /dev/null and b/static/docker_img/click_12393.png differ diff --git a/static/docker_img/click_search.png b/static/docker_img/click_search.png new file mode 100644 index 000000000..eec095b40 Binary files /dev/null and b/static/docker_img/click_search.png differ diff --git a/static/docker_img/container_config_cn.png b/static/docker_img/container_config_cn.png new file mode 100644 index 000000000..220377367 Binary files /dev/null and b/static/docker_img/container_config_cn.png differ diff --git a/static/docker_img/container_config_en.png b/static/docker_img/container_config_en.png new file mode 100644 index 000000000..5994c4237 Binary files /dev/null and b/static/docker_img/container_config_en.png differ diff --git a/static/docker_img/container_config_raw.png b/static/docker_img/container_config_raw.png new file mode 100644 index 000000000..98b0afd8d Binary files /dev/null and b/static/docker_img/container_config_raw.png differ diff --git a/static/docker_img/docker_run_success.png b/static/docker_img/docker_run_success.png new file mode 100644 index 000000000..13892891e Binary files /dev/null and b/static/docker_img/docker_run_success.png differ diff --git a/static/docker_img/download_docker_conf_repo.png b/static/docker_img/download_docker_conf_repo.png new file mode 100644 index 000000000..076a6e53b Binary files /dev/null and b/static/docker_img/download_docker_conf_repo.png differ diff --git a/static/docker_img/download_docker_desktop.png b/static/docker_img/download_docker_desktop.png new file mode 100644 index 000000000..23c501e5c Binary files /dev/null and b/static/docker_img/download_docker_desktop.png differ diff --git a/static/docker_img/openllmvtuber_image.png b/static/docker_img/openllmvtuber_image.png new file mode 100644 index 000000000..d2bf657d3 Binary files /dev/null and b/static/docker_img/openllmvtuber_image.png differ diff --git a/static/docker_img/run_image.png b/static/docker_img/run_image.png new file mode 100644 index 000000000..6fa2cccad Binary files /dev/null and b/static/docker_img/run_image.png differ