From 8ac7b0a847c60223b795b1153a3aa91815fb9754 Mon Sep 17 00:00:00 2001 From: Wenjie Zhang Date: Tue, 17 Jun 2025 10:54:45 +0800 Subject: [PATCH] sync --- docker-compose.yml | 33 +++++++++++++++++++++ scripts/mineru-sglang/Dockerfile | 13 ++++++++ web/src/components/ChatSidebarComponent.vue | 2 +- web/src/views/SettingView.vue | 15 +++++----- 4 files changed, 55 insertions(+), 8 deletions(-) create mode 100644 scripts/mineru-sglang/Dockerfile diff --git a/docker-compose.yml b/docker-compose.yml index b2563790..f6cb1b22 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -166,6 +166,39 @@ services: restart: unless-stopped command: python -m uvicorn app:app --host 0.0.0.0 --port 5051 --app-dir /app + + # # lastest version: wget https://gcore.jsdelivr.net/gh/opendatalab/MinerU@master/docker/compose.yaml + # mineru-sglang: + # build: + # context: scripts/mineru-sglang + # dockerfile: Dockerfile + # image: mineru-sglang:latest + # container_name: mineru-sglang + # ports: + # - 30000:30000 + # environment: + # MINERU_MODEL_SOURCE: modelscope + # entrypoint: mineru-sglang-server + # command: + # --host 0.0.0.0 + # --port 30000 + # 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"] + # capabilities: [gpu] + # networks: + # - app-network + # restart: unless-stopped + networks: app-network: driver: bridge diff --git a/scripts/mineru-sglang/Dockerfile b/scripts/mineru-sglang/Dockerfile new file mode 100644 index 00000000..8e335882 --- /dev/null +++ b/scripts/mineru-sglang/Dockerfile @@ -0,0 +1,13 @@ +# Lastest version: wget https://gcore.jsdelivr.net/gh/opendatalab/MinerU@master/docker/china/Dockerfile + +# Use the official sglang image +FROM lmsysorg/sglang:v0.4.7-cu124 + +# install mineru latest +RUN python3 -m pip install -U 'mineru[core]' -i https://mirrors.aliyun.com/pypi/simple --break-system-packages + +# 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 \"$@\"", "--"] \ No newline at end of file diff --git a/web/src/components/ChatSidebarComponent.vue b/web/src/components/ChatSidebarComponent.vue index 7d22c374..a9d44ad6 100644 --- a/web/src/components/ChatSidebarComponent.vue +++ b/web/src/components/ChatSidebarComponent.vue @@ -162,7 +162,7 @@ const toggleCollapse = () => { .chat-sidebar { width: 0; height: 100%; - background-color: #f9f9f9; + background-color: var(--bg-sider); transition: all 0.3s ease; display: flex; flex-direction: column; diff --git a/web/src/views/SettingView.vue b/web/src/views/SettingView.vue index 2d6bd1c9..0deddca4 100644 --- a/web/src/views/SettingView.vue +++ b/web/src/views/SettingView.vue @@ -11,12 +11,12 @@
- 基本设置 - 模型配置 - 路径配置 + 基本设置 + 模型配置 + 路径配置 用户管理
-
+

检索配置

@@ -90,12 +90,12 @@
-
+

模型配置

请在 src/.env 文件中配置对应的 APIKEY,并重新启动服务

-
+

本地模型配置

如果是 Docker 启动,务必确保在 docker-compose.dev.yaml 中添加了 volumes 映射。

-
+
@@ -204,6 +204,7 @@ const handleChatModelSelect = ({ provider, name }) => { onMounted(() => { updateWindowWidth() window.addEventListener('resize', updateWindowWidth) + state.section = userStore.isSuperAdmin ? 'base' : 'user' }) onUnmounted(() => {