Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions MultimodalQnA/docker_compose/intel/cpu/xeon/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,17 @@ cd GenAIExamples/MultimodalQnA/docker_compose/intel/cpu/xeon/
docker compose -f compose.yaml up -d
```

> Alternatively, you can run docker compose with `compose_milvus.yaml` to use the Milvus vector database:

```bash
export MILVUS_HOST=${host_ip}
export MILVUS_PORT=19530
export MILVUS_RETRIEVER_PORT=7000
export COLLECTION_NAME=mm_rag_milvus
cd GenAIExamples/MultimodalQnA/docker_compose/intel/cpu/xeon/
docker compose -f compose_milvus.yaml up -d
```

### Validate Microservices

1. embedding-multimodal-bridgetower
Expand Down
237 changes: 237 additions & 0 deletions MultimodalQnA/docker_compose/intel/cpu/xeon/compose_milvus.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,237 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

services:
whisper-service:
image: ${REGISTRY:-opea}/whisper:${TAG:-latest}
container_name: whisper-service
ports:
- "${WHISPER_PORT}:7066"
ipc: host
environment:
no_proxy: ${no_proxy}
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
restart: unless-stopped

milvus-etcd:
container_name: milvus-etcd
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:
- ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/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

milvus-minio:
container_name: milvus-minio
image: minio/minio:RELEASE.2023-03-20T20-16-18Z
environment:
MINIO_ACCESS_KEY: minioadmin
MINIO_SECRET_KEY: minioadmin
ports:
- "${MINIO_PORT1:-5044}:9001"
- "${MINIO_PORT2:-5043}:9000"
volumes:
- ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/minio:/minio_data
command: minio server /minio_data --console-address ":9001"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3

milvus-standalone:
container_name: milvus-standalone
image: milvusdb/milvus:v2.4.6
command: ["milvus", "run", "standalone"]
security_opt:
- seccomp:unconfined
environment:
ETCD_ENDPOINTS: milvus-etcd:2379
MINIO_ADDRESS: milvus-minio:9000
volumes:
- ${DOCKER_VOLUME_DIRECTORY:-.}/config/milvus.yaml:/milvus/configs/milvus.yaml
- ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/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"
- "${MILVUS_STANDALONE_PORT:-9091}:9091"
depends_on:
- "milvus-etcd"
- "milvus-minio"

dataprep-multimodal-milvus:
image: ${REGISTRY:-opea}/dataprep:${TAG:-latest}
container_name: dataprep-multimodal-milvus
depends_on:
- milvus-standalone
- lvm-llava
ports:
- "${DATAPREP_MMR_PORT}:5000"
environment:
no_proxy: ${no_proxy}
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
MULTIMODAL_DATAPREP: true
DATAPREP_COMPONENT_NAME: "OPEA_DATAPREP_MULTIMODALMILVUS"
MILVUS_HOST: ${MILVUS_HOST}
COLLECTION_NAME: ${COLLECTION_NAME:-LangChainCollection}
LVM_ENDPOINT: "http://${LVM_SERVICE_HOST_IP}:${LVM_PORT}/v1/lvm"
HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
restart: unless-stopped

embedding-multimodal-bridgetower:
image: ${REGISTRY:-opea}/embedding-multimodal-bridgetower:${TAG:-latest}
container_name: embedding-multimodal-bridgetower
ports:
- ${EMM_BRIDGETOWER_PORT}:${EMM_BRIDGETOWER_PORT}
environment:
no_proxy: ${no_proxy}
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
EMM_BRIDGETOWER_PORT: ${EMM_BRIDGETOWER_PORT}
PORT: ${EMM_BRIDGETOWER_PORT}
healthcheck:
test: ["CMD-SHELL", "http_proxy='' curl -f http://localhost:${EMM_BRIDGETOWER_PORT}/v1/health_check"]
interval: 10s
timeout: 6s
retries: 18
start_period: 30s
entrypoint: ["python", "bridgetower_server.py", "--device", "cpu", "--model_name_or_path", $EMBEDDING_MODEL_ID]
restart: unless-stopped

embedding:
image: ${REGISTRY:-opea}/embedding:${TAG:-latest}
container_name: embedding
depends_on:
embedding-multimodal-bridgetower:
condition: service_healthy
ports:
- ${MM_EMBEDDING_PORT_MICROSERVICE}:${MM_EMBEDDING_PORT_MICROSERVICE}
ipc: host
environment:
no_proxy: ${no_proxy}
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
MMEI_EMBEDDING_ENDPOINT: ${MMEI_EMBEDDING_ENDPOINT}
MM_EMBEDDING_PORT_MICROSERVICE: ${MM_EMBEDDING_PORT_MICROSERVICE}
MULTIMODAL_EMBEDDING: true
restart: unless-stopped

retriever-milvus:
image: ${REGISTRY:-opea}/retriever:${TAG:-latest}
container_name: retriever-milvus
depends_on:
- milvus-standalone
ports:
- "${MILVUS_RETRIEVER_PORT}:${MILVUS_RETRIEVER_PORT}"
ipc: host
environment:
no_proxy: ${no_proxy}
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
MILVUS_HOST: ${host_ip}
BRIDGE_TOWER_EMBEDDING: ${BRIDGE_TOWER_EMBEDDING}
LOGFLAG: ${LOGFLAG}
RETRIEVER_COMPONENT_NAME: "OPEA_RETRIEVER_MILVUS"
COLLECTION_NAME: ${COLLECTION_NAME:-LangChainCollection}
restart: unless-stopped

lvm-llava:
image: ${REGISTRY:-opea}/lvm-llava:${TAG:-latest}
container_name: lvm-llava
ports:
- "${LLAVA_SERVER_PORT}:${LLAVA_SERVER_PORT}"
environment:
no_proxy: ${no_proxy}
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
LLAVA_SERVER_PORT: ${LLAVA_SERVER_PORT}
LVM_PORT: ${LVM_PORT}
entrypoint: ["python", "llava_server.py", "--device", "cpu", "--model_name_or_path", $LVM_MODEL_ID]
restart: unless-stopped

lvm:
image: ${REGISTRY:-opea}/lvm:${TAG:-latest}
container_name: lvm
depends_on:
- lvm-llava
ports:
- "${LVM_PORT}:${LVM_PORT}"
ipc: host
environment:
no_proxy: ${no_proxy}
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
LVM_COMPONENT_NAME: "OPEA_LLAVA_LVM"
LVM_ENDPOINT: ${LVM_ENDPOINT}
LLAVA_SERVER_PORT: ${LLAVA_SERVER_PORT}
LVM_PORT: ${LVM_PORT}
MAX_IMAGES: ${MAX_IMAGES:-1}
restart: unless-stopped

multimodalqna:
image: ${REGISTRY:-opea}/multimodalqna:${TAG:-latest}
container_name: multimodalqna-backend-server
depends_on:
- milvus-standalone
- dataprep-multimodal-milvus
- embedding
- retriever-milvus
- lvm
ports:
- "${MEGA_SERVICE_PORT}:${MEGA_SERVICE_PORT}"
environment:
no_proxy: ${no_proxy}
https_proxy: ${https_proxy}
http_proxy: ${http_proxy}
MEGA_SERVICE_HOST_IP: ${MEGA_SERVICE_HOST_IP}
MEGA_SERVICE_PORT: ${MEGA_SERVICE_PORT}
MM_EMBEDDING_SERVICE_HOST_IP: ${MM_EMBEDDING_SERVICE_HOST_IP}
MM_EMBEDDING_PORT_MICROSERVICE: ${MM_EMBEDDING_PORT_MICROSERVICE}
MM_RETRIEVER_SERVICE_HOST_IP: ${MM_RETRIEVER_SERVICE_HOST_IP}
LVM_SERVICE_HOST_IP: ${LVM_SERVICE_HOST_IP}
LVM_MODEL_ID: ${LVM_MODEL_ID}
WHISPER_PORT: ${WHISPER_PORT}
WHISPER_SERVER_ENDPOINT: ${WHISPER_SERVER_ENDPOINT}
ipc: host
restart: always

multimodalqna-ui:
image: ${REGISTRY:-opea}/multimodalqna-ui:${TAG:-latest}
container_name: multimodalqna-gradio-ui-server
depends_on:
- multimodalqna
ports:
- "${UI_PORT}:${UI_PORT}"
environment:
- no_proxy=${no_proxy}
- https_proxy=${https_proxy}
- http_proxy=${http_proxy}
- BACKEND_SERVICE_ENDPOINT=${BACKEND_SERVICE_ENDPOINT}
- DATAPREP_INGEST_SERVICE_ENDPOINT=${DATAPREP_INGEST_SERVICE_ENDPOINT}
- DATAPREP_GEN_TRANSCRIPT_SERVICE_ENDPOINT=${DATAPREP_GEN_TRANSCRIPT_SERVICE_ENDPOINT}
- DATAPREP_GEN_CAPTION_SERVICE_ENDPOINT=${DATAPREP_GEN_CAPTION_SERVICE_ENDPOINT}
- MEGA_SERVICE_PORT:=${MEGA_SERVICE_PORT}
- UI_PORT=${UI_PORT}
- DATAPREP_MMR_PORT=${DATAPREP_MMR_PORT}
ipc: host
restart: always

networks:
default:
driver: bridge
Loading