|
| 1 | +# Copyright (C) 2024 Intel Corporation |
| 2 | +# SPDX-License-Identifier: Apache-2.0 |
| 3 | + |
| 4 | +services: |
| 5 | + etcd: |
| 6 | + container_name: milvus-etcd |
| 7 | + image: quay.io/coreos/etcd:v3.5.5 |
| 8 | + environment: |
| 9 | + - ETCD_AUTO_COMPACTION_MODE=revision |
| 10 | + - ETCD_AUTO_COMPACTION_RETENTION=1000 |
| 11 | + - ETCD_QUOTA_BACKEND_BYTES=4294967296 |
| 12 | + - ETCD_SNAPSHOT_COUNT=50000 |
| 13 | + volumes: |
| 14 | + - ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/etcd:/etcd |
| 15 | + command: etcd -advertise-client-urls=http://127.0.0.1:2379 -listen-client-urls http://0.0.0.0:2379 --data-dir /etcd |
| 16 | + healthcheck: |
| 17 | + test: ["CMD", "etcdctl", "endpoint", "health"] |
| 18 | + interval: 30s |
| 19 | + timeout: 20s |
| 20 | + retries: 3 |
| 21 | + |
| 22 | + minio: |
| 23 | + container_name: milvus-minio |
| 24 | + image: minio/minio:RELEASE.2023-03-20T20-16-18Z |
| 25 | + environment: |
| 26 | + MINIO_ACCESS_KEY: minioadmin |
| 27 | + MINIO_SECRET_KEY: minioadmin |
| 28 | + ports: |
| 29 | + - "${MINIO_PORT1:-5044}:9001" |
| 30 | + - "${MINIO_PORT2:-5043}:9000" |
| 31 | + volumes: |
| 32 | + - ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/minio:/minio_data |
| 33 | + command: minio server /minio_data --console-address ":9001" |
| 34 | + healthcheck: |
| 35 | + test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"] |
| 36 | + interval: 30s |
| 37 | + timeout: 20s |
| 38 | + retries: 3 |
| 39 | + |
| 40 | + milvus-standalone: |
| 41 | + container_name: milvus-standalone |
| 42 | + image: milvusdb/milvus:v2.4.6 |
| 43 | + command: ["milvus", "run", "standalone"] |
| 44 | + security_opt: |
| 45 | + - seccomp:unconfined |
| 46 | + environment: |
| 47 | + ETCD_ENDPOINTS: etcd:2379 |
| 48 | + MINIO_ADDRESS: minio:9000 |
| 49 | + volumes: |
| 50 | + - ${DOCKER_VOLUME_DIRECTORY:-.}/milvus.yaml:/milvus/configs/milvus.yaml |
| 51 | + - ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/milvus:/var/lib/milvus |
| 52 | + healthcheck: |
| 53 | + test: ["CMD", "curl", "-f", "http://localhost:9091/healthz"] |
| 54 | + interval: 30s |
| 55 | + start_period: 90s |
| 56 | + timeout: 20s |
| 57 | + retries: 3 |
| 58 | + ports: |
| 59 | + - "19530:19530" |
| 60 | + - "${MILVUS_STANDALONE_PORT:-9091}:9091" |
| 61 | + depends_on: |
| 62 | + - "etcd" |
| 63 | + - "minio" |
| 64 | + |
| 65 | + dataprep-milvus-service: |
| 66 | + image: ${REGISTRY:-opea}/dataprep:${TAG:-latest} |
| 67 | + container_name: dataprep-milvus-server |
| 68 | + ports: |
| 69 | + - "${DATAPREP_PORT:-11101}:5000" |
| 70 | + ipc: host |
| 71 | + environment: |
| 72 | + no_proxy: ${no_proxy} |
| 73 | + http_proxy: ${http_proxy} |
| 74 | + https_proxy: ${https_proxy} |
| 75 | + DATAPREP_COMPONENT_NAME: "OPEA_DATAPREP_MILVUS" |
| 76 | + MILVUS_HOST: ${host_ip} |
| 77 | + MILVUS_PORT: 19530 |
| 78 | + #COLLECTION_NAME: ${COLLECTION_NAME} |
| 79 | + TEI_EMBEDDING_ENDPOINT: http://tei-embedding-service:80 |
| 80 | + HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN} |
| 81 | + EMBEDDING_MODEL_ID: ${EMBEDDING_MODEL_ID} |
| 82 | + LOGFLAG: ${LOGFLAG} |
| 83 | + restart: unless-stopped |
| 84 | + |
| 85 | + retriever: |
| 86 | + image: ${REGISTRY:-opea}/retriever:${TAG:-latest} |
| 87 | + container_name: retriever-milvus-server |
| 88 | + depends_on: |
| 89 | + - milvus-standalone |
| 90 | + ports: |
| 91 | + - "7000:7000" |
| 92 | + ipc: host |
| 93 | + environment: |
| 94 | + no_proxy: ${no_proxy} |
| 95 | + http_proxy: ${http_proxy} |
| 96 | + https_proxy: ${https_proxy} |
| 97 | + MILVUS_HOST: ${host_ip} |
| 98 | + MILVUS_PORT: 19530 |
| 99 | + #COLLECTION_NAME: ${COLLECTION_NAME} |
| 100 | + TEI_EMBEDDING_ENDPOINT: http://tei-embedding-service:80 |
| 101 | + HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN} |
| 102 | + LOGFLAG: ${LOGFLAG} |
| 103 | + RETRIEVER_COMPONENT_NAME: "OPEA_RETRIEVER_MILVUS" |
| 104 | + restart: unless-stopped |
| 105 | + |
| 106 | + tei-embedding-service: |
| 107 | + image: ghcr.io/huggingface/text-embeddings-inference:cpu-1.5 |
| 108 | + container_name: tei-embedding-server |
| 109 | + ports: |
| 110 | + - "6006:80" |
| 111 | + volumes: |
| 112 | + - "./data:/data" |
| 113 | + shm_size: 1g |
| 114 | + environment: |
| 115 | + no_proxy: ${no_proxy} |
| 116 | + http_proxy: ${http_proxy} |
| 117 | + https_proxy: ${https_proxy} |
| 118 | + command: --model-id ${EMBEDDING_MODEL_ID} --auto-truncate |
| 119 | + |
| 120 | + tei-reranking-service: |
| 121 | + image: ghcr.io/huggingface/text-embeddings-inference:cpu-1.5 |
| 122 | + container_name: tei-reranking-server |
| 123 | + ports: |
| 124 | + - "8808:80" |
| 125 | + volumes: |
| 126 | + - "./data:/data" |
| 127 | + shm_size: 1g |
| 128 | + environment: |
| 129 | + no_proxy: ${no_proxy} |
| 130 | + http_proxy: ${http_proxy} |
| 131 | + https_proxy: ${https_proxy} |
| 132 | + HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN} |
| 133 | + HF_HUB_DISABLE_PROGRESS_BARS: 1 |
| 134 | + HF_HUB_ENABLE_HF_TRANSFER: 0 |
| 135 | + command: --model-id ${RERANK_MODEL_ID} --auto-truncate |
| 136 | + |
| 137 | + tgi-service: |
| 138 | + image: ghcr.io/huggingface/text-generation-inference:2.4.0-intel-cpu |
| 139 | + container_name: tgi-service |
| 140 | + ports: |
| 141 | + - "9009:80" |
| 142 | + volumes: |
| 143 | + - "./data:/data" |
| 144 | + shm_size: 1g |
| 145 | + environment: |
| 146 | + no_proxy: ${no_proxy} |
| 147 | + http_proxy: ${http_proxy} |
| 148 | + https_proxy: ${https_proxy} |
| 149 | + HF_TOKEN: ${HUGGINGFACEHUB_API_TOKEN} |
| 150 | + HF_HUB_DISABLE_PROGRESS_BARS: 1 |
| 151 | + HF_HUB_ENABLE_HF_TRANSFER: 0 |
| 152 | + command: --model-id ${LLM_MODEL_ID} --cuda-graphs 0 |
| 153 | + |
| 154 | + chatqna-xeon-backend-server: |
| 155 | + image: ${REGISTRY:-opea}/chatqna:${TAG:-latest} |
| 156 | + container_name: chatqna-xeon-backend-server |
| 157 | + depends_on: |
| 158 | + - milvus-standalone |
| 159 | + - tei-embedding-service |
| 160 | + - dataprep-milvus-service |
| 161 | + - retriever |
| 162 | + - tei-reranking-service |
| 163 | + - tgi-service |
| 164 | + ports: |
| 165 | + - "8888:8888" |
| 166 | + environment: |
| 167 | + - no_proxy=${no_proxy} |
| 168 | + - https_proxy=${https_proxy} |
| 169 | + - http_proxy=${http_proxy} |
| 170 | + - MEGA_SERVICE_HOST_IP=chatqna-xeon-backend-server |
| 171 | + - EMBEDDING_SERVER_HOST_IP=tei-embedding-service |
| 172 | + - RETRIEVER_SERVICE_HOST_IP=retriever |
| 173 | + - RERANK_SERVER_HOST_IP=tei-reranking-service |
| 174 | + - LLM_SERVER_HOST_IP=tgi-service |
| 175 | + - LLM_MODEL=${LLM_MODEL_ID} |
| 176 | + - LOGFLAG=${LOGFLAG} |
| 177 | + ipc: host |
| 178 | + restart: always |
| 179 | + |
| 180 | + chatqna-xeon-ui-server: |
| 181 | + image: ${REGISTRY:-opea}/chatqna-ui:${TAG:-latest} |
| 182 | + container_name: chatqna-xeon-ui-server |
| 183 | + depends_on: |
| 184 | + - chatqna-xeon-backend-server |
| 185 | + ports: |
| 186 | + - "5173:5173" |
| 187 | + ipc: host |
| 188 | + restart: always |
| 189 | + |
| 190 | + chatqna-xeon-nginx-server: |
| 191 | + image: ${REGISTRY:-opea}/nginx:${TAG:-latest} |
| 192 | + container_name: chatqna-xeon-nginx-server |
| 193 | + depends_on: |
| 194 | + - chatqna-xeon-backend-server |
| 195 | + - chatqna-xeon-ui-server |
| 196 | + ports: |
| 197 | + - "${NGINX_PORT:-80}:80" |
| 198 | + environment: |
| 199 | + - no_proxy=${no_proxy} |
| 200 | + - https_proxy=${https_proxy} |
| 201 | + - http_proxy=${http_proxy} |
| 202 | + - FRONTEND_SERVICE_IP=chatqna-xeon-ui-server |
| 203 | + - FRONTEND_SERVICE_PORT=5173 |
| 204 | + - BACKEND_SERVICE_NAME=chatqna |
| 205 | + - BACKEND_SERVICE_IP=chatqna-xeon-backend-server |
| 206 | + - BACKEND_SERVICE_PORT=8888 |
| 207 | + - DATAPREP_SERVICE_IP=dataprep-milvus-service |
| 208 | + - DATAPREP_SERVICE_PORT=5000 |
| 209 | + ipc: host |
| 210 | + restart: always |
| 211 | + |
| 212 | + |
| 213 | +networks: |
| 214 | + default: |
| 215 | + driver: bridge |
0 commit comments