fix graphview 无法上传文件的问题
This commit is contained in:
parent
6b1f19f89d
commit
244e7f53b1
@ -1,126 +0,0 @@
|
||||
services:
|
||||
api:
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: docker/api.Dockerfile
|
||||
container_name: api-prod
|
||||
working_dir: /app
|
||||
volumes:
|
||||
- ../src:/app/src
|
||||
- ../saves:/app/saves
|
||||
- /hdd/zwj/models:/hdd/zwj/models
|
||||
ports:
|
||||
- "8000:8000"
|
||||
depends_on:
|
||||
- graph
|
||||
- milvus
|
||||
networks:
|
||||
- app-network
|
||||
environment:
|
||||
- NEO4J_URI=bolt://graph:7687
|
||||
- NEO4J_USERNAME=neo4j
|
||||
- NEO4J_PASSWORD=0123456789
|
||||
- MILVUS_URI=http://milvus:19530
|
||||
command: uvicorn src.main:app --host 0.0.0.0 --port 8000
|
||||
|
||||
# 前端服务
|
||||
web:
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: docker/web.Dockerfile
|
||||
target: production
|
||||
container_name: web-prod
|
||||
ports:
|
||||
- "80:80"
|
||||
depends_on:
|
||||
- api
|
||||
networks:
|
||||
- app-network
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- VITE_API_URL=http://api:8000 # 添加这行
|
||||
|
||||
# Neo4j 图数据库服务
|
||||
graph:
|
||||
image: neo4j:latest
|
||||
container_name: graph-prod
|
||||
ports:
|
||||
- "7474:7474"
|
||||
- "7687:7687"
|
||||
volumes:
|
||||
- ./volumes/neo4j/data:/data
|
||||
- ./volumes/neo4j/logs:/var/lib/neo4j/logs
|
||||
environment:
|
||||
- NEO4J_AUTH=neo4j/0123456789
|
||||
networks:
|
||||
- app-network
|
||||
|
||||
etcd:
|
||||
container_name: milvus-etcd-prod
|
||||
image: quay.io/coreos/etcd:v3.5.5
|
||||
environment:
|
||||
- ETCD_AUTO_COMPACTION_MODE=revision
|
||||
- ETCD_AUTO_COMPACTION_RETENTION=1000
|
||||
- ETCD_QUOTA_BACKEND_BYTES=4294967296
|
||||
- ETCD_SNAPSHOT_COUNT=50000
|
||||
volumes:
|
||||
- ./volumes/milvus/etcd:/etcd
|
||||
command: etcd -advertise-client-urls=http://127.0.0.1:2379 -listen-client-urls http://0.0.0.0:2379 --data-dir /etcd
|
||||
healthcheck:
|
||||
test: ["CMD", "etcdctl", "endpoint", "health"]
|
||||
interval: 30s
|
||||
timeout: 20s
|
||||
retries: 3
|
||||
networks:
|
||||
- app-network
|
||||
|
||||
minio:
|
||||
container_name: milvus-minio-prod
|
||||
image: minio/minio:RELEASE.2023-03-20T20-16-18Z
|
||||
environment:
|
||||
MINIO_ACCESS_KEY: minioadmin
|
||||
MINIO_SECRET_KEY: minioadmin
|
||||
volumes:
|
||||
- ./volumes/milvus/minio:/minio_data
|
||||
command: minio server /minio_data
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
|
||||
interval: 30s
|
||||
timeout: 20s
|
||||
retries: 3
|
||||
networks:
|
||||
- app-network
|
||||
|
||||
|
||||
# Milvus 服务
|
||||
milvus:
|
||||
image: milvusdb/milvus:latest
|
||||
container_name: milvus-standalone-prod
|
||||
command: ["milvus", "run", "standalone"]
|
||||
security_opt:
|
||||
- seccomp:unconfined
|
||||
environment:
|
||||
ETCD_ENDPOINTS: etcd:2379
|
||||
MINIO_ADDRESS: minio:9000
|
||||
volumes:
|
||||
- ./volumes/milvus/milvus:/var/lib/milvus
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:9091/healthz"]
|
||||
interval: 30s
|
||||
start_period: 90s
|
||||
timeout: 20s
|
||||
retries: 3
|
||||
ports:
|
||||
- "19530:19530"
|
||||
- "9091:9091"
|
||||
depends_on:
|
||||
- "etcd"
|
||||
- "minio"
|
||||
networks:
|
||||
- app-network
|
||||
|
||||
|
||||
# 定义网络
|
||||
networks:
|
||||
app-network:
|
||||
driver: bridge
|
||||
@ -54,8 +54,11 @@
|
||||
:ok-button-props="{ disabled: disabled }"
|
||||
:confirm-loading="state.precessing">
|
||||
<div v-if="graphInfo?.embed_model_name">
|
||||
<p>当前图数据库向量模型:{{ graphInfo?.embed_model_name }}</p>
|
||||
<p>当前所选择的向量模型是 {{ cur_embed_model }}</p>
|
||||
<a-alert v-if="!modelMatched" message="模型不匹配,构建索引可能会出现无法检索到的情况!" type="warning" />
|
||||
<p>
|
||||
当前图数据库向量模型:{{ graphInfo?.embed_model_name }},
|
||||
当前所选择的向量模型是 {{ cur_embed_model }}
|
||||
</p>
|
||||
</div>
|
||||
<p v-else>第一次创建之后将无法修改向量模型,当前向量模型 {{ cur_embed_model }}</p>
|
||||
<div class="upload">
|
||||
@ -89,12 +92,9 @@ import { UploadOutlined } from '@ant-design/icons-vue';
|
||||
import HeaderComponent from '@/components/HeaderComponent.vue';
|
||||
|
||||
const configStore = useConfigStore()
|
||||
const cur_embed_model = computed(() => configStore.config.embed_model_names[configStore.config.embed_model].name)
|
||||
const disabled = computed(() => {
|
||||
if (state.precessing) return true
|
||||
if (graphInfo?.value?.embed_model_name !== cur_embed_model.value) return true
|
||||
return false
|
||||
})
|
||||
const cur_embed_model = computed(() => configStore.config?.embed_model_names?.[configStore.config?.embed_model]?.name || '')
|
||||
const modelMatched = computed(() => !graphInfo?.value?.embed_model_name || graphInfo.value.embed_model_name === cur_embed_model.value)
|
||||
const disabled = computed(() => state.precessing || !modelMatched.value)
|
||||
|
||||
let graphInstance
|
||||
const graphInfo = ref(null)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user