From 4da1ee61072723b3df9a3b98d3efbc0e7782c295 Mon Sep 17 00:00:00 2001 From: xiangfei258 <504223065@qq.com> Date: Fri, 12 Jun 2026 22:08:50 +0800 Subject: [PATCH 1/3] =?UTF-8?q?chore:=20=E6=9C=AC=E5=9C=B0=E5=AE=9A?= =?UTF-8?q?=E5=88=B6=E6=94=B9=E5=8A=A8(logo/=E9=A6=96=E9=A1=B5/=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E9=A1=B5/=E9=85=8D=E7=BD=AE=E7=AD=89)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.template | 6 + MinerU/docker/Dockerfile | 27 + MinerU/docker/compose.yaml | 122 ++ MinerU/docker/mineru.compose.yml | 122 ++ .../yuxi/config/static/info.template.yaml | 2 +- .../package/yuxi/models/providers/builtin.py | 1 + docker-compose.yml | 6 +- docs/.vitepress/theme/components/YuxiHome.vue | 4 +- web/index.html | 2 +- web/public/1avatar.jpg | Bin 0 -> 2359042 bytes web/public/avatar.jpg | Bin 25701 -> 120815 bytes web/public/favicon.svg | 1547 ++++++++++++++++- web/public/login-bg.jpg | Bin 201149 -> 5027930 bytes web/src/components/SettingsModal.vue | 10 +- web/src/layouts/AppLayout.vue | 38 +- web/src/views/HomeView.vue | 316 +++- web/src/views/LoginView.vue | 4 +- 17 files changed, 2077 insertions(+), 130 deletions(-) create mode 100644 MinerU/docker/Dockerfile create mode 100644 MinerU/docker/compose.yaml create mode 100644 MinerU/docker/mineru.compose.yml create mode 100644 web/public/1avatar.jpg diff --git a/.env.template b/.env.template index 4fecc16e1..ea6c16659 100644 --- a/.env.template +++ b/.env.template @@ -67,3 +67,9 @@ YUXI_INSTANCE_ID= # KUBECONFIG_PATH=/root/.kube/config # THREAD_PVC=yuxi-thread # SKILLS_PVC=yuxi-skills # 当前代码会读取,但 Pod 挂载实际仍只使用 THREAD_PVC + +# ===== Docker Compose Profiles ===== +# GPU 文档解析服务 (mineru-api / paddlex) 的启动开关。 +# 有 NVIDIA GPU:保持 gpu,docker compose up -d 会自动带上它们。 +# 无 GPU 机器:置空 (COMPOSE_PROFILES=) 即可跳过这两个服务,避免启动失败。 +COMPOSE_PROFILES=gpu diff --git a/MinerU/docker/Dockerfile b/MinerU/docker/Dockerfile new file mode 100644 index 000000000..00c95c0e3 --- /dev/null +++ b/MinerU/docker/Dockerfile @@ -0,0 +1,27 @@ +# Use DaoCloud mirrored vllm image for China region for gpu with Volta、Turing、Ampere、Ada Lovelace、Hopper、Blackwell architecture (7.0 <= Compute Capability <= 12.1) +# The default base image uses vLLM 0.21.0 with CUDA 13.0. For CUDA 12.9 environments, switch to the commented cu129 image below. +# Compute Capability version query (https://developer.nvidia.com/cuda-gpus) +# support x86_64 architecture and ARM(AArch64) architecture +FROM docker.m.daocloud.io/vllm/vllm-openai:v0.21.0 +# FROM docker.m.daocloud.io/vllm/vllm-openai:v0.21.0-cu129 + +# Install libgl for opencv support & Noto fonts for Chinese characters +RUN apt-get update && \ + apt-get install -y \ + fonts-noto-core \ + fonts-noto-cjk \ + fontconfig \ + libgl1 && \ + fc-cache -fv && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +# Install mineru latest +RUN python3 -m pip install -U 'mineru[core]>=3.2.1' -i https://mirrors.aliyun.com/pypi/simple --break-system-packages && \ + python3 -m pip cache purge + +# Download models and update the configuration file +RUN /bin/bash -c "mineru-models-download -s modelscope -m all" + +# Set the entry point to activate the virtual environment and run the command line tool +ENTRYPOINT ["/bin/bash", "-c", "export MINERU_MODEL_SOURCE=local && exec \"$@\"", "--"] diff --git a/MinerU/docker/compose.yaml b/MinerU/docker/compose.yaml new file mode 100644 index 000000000..56b58c9e6 --- /dev/null +++ b/MinerU/docker/compose.yaml @@ -0,0 +1,122 @@ +services: + mineru-openai-server: + image: mineru:latest + container_name: mineru-openai-server + restart: always + profiles: ["openai-server"] + ports: + - 30000:30000 + environment: + MINERU_MODEL_SOURCE: local + entrypoint: mineru-openai-server + command: + --host 0.0.0.0 + --port 30000 + --gpu-memory-utilization 0.5 # If encountering VRAM shortage, reduce the KV cache size by this parameter; if VRAM issues persist, try lowering it further to `0.4` or below. + ulimits: + memlock: -1 + stack: 67108864 + ipc: host + healthcheck: + test: ["CMD-SHELL", "curl -f http://localhost:30000/health || exit 1"] + deploy: + resources: + reservations: + devices: + - driver: nvidia + device_ids: ["0"] # Modify for multiple GPUs: ["0", "1"] + capabilities: [gpu] + + mineru-api: + image: mineru:latest + container_name: mineru-api + restart: always + profiles: ["api"] + ports: + - 8000:8000 + environment: + MINERU_MODEL_SOURCE: local + entrypoint: mineru-api + command: + --host 0.0.0.0 + --port 8000 + # --allow-public-http-client # Disabled by default; when binding to 0.0.0.0 or ::, this re-enables *-http-client backends and server_url. Enable only if you accept the SSRF risk. + # parameters for vllm-engine + # --gpu-memory-utilization 0.5 # If encountering VRAM shortage, reduce the KV cache size by this parameter; if VRAM issues persist, try lowering it further to `0.4` or below. + ulimits: + memlock: -1 + stack: 67108864 + ipc: host + healthcheck: + test: ["CMD-SHELL", "curl -f http://localhost:8000/health || exit 1"] + deploy: + resources: + reservations: + devices: + - driver: nvidia + device_ids: ["0"] # Modify for multiple GPUs: ["0", "1"] + capabilities: [gpu] + + mineru-router: + image: mineru:latest + container_name: mineru-router + restart: always + profiles: ["router"] + ports: + - 8002:8002 + environment: + MINERU_MODEL_SOURCE: local + entrypoint: mineru-router + command: + --host 0.0.0.0 + --port 8002 + --local-gpus auto + # --allow-public-http-client # Disabled by default; when binding to 0.0.0.0 or ::, this re-enables *-http-client backends and server_url. Enable only if you accept the SSRF risk. + # To aggregate existing mineru-api services instead of starting local workers: + # --local-gpus none + # --upstream-url http://mineru-api:8000 + # --upstream-url http://mineru-api-2:8000 + # parameters for vllm-engine + # --gpu-memory-utilization 0.5 # If encountering VRAM shortage, reduce the KV cache size by this parameter; if VRAM issues persist, try lowering it further to `0.4` or below. + ulimits: + memlock: -1 + stack: 67108864 + ipc: host + healthcheck: + test: ["CMD-SHELL", "curl -f http://localhost:8002/health || exit 1"] + deploy: + resources: + reservations: + devices: + - driver: nvidia + device_ids: ["0"] # Modify for multiple GPUs: ["0", "1"] + capabilities: [gpu] + + mineru-gradio: + image: mineru:latest + container_name: mineru-gradio + restart: always + profiles: ["gradio"] + ports: + - 7860:7860 + environment: + MINERU_MODEL_SOURCE: local + entrypoint: mineru-gradio + command: + --server-name 0.0.0.0 + --server-port 7860 + # --enable-api false # If you want to disable the API, set this to false + # --max-convert-pages 20 # If you want to limit the number of pages for conversion, set this to a specific number + # parameters for vllm-engine + # --gpu-memory-utilization 0.5 # If encountering VRAM shortage, reduce the KV cache size by this parameter; if VRAM issues persist, try lowering it further to `0.4` or below. + ulimits: + memlock: -1 + stack: 67108864 + ipc: host + deploy: + resources: + reservations: + devices: + - driver: nvidia + device_ids: ["0"] # Modify for multiple GPUs: ["0", "1"] + capabilities: [gpu] diff --git a/MinerU/docker/mineru.compose.yml b/MinerU/docker/mineru.compose.yml new file mode 100644 index 000000000..b90b6bdf0 --- /dev/null +++ b/MinerU/docker/mineru.compose.yml @@ -0,0 +1,122 @@ +services: + mineru-openai-server: + image: mineru:latest + container_name: mineru-openai-server + restart: always + profiles: ["openai-server"] + ports: + - 30000:30000 + environment: + MINERU_MODEL_SOURCE: local + entrypoint: mineru-openai-server + command: + --host 0.0.0.0 + --port 30000 + # --gpu-memory-utilization 0.5 # If encountering VRAM shortage, reduce the KV cache size by this parameter; if VRAM issues persist, try lowering it further to `0.4` or below. + ulimits: + memlock: -1 + stack: 67108864 + ipc: host + healthcheck: + test: ["CMD-SHELL", "curl -f http://localhost:30000/health || exit 1"] + deploy: + resources: + reservations: + devices: + - driver: nvidia + device_ids: ["0"] # Modify for multiple GPUs: ["0", "1"] + capabilities: [gpu] + + mineru-api: + image: mineru:latest + container_name: mineru-api + restart: always + profiles: ["api"] + ports: + - 8000:8000 + environment: + MINERU_MODEL_SOURCE: local + entrypoint: mineru-api + command: + --host 0.0.0.0 + --port 8000 + # --allow-public-http-client # Disabled by default; when binding to 0.0.0.0 or ::, this re-enables *-http-client backends and server_url. Enable only if you accept the SSRF risk. + # parameters for vllm-engine + # --gpu-memory-utilization 0.5 # If encountering VRAM shortage, reduce the KV cache size by this parameter; if VRAM issues persist, try lowering it further to `0.4` or below. + ulimits: + memlock: -1 + stack: 67108864 + ipc: host + healthcheck: + test: ["CMD-SHELL", "curl -f http://localhost:8000/health || exit 1"] + deploy: + resources: + reservations: + devices: + - driver: nvidia + device_ids: ["0"] # Modify for multiple GPUs: ["0", "1"] + capabilities: [gpu] + + mineru-router: + image: mineru:latest + container_name: mineru-router + restart: always + profiles: ["router"] + ports: + - 8002:8002 + environment: + MINERU_MODEL_SOURCE: local + entrypoint: mineru-router + command: + --host 0.0.0.0 + --port 8002 + --local-gpus auto + # --allow-public-http-client # Disabled by default; when binding to 0.0.0.0 or ::, this re-enables *-http-client backends and server_url. Enable only if you accept the SSRF risk. + # To aggregate existing mineru-api services instead of starting local workers: + # --local-gpus none + # --upstream-url http://mineru-api:8000 + # --upstream-url http://mineru-api-2:8000 + # parameters for vllm-engine + # --gpu-memory-utilization 0.5 # If encountering VRAM shortage, reduce the KV cache size by this parameter; if VRAM issues persist, try lowering it further to `0.4` or below. + ulimits: + memlock: -1 + stack: 67108864 + ipc: host + healthcheck: + test: ["CMD-SHELL", "curl -f http://localhost:8002/health || exit 1"] + deploy: + resources: + reservations: + devices: + - driver: nvidia + device_ids: ["0"] # Modify for multiple GPUs: ["0", "1"] + capabilities: [gpu] + + mineru-gradio: + image: mineru:latest + container_name: mineru-gradio + restart: always + profiles: ["gradio"] + ports: + - 7860:7860 + environment: + MINERU_MODEL_SOURCE: local + entrypoint: mineru-gradio + command: + --server-name 0.0.0.0 + --server-port 7860 + # --enable-api false # If you want to disable the API, set this to false + # --max-convert-pages 20 # If you want to limit the number of pages for conversion, set this to a specific number + # parameters for vllm-engine + # --gpu-memory-utilization 0.5 # If encountering VRAM shortage, reduce the KV cache size by this parameter; if VRAM issues persist, try lowering it further to `0.4` or below. + ulimits: + memlock: -1 + stack: 67108864 + ipc: host + deploy: + resources: + reservations: + devices: + - driver: nvidia + device_ids: ["0"] # Modify for multiple GPUs: ["0", "1"] + capabilities: [gpu] diff --git a/backend/package/yuxi/config/static/info.template.yaml b/backend/package/yuxi/config/static/info.template.yaml index 65665e010..03fdfc57f 100644 --- a/backend/package/yuxi/config/static/info.template.yaml +++ b/backend/package/yuxi/config/static/info.template.yaml @@ -3,7 +3,7 @@ # 组织信息 organization: - name: "江南语析" # 完整组织名称 + name: "楚天智航" # 完整组织名称 logo: "/favicon.svg" # Logo文件路径(放在 web/public 目录下) avatar: "/avatar.jpg" # 头像文件路径(放在 web/public 目录下) login_bg: "/login-bg.jpg" # 登录背景图片路径(放在 web/public 目录下) diff --git a/backend/package/yuxi/models/providers/builtin.py b/backend/package/yuxi/models/providers/builtin.py index 5a85da51f..d6d78d43d 100644 --- a/backend/package/yuxi/models/providers/builtin.py +++ b/backend/package/yuxi/models/providers/builtin.py @@ -46,6 +46,7 @@ "type": "embedding", "display_name": "text-embedding-v4", "dimension": 1024, + "batch_size": 40, }, { "id": "qwen3-rerank", diff --git a/docker-compose.yml b/docker-compose.yml index 7d6e67dc4..609d5d5d9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -344,8 +344,9 @@ services: dockerfile: docker/mineru.Dockerfile image: mineru-vllm:latest container_name: mineru-api + # GPU 服务:随 .env 的 COMPOSE_PROFILES=gpu 默认启动;无 GPU 机器置空即可跳过 profiles: - - all + - gpu env_file: - .env ports: @@ -383,8 +384,9 @@ services: dockerfile: docker/paddlex.Dockerfile image: paddlex:latest container_name: paddlex-ocr + # GPU 服务:随 .env 的 COMPOSE_PROFILES=gpu 默认启动;无 GPU 机器置空即可跳过 profiles: - - all + - gpu volumes: - ./docker/volumes/paddlex:/paddlex ports: diff --git a/docs/.vitepress/theme/components/YuxiHome.vue b/docs/.vitepress/theme/components/YuxiHome.vue index c7bbf57d5..d781ce5fe 100644 --- a/docs/.vitepress/theme/components/YuxiHome.vue +++ b/docs/.vitepress/theme/components/YuxiHome.vue @@ -2,8 +2,8 @@ import { ref, computed } from 'vue' import { withBase } from 'vitepress' -const GITHUB = 'https://github.com/xerrors/Yuxi' -const DEMO = 'https://www.bilibili.com/video/BV1TZEx6NEit/' +// const GITHUB = 'https://github.com/xerrors/Yuxi' +// const DEMO = 'https://www.bilibili.com/video/BV1TZEx6NEit/' // 关键数字(占位,后续替换为真实数据) const stats = [ diff --git a/web/index.html b/web/index.html index e23f29ede..ac1f72803 100644 --- a/web/index.html +++ b/web/index.html @@ -4,7 +4,7 @@ -
c0u<5+JVuW!M(Z~pJa3>RWl~Sq&(0vyTqWP$z3I9VE@Ru3lo%Ijc
z|4y2$!{EDmJ`j@@_|x(eLKSmy_Zriagj45Z`+b>RGkku`F2W~N;0)_a& Jpy3ny<{y)8ywC6aav?zXg!}Wd+?|HPI%(x4T
z3rL&7>$>SXT?RXAx>3H+4t_Wk0L8u~J_BnIbxX$*X9Z<*Wvryco1PYM4X$;I6*lA&
z@ULbx{~}0DGZ!c!Xo#)njtt YEk950B<+o$yUtlUe+=c&zv?(rQM52?6~_MPk=i&IurNtFvzjwk8H#8s(C0a8=@
zg^xDwTdw={dq?r)KlxcBtL {
z3R+R@9&i^y>A^w0P>@4UQ?y|qep>15;QwCdP(L