sync
This commit is contained in:
parent
cc0e14e677
commit
8ac7b0a847
@ -166,6 +166,39 @@ services:
|
|||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
command: python -m uvicorn app:app --host 0.0.0.0 --port 5051 --app-dir /app
|
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:
|
networks:
|
||||||
app-network:
|
app-network:
|
||||||
driver: bridge
|
driver: bridge
|
||||||
|
|||||||
13
scripts/mineru-sglang/Dockerfile
Normal file
13
scripts/mineru-sglang/Dockerfile
Normal file
@ -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 \"$@\"", "--"]
|
||||||
@ -162,7 +162,7 @@ const toggleCollapse = () => {
|
|||||||
.chat-sidebar {
|
.chat-sidebar {
|
||||||
width: 0;
|
width: 0;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-color: #f9f9f9;
|
background-color: var(--bg-sider);
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|||||||
@ -11,12 +11,12 @@
|
|||||||
</HeaderComponent>
|
</HeaderComponent>
|
||||||
<div class="setting-container layout-container">
|
<div class="setting-container layout-container">
|
||||||
<div class="sider" v-if="state.windowWidth > 520">
|
<div class="sider" v-if="state.windowWidth > 520">
|
||||||
<a-button type="text" :class="{ activesec: state.section === 'base'}" @click="state.section='base'" :icon="h(SettingOutlined)"> 基本设置 </a-button>
|
<a-button type="text" v-if="userStore.isSuperAdmin" :class="{ activesec: state.section === 'base'}" @click="state.section='base'" :icon="h(SettingOutlined)"> 基本设置 </a-button>
|
||||||
<a-button type="text" :class="{ activesec: state.section === 'model'}" @click="state.section='model'" :icon="h(CodeOutlined)"> 模型配置 </a-button>
|
<a-button type="text" v-if="userStore.isSuperAdmin" :class="{ activesec: state.section === 'model'}" @click="state.section='model'" :icon="h(CodeOutlined)"> 模型配置 </a-button>
|
||||||
<a-button type="text" :class="{ activesec: state.section === 'path'}" @click="state.section='path'" :icon="h(FolderOutlined)"> 路径配置 </a-button>
|
<a-button type="text" v-if="userStore.isSuperAdmin" :class="{ activesec: state.section === 'path'}" @click="state.section='path'" :icon="h(FolderOutlined)"> 路径配置 </a-button>
|
||||||
<a-button type="text" :class="{ activesec: state.section === 'user'}" @click="state.section='user'" :icon="h(UserOutlined)" v-if="userStore.isAdmin"> 用户管理 </a-button>
|
<a-button type="text" :class="{ activesec: state.section === 'user'}" @click="state.section='user'" :icon="h(UserOutlined)" v-if="userStore.isAdmin"> 用户管理 </a-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="setting" v-if="state.windowWidth <= 520 || state.section === 'base'">
|
<div class="setting" v-if="(state.windowWidth <= 520 || state.section === 'base') && userStore.isSuperAdmin">
|
||||||
<h3>检索配置</h3>
|
<h3>检索配置</h3>
|
||||||
<div class="section">
|
<div class="section">
|
||||||
<div class="card card-select">
|
<div class="card card-select">
|
||||||
@ -90,12 +90,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="setting" v-if="state.windowWidth <= 520 || state.section === 'model'">
|
<div class="setting" v-if="(state.windowWidth <= 520 || state.section === 'model') && userStore.isSuperAdmin">
|
||||||
<h3>模型配置</h3>
|
<h3>模型配置</h3>
|
||||||
<p>请在 <code>src/.env</code> 文件中配置对应的 APIKEY,并重新启动服务</p>
|
<p>请在 <code>src/.env</code> 文件中配置对应的 APIKEY,并重新启动服务</p>
|
||||||
<ModelProvidersComponent />
|
<ModelProvidersComponent />
|
||||||
</div>
|
</div>
|
||||||
<div class="setting" v-if="state.windowWidth <= 520 || state.section ==='path'">
|
<div class="setting" v-if="(state.windowWidth <= 520 || state.section ==='path') && userStore.isSuperAdmin">
|
||||||
<h3>本地模型配置</h3>
|
<h3>本地模型配置</h3>
|
||||||
<p>如果是 Docker 启动,务必确保在 docker-compose.dev.yaml 中添加了 volumes 映射。</p>
|
<p>如果是 Docker 启动,务必确保在 docker-compose.dev.yaml 中添加了 volumes 映射。</p>
|
||||||
<TableConfigComponent
|
<TableConfigComponent
|
||||||
@ -104,7 +104,7 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<!-- TODO 用户管理优化,添加姓名(默认使用用户名配置项) -->
|
<!-- TODO 用户管理优化,添加姓名(默认使用用户名配置项) -->
|
||||||
<div class="setting" v-if="state.section === 'user'">
|
<div class="setting" v-if="state.section === 'user' && userStore.isAdmin">
|
||||||
<UserManagementComponent />
|
<UserManagementComponent />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -204,6 +204,7 @@ const handleChatModelSelect = ({ provider, name }) => {
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
updateWindowWidth()
|
updateWindowWidth()
|
||||||
window.addEventListener('resize', updateWindowWidth)
|
window.addEventListener('resize', updateWindowWidth)
|
||||||
|
state.section = userStore.isSuperAdmin ? 'base' : 'user'
|
||||||
})
|
})
|
||||||
|
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user