From 256b58c07e9ad2b7f16f744b4857133045aa33de Mon Sep 17 00:00:00 2001 From: lvliang-intel Date: Fri, 18 Oct 2024 11:31:24 +0800 Subject: [PATCH] Replace environment variables with service name for ChatQnA (#977) Signed-off-by: lvliang-intel --- ChatQnA/chatqna.py | 8 +- .../docker_compose/intel/cpu/aipc/README.md | 95 ++++++------------- .../intel/cpu/aipc/compose.yaml | 45 ++++----- .../docker_compose/intel/cpu/aipc/set_env.sh | 21 +--- .../intel/cpu/xeon/README_qdrant.md | 21 ++-- .../intel/cpu/xeon/compose.yaml | 57 ++++++----- .../intel/cpu/xeon/compose_qdrant.yaml | 54 +++++------ .../intel/cpu/xeon/compose_vllm.yaml | 59 ++++++------ .../cpu/xeon/compose_without_rerank.yaml | 53 +++++------ .../docker_compose/intel/cpu/xeon/set_env.sh | 17 ---- .../docker_compose/intel/hpu/gaudi/README.md | 10 +- .../intel/hpu/gaudi/compose.yaml | 57 +++++------ .../intel/hpu/gaudi/compose_guardrails.yaml | 63 ++++++------ .../intel/hpu/gaudi/compose_vllm.yaml | 59 ++++++------ .../intel/hpu/gaudi/compose_vllm_ray.yaml | 59 ++++++------ .../hpu/gaudi/compose_without_rerank.yaml | 53 ++++++----- .../docker_compose/intel/hpu/gaudi/set_env.sh | 16 ---- .../tests/test_compose_guardrails_on_gaudi.sh | 18 ---- ChatQnA/tests/test_compose_on_gaudi.sh | 19 ---- ChatQnA/tests/test_compose_on_xeon.sh | 17 ---- ChatQnA/tests/test_compose_qdrant_on_xeon.sh | 15 --- ChatQnA/tests/test_compose_vllm_on_gaudi.sh | 14 --- ChatQnA/tests/test_compose_vllm_on_xeon.sh | 16 +--- .../tests/test_compose_vllm_ray_on_gaudi.sh | 14 --- .../test_compose_without_rerank_on_gaudi.sh | 15 --- .../test_compose_without_rerank_on_xeon.sh | 15 --- ChatQnA/ui/svelte/playwright.config.ts | 2 +- 27 files changed, 330 insertions(+), 562 deletions(-) diff --git a/ChatQnA/chatqna.py b/ChatQnA/chatqna.py index 31982bd65..3b25aeeab 100644 --- a/ChatQnA/chatqna.py +++ b/ChatQnA/chatqna.py @@ -38,15 +38,15 @@ def generate_rag_prompt(question, documents): MEGA_SERVICE_HOST_IP = os.getenv("MEGA_SERVICE_HOST_IP", "0.0.0.0") MEGA_SERVICE_PORT = int(os.getenv("MEGA_SERVICE_PORT", 8888)) GUARDRAIL_SERVICE_HOST_IP = os.getenv("GUARDRAIL_SERVICE_HOST_IP", "0.0.0.0") -GUARDRAIL_SERVICE_PORT = int(os.getenv("GUARDRAIL_SERVICE_PORT", 9090)) +GUARDRAIL_SERVICE_PORT = int(os.getenv("GUARDRAIL_SERVICE_PORT", 80)) EMBEDDING_SERVER_HOST_IP = os.getenv("EMBEDDING_SERVER_HOST_IP", "0.0.0.0") -EMBEDDING_SERVER_PORT = int(os.getenv("EMBEDDING_SERVER_PORT", 6006)) +EMBEDDING_SERVER_PORT = int(os.getenv("EMBEDDING_SERVER_PORT", 80)) RETRIEVER_SERVICE_HOST_IP = os.getenv("RETRIEVER_SERVICE_HOST_IP", "0.0.0.0") RETRIEVER_SERVICE_PORT = int(os.getenv("RETRIEVER_SERVICE_PORT", 7000)) RERANK_SERVER_HOST_IP = os.getenv("RERANK_SERVER_HOST_IP", "0.0.0.0") -RERANK_SERVER_PORT = int(os.getenv("RERANK_SERVER_PORT", 8808)) +RERANK_SERVER_PORT = int(os.getenv("RERANK_SERVER_PORT", 80)) LLM_SERVER_HOST_IP = os.getenv("LLM_SERVER_HOST_IP", "0.0.0.0") -LLM_SERVER_PORT = int(os.getenv("LLM_SERVER_PORT", 9009)) +LLM_SERVER_PORT = int(os.getenv("LLM_SERVER_PORT", 80)) def align_inputs(self, inputs, cur_node, runtime_graph, llm_parameters_dict, **kwargs): diff --git a/ChatQnA/docker_compose/intel/cpu/aipc/README.md b/ChatQnA/docker_compose/intel/cpu/aipc/README.md index 96ecc9f71..fa3842d22 100644 --- a/ChatQnA/docker_compose/intel/cpu/aipc/README.md +++ b/ChatQnA/docker_compose/intel/cpu/aipc/README.md @@ -61,7 +61,7 @@ Run the command to download LLM models. The is the one set in [Ollama ``` export host_ip= export OLLAMA_HOST=http://${host_ip}:11434 -ollama pull llama3 +ollama pull llama3.2 ``` After downloaded the models, you can list the models by `ollama list`. @@ -69,8 +69,8 @@ After downloaded the models, you can list the models by `ollama list`. The output should be similar to the following: ``` -NAME ID SIZE MODIFIED -llama3:latest 365c0bd3c000 4.7 GB 5 days ago +NAME ID SIZE MODIFIED +llama3.2:latest a80c4f17acd5 2.0 GB 2 minutes ago ``` ### Consume Ollama LLM Service @@ -78,25 +78,25 @@ llama3:latest 365c0bd3c000 4.7 GB 5 days ago Access ollama service to verify that the ollama is functioning correctly. ```bash -curl http://${host_ip}:11434/api/generate -d '{"model": "llama3", "prompt":"What is Deep Learning?"}' +curl http://${host_ip}:11434/api/generate -d '{"model": "llama3.2", "prompt":"What is Deep Learning?"}' ``` The outputs are similar to these: ``` -{"model":"llama3","created_at":"2024-10-11T07:58:38.949268562Z","response":"Deep","done":false} -{"model":"llama3","created_at":"2024-10-11T07:58:39.017625351Z","response":" learning","done":false} -{"model":"llama3","created_at":"2024-10-11T07:58:39.102848076Z","response":" is","done":false} -{"model":"llama3","created_at":"2024-10-11T07:58:39.171037991Z","response":" a","done":false} -{"model":"llama3","created_at":"2024-10-11T07:58:39.243757952Z","response":" subset","done":false} -{"model":"llama3","created_at":"2024-10-11T07:58:39.328708084Z","response":" of","done":false} -{"model":"llama3","created_at":"2024-10-11T07:58:39.413844974Z","response":" machine","done":false} -{"model":"llama3","created_at":"2024-10-11T07:58:39.486239329Z","response":" learning","done":false} -{"model":"llama3","created_at":"2024-10-11T07:58:39.555960842Z","response":" that","done":false} -{"model":"llama3","created_at":"2024-10-11T07:58:39.642418238Z","response":" involves","done":false} -{"model":"llama3","created_at":"2024-10-11T07:58:39.714137478Z","response":" the","done":false} -{"model":"llama3","created_at":"2024-10-11T07:58:39.798776679Z","response":" use","done":false} -{"model":"llama3","created_at":"2024-10-11T07:58:39.883747938Z","response":" of","done":false} +{"model":"llama3.2","created_at":"2024-10-12T12:55:28.098813868Z","response":"Deep","done":false} +{"model":"llama3.2","created_at":"2024-10-12T12:55:28.124514468Z","response":" learning","done":false} +{"model":"llama3.2","created_at":"2024-10-12T12:55:28.149754216Z","response":" is","done":false} +{"model":"llama3.2","created_at":"2024-10-12T12:55:28.180420784Z","response":" a","done":false} +{"model":"llama3.2","created_at":"2024-10-12T12:55:28.229185873Z","response":" subset","done":false} +{"model":"llama3.2","created_at":"2024-10-12T12:55:28.263956118Z","response":" of","done":false} +{"model":"llama3.2","created_at":"2024-10-12T12:55:28.289097354Z","response":" machine","done":false} +{"model":"llama3.2","created_at":"2024-10-12T12:55:28.316838918Z","response":" learning","done":false} +{"model":"llama3.2","created_at":"2024-10-12T12:55:28.342309506Z","response":" that","done":false} +{"model":"llama3.2","created_at":"2024-10-12T12:55:28.367221264Z","response":" involves","done":false} +{"model":"llama3.2","created_at":"2024-10-12T12:55:28.39205893Z","response":" the","done":false} +{"model":"llama3.2","created_at":"2024-10-12T12:55:28.417933974Z","response":" use","done":false} +{"model":"llama3.2","created_at":"2024-10-12T12:55:28.443110388Z","response":" of","done":false} ... ``` @@ -155,13 +155,21 @@ cd ~/OPEA/GenAIExamples/ChatQnA/ui docker build --no-cache -t opea/chatqna-ui:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f ./docker/Dockerfile . ``` -Then run the command `docker images`, you will have the following 5 Docker Images: +### 6. Build Nginx Docker Image + +```bash +cd GenAIComps +docker build -t opea/nginx:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/nginx/Dockerfile . +``` + +Then run the command `docker images`, you will have the following 6 Docker Images: 1. `opea/dataprep-redis:latest` 2. `opea/retriever-redis:latest` 3. `opea/llm-ollama:latest` 4. `opea/chatqna:latest` 5. `opea/chatqna-ui:latest` +6. `opea/nginx:latest` ## 🚀 Start Microservices @@ -201,27 +209,10 @@ export http_proxy=${your_http_proxy} export https_proxy=${your_http_proxy} export EMBEDDING_MODEL_ID="BAAI/bge-base-en-v1.5" export RERANK_MODEL_ID="BAAI/bge-reranker-base" -export TEI_EMBEDDING_ENDPOINT="http://${host_ip}:6006" -export REDIS_URL="redis://${host_ip}:6379" export INDEX_NAME="rag-redis" export HUGGINGFACEHUB_API_TOKEN=${your_hf_api_token} -export MEGA_SERVICE_HOST_IP=${host_ip} -export EMBEDDING_SERVER_HOST_IP=${host_ip} -export RETRIEVER_SERVICE_HOST_IP=${host_ip} -export RERANK_SERVER_HOST_IP=${host_ip} -export LLM_SERVER_HOST_IP=${host_ip} -export BACKEND_SERVICE_ENDPOINT="http://${host_ip}:8888/v1/chatqna" -export DATAPREP_SERVICE_ENDPOINT="http://${host_ip}:6007/v1/dataprep" -export DATAPREP_GET_FILE_ENDPOINT="http://${host_ip}:6007/v1/dataprep/get_file" -export DATAPREP_DELETE_FILE_ENDPOINT="http://${host_ip}:6007/v1/dataprep/delete_file" -export FRONTEND_SERVICE_IP=${host_ip} -export FRONTEND_SERVICE_PORT=5173 -export BACKEND_SERVICE_NAME=chatqna -export BACKEND_SERVICE_IP=${host_ip} -export BACKEND_SERVICE_PORT=8888 - export OLLAMA_ENDPOINT=http://${host_ip}:11434 -export OLLAMA_MODEL="llama3" +export OLLAMA_MODEL="llama3.2" ``` - Windows PC @@ -229,27 +220,10 @@ export OLLAMA_MODEL="llama3" ```bash set EMBEDDING_MODEL_ID=BAAI/bge-base-en-v1.5 set RERANK_MODEL_ID=BAAI/bge-reranker-base -set TEI_EMBEDDING_ENDPOINT=http://%host_ip%:6006 -set REDIS_URL=redis://%host_ip%:6379 set INDEX_NAME=rag-redis set HUGGINGFACEHUB_API_TOKEN=%your_hf_api_token% -set MEGA_SERVICE_HOST_IP=%host_ip% -set EMBEDDING_SERVER_HOST_IP=%host_ip% -set RETRIEVER_SERVICE_HOST_IP=%host_ip% -set RERANK_SERVER_HOST_IP=%host_ip% -set LLM_SERVER_HOST_IP=%host_ip% -set BACKEND_SERVICE_ENDPOINT=http://%host_ip%:8888/v1/chatqna -set DATAPREP_SERVICE_ENDPOINT=http://%host_ip%:6007/v1/dataprep -set DATAPREP_GET_FILE_ENDPOINT="http://%host_ip%:6007/v1/dataprep/get_file" -set DATAPREP_DELETE_FILE_ENDPOINT="http://%host_ip%:6007/v1/dataprep/delete_file" -set FRONTEND_SERVICE_IP=%host_ip% -set FRONTEND_SERVICE_PORT=5173 -set BACKEND_SERVICE_NAME=chatqna -set BACKEND_SERVICE_IP=%host_ip% -set BACKEND_SERVICE_PORT=8888 - set OLLAMA_ENDPOINT=http://host.docker.internal:11434 -set OLLAMA_MODEL="llama3" +set OLLAMA_MODEL="llama3.2" ``` Note: Please replace with `host_ip` with you external IP address, do not use localhost. @@ -263,15 +237,6 @@ cd ~/OPEA/GenAIExamples/ChatQnA/docker_compose/intel/cpu/aipc/ docker compose up -d ``` -Let ollama service runs (if you have started ollama service in [Prerequisites](#Prerequisites), skip this step) - -```bash -# e.g. ollama run llama3 -OLLAMA_HOST=${host_ip}:11434 ollama run $OLLAMA_MODEL -# for windows -# ollama run %OLLAMA_MODEL% -``` - ### Validate Microservices Follow the instructions to validate MicroServices. @@ -309,7 +274,7 @@ For details on how to verify the correctness of the response, refer to [how-to-v 4. Ollama Service ```bash - curl http://${host_ip}:11434/api/generate -d '{"model": "llama3", "prompt":"What is Deep Learning?"}' + curl http://${host_ip}:11434/api/generate -d '{"model": "llama3.2", "prompt":"What is Deep Learning?"}' ``` 5. LLM Microservice @@ -325,7 +290,7 @@ For details on how to verify the correctness of the response, refer to [how-to-v ```bash curl http://${host_ip}:8888/v1/chatqna -H "Content-Type: application/json" -d '{ - "messages": "What is the revenue of Nike in 2023?", "model": "'"${OLLAMA_MODEL}"'" + "messages": "What is the revenue of Nike in 2023?" }' ``` diff --git a/ChatQnA/docker_compose/intel/cpu/aipc/compose.yaml b/ChatQnA/docker_compose/intel/cpu/aipc/compose.yaml index 6e789afae..e06505928 100644 --- a/ChatQnA/docker_compose/intel/cpu/aipc/compose.yaml +++ b/ChatQnA/docker_compose/intel/cpu/aipc/compose.yaml @@ -13,15 +13,17 @@ services: container_name: dataprep-redis-server depends_on: - redis-vector-db + - tei-embedding-service ports: - "6007:6007" environment: no_proxy: ${no_proxy} http_proxy: ${http_proxy} https_proxy: ${https_proxy} - REDIS_URL: ${REDIS_URL} + REDIS_URL: redis://redis-vector-db:6379 + REDIS_HOST: redis-vector-db INDEX_NAME: ${INDEX_NAME} - TEI_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT} + TEI_ENDPOINT: http://tei-embedding-service:80 HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN} tei-embedding-service: image: ghcr.io/huggingface/text-embeddings-inference:cpu-1.5 @@ -48,9 +50,10 @@ services: no_proxy: ${no_proxy} http_proxy: ${http_proxy} https_proxy: ${https_proxy} - REDIS_URL: ${REDIS_URL} + REDIS_URL: redis://redis-vector-db:6379 + REDIS_HOST: redis-vector-db INDEX_NAME: ${INDEX_NAME} - TEI_EMBEDDING_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT} + TEI_EMBEDDING_ENDPOINT: http://tei-embedding-service:80 HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN} restart: unless-stopped tei-reranking-service: @@ -79,7 +82,6 @@ services: no_proxy: ${no_proxy} http_proxy: ${http_proxy} https_proxy: ${https_proxy} - TGI_LLM_ENDPOINT: ${TGI_LLM_ENDPOINT} HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN} HF_HUB_DISABLE_PROGRESS_BARS: 1 HF_HUB_ENABLE_HF_TRANSFER: 0 @@ -90,6 +92,7 @@ services: container_name: chatqna-aipc-backend-server depends_on: - redis-vector-db + - dataprep-redis-service - tei-embedding-service - retriever - tei-reranking-service @@ -100,14 +103,14 @@ services: - no_proxy=${no_proxy} - https_proxy=${https_proxy} - http_proxy=${http_proxy} - - MEGA_SERVICE_HOST_IP=${MEGA_SERVICE_HOST_IP} - - EMBEDDING_SERVER_HOST_IP=${EMBEDDING_SERVICE_HOST_IP} - - EMBEDDING_SERVER_PORT=${EMBEDDING_SERVICE_PORT:-6006} - - RETRIEVER_SERVICE_HOST_IP=${RETRIEVER_SERVICE_HOST_IP} - - RERANK_SERVER_HOST_IP=${RERANK_SERVICE_HOST_IP} - - RERANK_SERVER_PORT=${RERANK_SERVICE_PORT:-8808} - - LLM_SERVER_HOST_IP=${LLM_SERVICE_HOST_IP} - - LLM_SERVER_PORT=${LLM_SERVICE_PORT:-9000} + - MEGA_SERVICE_HOST_IP=chaqna-aipc-backend-server + - EMBEDDING_SERVER_HOST_IP=tei-embedding-service + - EMBEDDING_SERVER_PORT=80 + - RETRIEVER_SERVICE_HOST_IP=retriever + - RERANK_SERVER_HOST_IP=tei-reranking-service + - RERANK_SERVER_PORT=80 + - LLM_SERVER_HOST_IP=llm + - LLM_SERVER_PORT=9000 - LOGFLAG=${LOGFLAG} ipc: host restart: always @@ -122,10 +125,6 @@ services: - no_proxy=${no_proxy} - https_proxy=${https_proxy} - http_proxy=${http_proxy} - - CHAT_BASE_URL=${BACKEND_SERVICE_ENDPOINT} - - UPLOAD_FILE_BASE_URL=${DATAPREP_SERVICE_ENDPOINT} - - GET_FILE=${DATAPREP_GET_FILE_ENDPOINT} - - DELETE_FILE=${DATAPREP_DELETE_FILE_ENDPOINT} ipc: host restart: always chaqna-aipc-nginx-server: @@ -140,11 +139,13 @@ services: - no_proxy=${no_proxy} - https_proxy=${https_proxy} - http_proxy=${http_proxy} - - FRONTEND_SERVICE_IP=${FRONTEND_SERVICE_IP} - - FRONTEND_SERVICE_PORT=${FRONTEND_SERVICE_PORT} - - BACKEND_SERVICE_NAME=${BACKEND_SERVICE_NAME} - - BACKEND_SERVICE_IP=${BACKEND_SERVICE_IP} - - BACKEND_SERVICE_PORT=${BACKEND_SERVICE_PORT} + - FRONTEND_SERVICE_IP=chatqna-xeon-ui-server + - FRONTEND_SERVICE_PORT=5173 + - BACKEND_SERVICE_NAME=chatqna + - BACKEND_SERVICE_IP=chatqna-xeon-backend-server + - BACKEND_SERVICE_PORT=8888 + - DATAPREP_SERVICE_IP=dataprep-redis-service + - DATAPREP_SERVICE_PORT=6007 ipc: host restart: always diff --git a/ChatQnA/docker_compose/intel/cpu/aipc/set_env.sh b/ChatQnA/docker_compose/intel/cpu/aipc/set_env.sh index 2cb996874..b8733bd45 100644 --- a/ChatQnA/docker_compose/intel/cpu/aipc/set_env.sh +++ b/ChatQnA/docker_compose/intel/cpu/aipc/set_env.sh @@ -15,25 +15,6 @@ fi export HUGGINGFACEHUB_API_TOKEN=${your_hf_api_token} export EMBEDDING_MODEL_ID="BAAI/bge-base-en-v1.5" export RERANK_MODEL_ID="BAAI/bge-reranker-base" -export TEI_EMBEDDING_ENDPOINT="http://${host_ip}:6006" -export TEI_RERANKING_ENDPOINT="http://${host_ip}:8808" -export REDIS_URL="redis://${host_ip}:6379" export INDEX_NAME="rag-redis" -export REDIS_HOST=${host_ip} -export MEGA_SERVICE_HOST_IP=${host_ip} -export EMBEDDING_SERVICE_HOST_IP=${host_ip} -export RETRIEVER_SERVICE_HOST_IP=${host_ip} -export RERANK_SERVICE_HOST_IP=${host_ip} -export LLM_SERVICE_HOST_IP=${host_ip} -export BACKEND_SERVICE_ENDPOINT="http://${host_ip}:8888/v1/chatqna" -export DATAPREP_SERVICE_ENDPOINT="http://${host_ip}:6007/v1/dataprep" -export DATAPREP_GET_FILE_ENDPOINT="http://${host_ip}:6007/v1/dataprep/get_file" -export DATAPREP_DELETE_FILE_ENDPOINT="http://${host_ip}:6007/v1/dataprep/delete_file" -export FRONTEND_SERVICE_IP=${host_ip} -export FRONTEND_SERVICE_PORT=5173 -export BACKEND_SERVICE_NAME=chatqna -export BACKEND_SERVICE_IP=${host_ip} -export BACKEND_SERVICE_PORT=8888 - export OLLAMA_ENDPOINT=http://${host_ip}:11434 -export OLLAMA_MODEL="llama3" +export OLLAMA_MODEL="llama3.2" diff --git a/ChatQnA/docker_compose/intel/cpu/xeon/README_qdrant.md b/ChatQnA/docker_compose/intel/cpu/xeon/README_qdrant.md index a9f0f4e47..c3aefbc15 100644 --- a/ChatQnA/docker_compose/intel/cpu/xeon/README_qdrant.md +++ b/ChatQnA/docker_compose/intel/cpu/xeon/README_qdrant.md @@ -118,12 +118,20 @@ docker build --no-cache -t opea/chatqna-conversation-ui:latest --build-arg https cd ../../../.. ``` -Then run the command `docker images`, you will have the following 4 Docker Images: +### 6. Build Nginx Docker Image + +```bash +cd GenAIComps +docker build -t opea/nginx:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/nginx/Dockerfile . +``` + +Then run the command `docker images`, you will have the following 5 Docker Images: 1. `opea/dataprep-qdrant:latest` 2. `opea/retriever-qdrant:latest` 3. `opea/chatqna:latest` 4. `opea/chatqna-ui:latest` +5. `opea/nginx:latest` ## 🚀 Start Microservices @@ -172,18 +180,7 @@ export https_proxy=${your_http_proxy} export EMBEDDING_MODEL_ID="BAAI/bge-base-en-v1.5" export RERANK_MODEL_ID="BAAI/bge-reranker-base" export LLM_MODEL_ID="Intel/neural-chat-7b-v3-3" -export TEI_EMBEDDING_ENDPOINT="http://${host_ip}:6040" -export QDRANT_HOST=${host_ip} -export QDRANT_PORT=6333 export INDEX_NAME="rag-qdrant" -export HUGGINGFACEHUB_API_TOKEN=${your_hf_api_token} -export EMBEDDING_SERVER_HOST_IP=${host_ip} -export MEGA_SERVICE_HOST_IP=${host_ip} -export RETRIEVER_SERVICE_HOST_IP=${host_ip} -export RERANK_SERVER_HOST_IP=${host_ip} -export LLM_SERVER_HOST_IP=${host_ip} -export BACKEND_SERVICE_ENDPOINT="http://${host_ip}:8912/v1/chatqna" -export DATAPREP_SERVICE_ENDPOINT="http://${host_ip}:6043/v1/dataprep" ``` Note: Please replace with `host_ip` with you external IP address, do not use localhost. diff --git a/ChatQnA/docker_compose/intel/cpu/xeon/compose.yaml b/ChatQnA/docker_compose/intel/cpu/xeon/compose.yaml index 9ad4ee9b2..5fce4b0ab 100644 --- a/ChatQnA/docker_compose/intel/cpu/xeon/compose.yaml +++ b/ChatQnA/docker_compose/intel/cpu/xeon/compose.yaml @@ -20,10 +20,10 @@ services: no_proxy: ${no_proxy} http_proxy: ${http_proxy} https_proxy: ${https_proxy} - REDIS_URL: ${REDIS_URL} - REDIS_HOST: ${REDIS_HOST} + REDIS_URL: redis://redis-vector-db:6379 + REDIS_HOST: redis-vector-db INDEX_NAME: ${INDEX_NAME} - TEI_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT} + TEI_ENDPOINT: http://tei-embedding-service:80 HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN} tei-embedding-service: image: ghcr.io/huggingface/text-embeddings-inference:cpu-1.5 @@ -50,9 +50,10 @@ services: no_proxy: ${no_proxy} http_proxy: ${http_proxy} https_proxy: ${https_proxy} - REDIS_URL: ${REDIS_URL} + REDIS_URL: redis://redis-vector-db:6379 + REDIS_HOST: redis-vector-db INDEX_NAME: ${INDEX_NAME} - TEI_EMBEDDING_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT} + TEI_EMBEDDING_ENDPOINT: http://tei-embedding-service:80 HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN} restart: unless-stopped tei-reranking-service: @@ -87,7 +88,7 @@ services: HF_HUB_DISABLE_PROGRESS_BARS: 1 HF_HUB_ENABLE_HF_TRANSFER: 0 command: --model-id ${LLM_MODEL_ID} --cuda-graphs 0 - chaqna-xeon-backend-server: + chatqna-xeon-backend-server: image: ${REGISTRY:-opea}/chatqna:${TAG:-latest} container_name: chatqna-xeon-backend-server depends_on: @@ -103,51 +104,49 @@ services: - no_proxy=${no_proxy} - https_proxy=${https_proxy} - http_proxy=${http_proxy} - - MEGA_SERVICE_HOST_IP=${MEGA_SERVICE_HOST_IP} - - EMBEDDING_SERVER_HOST_IP=${EMBEDDING_SERVER_HOST_IP} - - EMBEDDING_SERVER_PORT=${EMBEDDING_SERVER_PORT:-6006} - - RETRIEVER_SERVICE_HOST_IP=${RETRIEVER_SERVICE_HOST_IP} - - RERANK_SERVER_HOST_IP=${RERANK_SERVER_HOST_IP} - - RERANK_SERVER_PORT=${RERANK_SERVER_PORT:-8808} - - LLM_SERVER_HOST_IP=${LLM_SERVER_HOST_IP} - - LLM_SERVER_PORT=${LLM_SERVER_PORT:-9009} + - MEGA_SERVICE_HOST_IP=chatqna-xeon-backend-server + - EMBEDDING_SERVER_HOST_IP=tei-embedding-service + - EMBEDDING_SERVER_PORT=${EMBEDDING_SERVER_PORT:-80} + - RETRIEVER_SERVICE_HOST_IP=retriever + - RERANK_SERVER_HOST_IP=tei-reranking-service + - RERANK_SERVER_PORT=${RERANK_SERVER_PORT:-80} + - LLM_SERVER_HOST_IP=tgi-service + - LLM_SERVER_PORT=${LLM_SERVER_PORT:-80} - LOGFLAG=${LOGFLAG} ipc: host restart: always - chaqna-xeon-ui-server: + chatqna-xeon-ui-server: image: ${REGISTRY:-opea}/chatqna-ui:${TAG:-latest} container_name: chatqna-xeon-ui-server depends_on: - - chaqna-xeon-backend-server + - chatqna-xeon-backend-server ports: - "5173:5173" environment: - no_proxy=${no_proxy} - https_proxy=${https_proxy} - http_proxy=${http_proxy} - - CHAT_BASE_URL=${BACKEND_SERVICE_ENDPOINT} - - UPLOAD_FILE_BASE_URL=${DATAPREP_SERVICE_ENDPOINT} - - GET_FILE=${DATAPREP_GET_FILE_ENDPOINT} - - DELETE_FILE=${DATAPREP_DELETE_FILE_ENDPOINT} ipc: host restart: always - chaqna-xeon-nginx-server: + chatqna-xeon-nginx-server: image: ${REGISTRY:-opea}/nginx:${TAG:-latest} - container_name: chaqna-xeon-nginx-server + container_name: chatqna-xeon-nginx-server depends_on: - - chaqna-xeon-backend-server - - chaqna-xeon-ui-server + - chatqna-xeon-backend-server + - chatqna-xeon-ui-server ports: - "${NGINX_PORT:-80}:80" environment: - no_proxy=${no_proxy} - https_proxy=${https_proxy} - http_proxy=${http_proxy} - - FRONTEND_SERVICE_IP=${FRONTEND_SERVICE_IP} - - FRONTEND_SERVICE_PORT=${FRONTEND_SERVICE_PORT} - - BACKEND_SERVICE_NAME=${BACKEND_SERVICE_NAME} - - BACKEND_SERVICE_IP=${BACKEND_SERVICE_IP} - - BACKEND_SERVICE_PORT=${BACKEND_SERVICE_PORT} + - FRONTEND_SERVICE_IP=chatqna-xeon-ui-server + - FRONTEND_SERVICE_PORT=5173 + - BACKEND_SERVICE_NAME=chatqna + - BACKEND_SERVICE_IP=chatqna-xeon-backend-server + - BACKEND_SERVICE_PORT=8888 + - DATAPREP_SERVICE_IP=dataprep-redis-service + - DATAPREP_SERVICE_PORT=6007 ipc: host restart: always diff --git a/ChatQnA/docker_compose/intel/cpu/xeon/compose_qdrant.yaml b/ChatQnA/docker_compose/intel/cpu/xeon/compose_qdrant.yaml index b0a091aa1..22be724b6 100644 --- a/ChatQnA/docker_compose/intel/cpu/xeon/compose_qdrant.yaml +++ b/ChatQnA/docker_compose/intel/cpu/xeon/compose_qdrant.yaml @@ -20,10 +20,10 @@ services: no_proxy: ${no_proxy} http_proxy: ${http_proxy} https_proxy: ${https_proxy} - QDRANT_HOST: ${QDRANT_HOST} + QDRANT_HOST: qdrant-vector-db QDRANT_PORT: 6333 COLLECTION_NAME: ${INDEX_NAME} - TEI_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT} + TEI_ENDPOINT: http://tei-embedding-service:80 HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN} tei-embedding-service: image: ghcr.io/huggingface/text-embeddings-inference:cpu-1.5 @@ -50,7 +50,7 @@ services: no_proxy: ${no_proxy} http_proxy: ${http_proxy} https_proxy: ${https_proxy} - QDRANT_HOST: ${QDRANT_HOST} + QDRANT_HOST: qdrant-vector-db QDRANT_PORT: 6333 INDEX_NAME: ${INDEX_NAME} TEI_EMBEDDING_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT} @@ -87,7 +87,7 @@ services: HF_HUB_DISABLE_PROGRESS_BARS: 1 HF_HUB_ENABLE_HF_TRANSFER: 0 command: --model-id ${LLM_MODEL_ID} --cuda-graphs 0 - chaqna-xeon-backend-server: + chatqna-xeon-backend-server: image: ${REGISTRY:-opea}/chatqna:${TAG:-latest} container_name: chatqna-xeon-backend-server depends_on: @@ -102,52 +102,50 @@ services: - no_proxy=${no_proxy} - https_proxy=${https_proxy} - http_proxy=${http_proxy} - - MEGA_SERVICE_HOST_IP=${MEGA_SERVICE_HOST_IP} - - EMBEDDING_SERVER_HOST_IP=${EMBEDDING_SERVER_HOST_IP} - - EMBEDDING_SERVER_PORT=${EMBEDDING_SERVER_PORT:-6040} - - RETRIEVER_SERVICE_HOST_IP=${RETRIEVER_SERVICE_HOST_IP} - - RETRIEVER_SERVICE_PORT=${RETRIEVER_SERVICE_PORT:-6045} - - RERANK_SERVER_HOST_IP=${RERANK_SERVER_HOST_IP} - - RERANK_SERVER_PORT=${RERANK_SERVER_PORT:-6041} - - LLM_SERVER_HOST_IP=${LLM_SERVER_HOST_IP} - - LLM_SERVER_PORT=${LLM_SERVER_PORT:-6042} + - MEGA_SERVICE_HOST_IP=chatqna-xeon-backend-server + - EMBEDDING_SERVER_HOST_IP=tei-embedding-service + - EMBEDDING_SERVER_PORT=${EMBEDDING_SERVER_PORT:-80} + - RETRIEVER_SERVICE_HOST_IP=retriever + - RETRIEVER_SERVICE_PORT=${RETRIEVER_SERVICE_PORT:-7000} + - RERANK_SERVER_HOST_IP=tei-reranking-service + - RERANK_SERVER_PORT=${RERANK_SERVER_PORT:-80} + - LLM_SERVER_HOST_IP=tgi-service + - LLM_SERVER_PORT=${LLM_SERVER_PORT:-80} - LOGFLAG=${LOGFLAG} ipc: host restart: always - chaqna-xeon-ui-server: + chatqna-xeon-ui-server: image: ${REGISTRY:-opea}/chatqna-ui:${TAG:-latest} container_name: chatqna-xeon-ui-server depends_on: - - chaqna-xeon-backend-server + - chatqna-xeon-backend-server ports: - "5173:5173" environment: - no_proxy=${no_proxy} - https_proxy=${https_proxy} - http_proxy=${http_proxy} - - CHAT_BASE_URL=${BACKEND_SERVICE_ENDPOINT} - - UPLOAD_FILE_BASE_URL=${DATAPREP_SERVICE_ENDPOINT} - - GET_FILE=${DATAPREP_GET_FILE_ENDPOINT} - - DELETE_FILE=${DATAPREP_DELETE_FILE_ENDPOINT} ipc: host restart: always - chaqna-xeon-nginx-server: + chatqna-xeon-nginx-server: image: ${REGISTRY:-opea}/nginx:${TAG:-latest} - container_name: chaqna-xeon-nginx-server + container_name: chatqna-xeon-nginx-server depends_on: - - chaqna-xeon-backend-server - - chaqna-xeon-ui-server + - chatqna-xeon-backend-server + - chatqna-xeon-ui-server ports: - "${NGINX_PORT:-80}:80" environment: - no_proxy=${no_proxy} - https_proxy=${https_proxy} - http_proxy=${http_proxy} - - FRONTEND_SERVICE_IP=${FRONTEND_SERVICE_IP} - - FRONTEND_SERVICE_PORT=${FRONTEND_SERVICE_PORT} - - BACKEND_SERVICE_NAME=${BACKEND_SERVICE_NAME} - - BACKEND_SERVICE_IP=${BACKEND_SERVICE_IP} - - BACKEND_SERVICE_PORT=${BACKEND_SERVICE_PORT} + - FRONTEND_SERVICE_IP=chatqna-xeon-ui-server + - FRONTEND_SERVICE_PORT=5173 + - BACKEND_SERVICE_NAME=chatqna + - BACKEND_SERVICE_IP=chatqna-xeon-backend-server + - BACKEND_SERVICE_PORT=8888 + - DATAPREP_SERVICE_IP=dataprep-qdrant-service + - DATAPREP_SERVICE_PORT=6007 ipc: host restart: always diff --git a/ChatQnA/docker_compose/intel/cpu/xeon/compose_vllm.yaml b/ChatQnA/docker_compose/intel/cpu/xeon/compose_vllm.yaml index f13bf4f11..ea156a130 100644 --- a/ChatQnA/docker_compose/intel/cpu/xeon/compose_vllm.yaml +++ b/ChatQnA/docker_compose/intel/cpu/xeon/compose_vllm.yaml @@ -20,9 +20,10 @@ services: no_proxy: ${no_proxy} http_proxy: ${http_proxy} https_proxy: ${https_proxy} - REDIS_URL: ${REDIS_URL} + REDIS_URL: redis://redis-vector-db:6379 + REDIS_HOST: redis-vector-db INDEX_NAME: ${INDEX_NAME} - TEI_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT} + TEI_ENDPOINT: http://tei-embedding-service:80 HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN} tei-embedding-service: image: ghcr.io/huggingface/text-embeddings-inference:cpu-1.5 @@ -49,12 +50,10 @@ services: no_proxy: ${no_proxy} http_proxy: ${http_proxy} https_proxy: ${https_proxy} - REDIS_URL: ${REDIS_URL} + REDIS_URL: redis://redis-vector-db:6379 + REDIS_HOST: redis-vector-db INDEX_NAME: ${INDEX_NAME} - TEI_EMBEDDING_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT} - LANGCHAIN_API_KEY: ${LANGCHAIN_API_KEY} - LANGCHAIN_TRACING_V2: ${LANGCHAIN_TRACING_V2} - LANGCHAIN_PROJECT: "opea-retriever-service" + TEI_EMBEDDING_ENDPOINT: http://tei-embedding-service:80 HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN} restart: unless-stopped tei-reranking-service: @@ -88,7 +87,7 @@ services: HF_TOKEN: ${HUGGINGFACEHUB_API_TOKEN} LLM_MODEL_ID: ${LLM_MODEL_ID} command: --model $LLM_MODEL_ID --host 0.0.0.0 --port 80 - chaqna-xeon-backend-server: + chatqna-xeon-backend-server: image: ${REGISTRY:-opea}/chatqna:${TAG:-latest} container_name: chatqna-xeon-backend-server depends_on: @@ -103,51 +102,49 @@ services: - no_proxy=${no_proxy} - https_proxy=${https_proxy} - http_proxy=${http_proxy} - - MEGA_SERVICE_HOST_IP=${MEGA_SERVICE_HOST_IP} - - EMBEDDING_SERVER_HOST_IP=${EMBEDDING_SERVER_HOST_IP} - - EMBEDDING_SERVER_PORT=${EMBEDDING_SERVER_PORT:-6006} - - RETRIEVER_SERVICE_HOST_IP=${RETRIEVER_SERVICE_HOST_IP} - - RERANK_SERVER_HOST_IP=${RERANK_SERVER_HOST_IP} - - RERANK_SERVER_PORT=${RERANK_SERVER_PORT:-8808} - - LLM_SERVER_HOST_IP=${LLM_SERVER_HOST_IP} - - LLM_SERVER_PORT=${LLM_SERVER_PORT:-9009} + - MEGA_SERVICE_HOST_IP=chatqna-xeon-backend-server + - EMBEDDING_SERVER_HOST_IP=tei-embedding-service + - EMBEDDING_SERVER_PORT=${EMBEDDING_SERVER_PORT:-80} + - RETRIEVER_SERVICE_HOST_IP=retriever + - RERANK_SERVER_HOST_IP=tei-reranking-service + - RERANK_SERVER_PORT=${RERANK_SERVER_PORT:-80} + - LLM_SERVER_HOST_IP=vllm_service + - LLM_SERVER_PORT=${LLM_SERVER_PORT:-80} - LOGFLAG=${LOGFLAG} ipc: host restart: always - chaqna-xeon-ui-server: + chatqna-xeon-ui-server: image: ${REGISTRY:-opea}/chatqna-ui:${TAG:-latest} container_name: chatqna-xeon-ui-server depends_on: - - chaqna-xeon-backend-server + - chatqna-xeon-backend-server ports: - "5173:5173" environment: - no_proxy=${no_proxy} - https_proxy=${https_proxy} - http_proxy=${http_proxy} - - CHAT_BASE_URL=${BACKEND_SERVICE_ENDPOINT} - - UPLOAD_FILE_BASE_URL=${DATAPREP_SERVICE_ENDPOINT} - - GET_FILE=${DATAPREP_GET_FILE_ENDPOINT} - - DELETE_FILE=${DATAPREP_DELETE_FILE_ENDPOINT} ipc: host restart: always - chaqna-xeon-nginx-server: + chatqna-xeon-nginx-server: image: ${REGISTRY:-opea}/nginx:${TAG:-latest} - container_name: chaqna-xeon-nginx-server + container_name: chatqna-xeon-nginx-server depends_on: - - chaqna-xeon-backend-server - - chaqna-xeon-ui-server + - chatqna-xeon-backend-server + - chatqna-xeon-ui-server ports: - "${NGINX_PORT:-80}:80" environment: - no_proxy=${no_proxy} - https_proxy=${https_proxy} - http_proxy=${http_proxy} - - FRONTEND_SERVICE_IP=${FRONTEND_SERVICE_IP} - - FRONTEND_SERVICE_PORT=${FRONTEND_SERVICE_PORT} - - BACKEND_SERVICE_NAME=${BACKEND_SERVICE_NAME} - - BACKEND_SERVICE_IP=${BACKEND_SERVICE_IP} - - BACKEND_SERVICE_PORT=${BACKEND_SERVICE_PORT} + - FRONTEND_SERVICE_IP=chatqna-xeon-ui-server + - FRONTEND_SERVICE_PORT=5173 + - BACKEND_SERVICE_NAME=chatqna + - BACKEND_SERVICE_IP=chatqna-xeon-backend-server + - BACKEND_SERVICE_PORT=8888 + - DATAPREP_SERVICE_IP=dataprep-redis-service + - DATAPREP_SERVICE_PORT=6007 ipc: host restart: always diff --git a/ChatQnA/docker_compose/intel/cpu/xeon/compose_without_rerank.yaml b/ChatQnA/docker_compose/intel/cpu/xeon/compose_without_rerank.yaml index 209b233fa..f8ed67c81 100644 --- a/ChatQnA/docker_compose/intel/cpu/xeon/compose_without_rerank.yaml +++ b/ChatQnA/docker_compose/intel/cpu/xeon/compose_without_rerank.yaml @@ -20,10 +20,10 @@ services: no_proxy: ${no_proxy} http_proxy: ${http_proxy} https_proxy: ${https_proxy} - REDIS_URL: ${REDIS_URL} - REDIS_HOST: ${REDIS_HOST} + REDIS_URL: redis://redis-vector-db:6379 + REDIS_HOST: redis-vector-db INDEX_NAME: ${INDEX_NAME} - TEI_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT} + TEI_ENDPOINT: http://tei-embedding-service:80 HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN} tei-embedding-service: image: ghcr.io/huggingface/text-embeddings-inference:cpu-1.5 @@ -50,9 +50,10 @@ services: no_proxy: ${no_proxy} http_proxy: ${http_proxy} https_proxy: ${https_proxy} - REDIS_URL: ${REDIS_URL} + REDIS_URL: redis://redis-vector-db:6379 + REDIS_HOST: redis-vector-db INDEX_NAME: ${INDEX_NAME} - TEI_EMBEDDING_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT} + TEI_EMBEDDING_ENDPOINT: http://tei-embedding-service:80 HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN} restart: unless-stopped tgi-service: @@ -71,7 +72,7 @@ services: HF_HUB_DISABLE_PROGRESS_BARS: 1 HF_HUB_ENABLE_HF_TRANSFER: 0 command: --model-id ${LLM_MODEL_ID} --cuda-graphs 0 - chaqna-xeon-backend-server: + chatqna-xeon-backend-server: image: ${REGISTRY:-opea}/chatqna-without-rerank:${TAG:-latest} container_name: chatqna-xeon-backend-server depends_on: @@ -86,49 +87,47 @@ services: - no_proxy=${no_proxy} - https_proxy=${https_proxy} - http_proxy=${http_proxy} - - MEGA_SERVICE_HOST_IP=${MEGA_SERVICE_HOST_IP} - - EMBEDDING_SERVER_HOST_IP=${EMBEDDING_SERVER_HOST_IP} - - EMBEDDING_SERVER_PORT=${EMBEDDING_SERVER_PORT:-6006} - - RETRIEVER_SERVICE_HOST_IP=${RETRIEVER_SERVICE_HOST_IP} - - LLM_SERVER_HOST_IP=${LLM_SERVER_HOST_IP} - - LLM_SERVER_PORT=${LLM_SERVER_PORT:-9009} + - MEGA_SERVICE_HOST_IP=chatqna-xeon-backend-server + - EMBEDDING_SERVER_HOST_IP=tei-embedding-service + - EMBEDDING_SERVER_PORT=${EMBEDDING_SERVER_PORT:-80} + - RETRIEVER_SERVICE_HOST_IP=retriever + - LLM_SERVER_HOST_IP=tgi-service + - LLM_SERVER_PORT=${LLM_SERVER_PORT:-80} - LOGFLAG=${LOGFLAG} ipc: host restart: always - chaqna-xeon-ui-server: + chatqna-xeon-ui-server: image: ${REGISTRY:-opea}/chatqna-ui:${TAG:-latest} container_name: chatqna-xeon-ui-server depends_on: - - chaqna-xeon-backend-server + - chatqna-xeon-backend-server ports: - "5173:5173" environment: - no_proxy=${no_proxy} - https_proxy=${https_proxy} - http_proxy=${http_proxy} - - CHAT_BASE_URL=${BACKEND_SERVICE_ENDPOINT} - - UPLOAD_FILE_BASE_URL=${DATAPREP_SERVICE_ENDPOINT} - - GET_FILE=${DATAPREP_GET_FILE_ENDPOINT} - - DELETE_FILE=${DATAPREP_DELETE_FILE_ENDPOINT} ipc: host restart: always - chaqna-xeon-nginx-server: + chatqna-xeon-nginx-server: image: ${REGISTRY:-opea}/nginx:${TAG:-latest} - container_name: chaqna-xeon-nginx-server + container_name: chatqna-xeon-nginx-server depends_on: - - chaqna-xeon-backend-server - - chaqna-xeon-ui-server + - chatqna-xeon-backend-server + - chatqna-xeon-ui-server ports: - "${NGINX_PORT:-80}:80" environment: - no_proxy=${no_proxy} - https_proxy=${https_proxy} - http_proxy=${http_proxy} - - FRONTEND_SERVICE_IP=${FRONTEND_SERVICE_IP} - - FRONTEND_SERVICE_PORT=${FRONTEND_SERVICE_PORT} - - BACKEND_SERVICE_NAME=${BACKEND_SERVICE_NAME} - - BACKEND_SERVICE_IP=${BACKEND_SERVICE_IP} - - BACKEND_SERVICE_PORT=${BACKEND_SERVICE_PORT} + - FRONTEND_SERVICE_IP=chatqna-xeon-ui-server + - FRONTEND_SERVICE_PORT=5173 + - BACKEND_SERVICE_NAME=chatqna + - BACKEND_SERVICE_IP=chatqna-xeon-backend-server + - BACKEND_SERVICE_PORT=8888 + - DATAPREP_SERVICE_IP=dataprep-redis-service + - DATAPREP_SERVICE_PORT=6007 ipc: host restart: always diff --git a/ChatQnA/docker_compose/intel/cpu/xeon/set_env.sh b/ChatQnA/docker_compose/intel/cpu/xeon/set_env.sh index 25c2971d5..2fda4f75f 100644 --- a/ChatQnA/docker_compose/intel/cpu/xeon/set_env.sh +++ b/ChatQnA/docker_compose/intel/cpu/xeon/set_env.sh @@ -7,21 +7,4 @@ export EMBEDDING_MODEL_ID="BAAI/bge-base-en-v1.5" export RERANK_MODEL_ID="BAAI/bge-reranker-base" export LLM_MODEL_ID="Intel/neural-chat-7b-v3-3" -export TEI_EMBEDDING_ENDPOINT="http://${host_ip}:6006" -export REDIS_URL="redis://${host_ip}:6379" export INDEX_NAME="rag-redis" -export REDIS_HOST=${host_ip} -export MEGA_SERVICE_HOST_IP=${host_ip} -export EMBEDDING_SERVER_HOST_IP=${host_ip} -export RETRIEVER_SERVICE_HOST_IP=${host_ip} -export RERANK_SERVER_HOST_IP=${host_ip} -export LLM_SERVER_HOST_IP=${host_ip} -export BACKEND_SERVICE_ENDPOINT="http://${host_ip}:8888/v1/chatqna" -export DATAPREP_SERVICE_ENDPOINT="http://${host_ip}:6007/v1/dataprep" -export DATAPREP_GET_FILE_ENDPOINT="http://${host_ip}:6007/v1/dataprep/get_file" -export DATAPREP_DELETE_FILE_ENDPOINT="http://${host_ip}:6007/v1/dataprep/delete_file" -export FRONTEND_SERVICE_IP=${host_ip} -export FRONTEND_SERVICE_PORT=5173 -export BACKEND_SERVICE_NAME=chatqna -export BACKEND_SERVICE_IP=${host_ip} -export BACKEND_SERVICE_PORT=8888 diff --git a/ChatQnA/docker_compose/intel/hpu/gaudi/README.md b/ChatQnA/docker_compose/intel/hpu/gaudi/README.md index 3b63a48c2..e78d5bbde 100644 --- a/ChatQnA/docker_compose/intel/hpu/gaudi/README.md +++ b/ChatQnA/docker_compose/intel/hpu/gaudi/README.md @@ -454,7 +454,7 @@ curl http://${host_ip}:9090/v1/guardrails\ To access the frontend, open the following URL in your browser: http://{host_ip}:5173. By default, the UI runs on port 5173 internally. If you prefer to use a different host port to access the frontend, you can modify the port mapping in the `compose.yaml` file as shown below: ```yaml - chaqna-gaudi-ui-server: + chatqna-gaudi-ui-server: image: opea/chatqna-ui:latest ... ports: @@ -467,10 +467,10 @@ If you want to launch the UI using Nginx, open this URL: `http://${host_ip}:${NG ## 🚀 Launch the Conversational UI (Optional) -To access the Conversational UI (react based) frontend, modify the UI service in the `compose.yaml` file. Replace `chaqna-gaudi-ui-server` service with the `chatqna-gaudi-conversation-ui-server` service as per the config below: +To access the Conversational UI (react based) frontend, modify the UI service in the `compose.yaml` file. Replace `chatqna-gaudi-ui-server` service with the `chatqna-gaudi-conversation-ui-server` service as per the config below: ```yaml -chaqna-gaudi-conversation-ui-server: +chatqna-gaudi-conversation-ui-server: image: opea/chatqna-conversation-ui:latest container_name: chatqna-gaudi-conversation-ui-server environment: @@ -479,7 +479,7 @@ chaqna-gaudi-conversation-ui-server: ports: - "5174:80" depends_on: - - chaqna-gaudi-backend-server + - chatqna-gaudi-backend-server ipc: host restart: always ``` @@ -487,7 +487,7 @@ chaqna-gaudi-conversation-ui-server: Once the services are up, open the following URL in your browser: http://{host_ip}:5174. By default, the UI runs on port 80 internally. If you prefer to use a different host port to access the frontend, you can modify the port mapping in the `compose.yaml` file as shown below: ```yaml - chaqna-gaudi-conversation-ui-server: + chatqna-gaudi-conversation-ui-server: image: opea/chatqna-conversation-ui:latest ... ports: diff --git a/ChatQnA/docker_compose/intel/hpu/gaudi/compose.yaml b/ChatQnA/docker_compose/intel/hpu/gaudi/compose.yaml index fcc621fe5..9036c2ccf 100644 --- a/ChatQnA/docker_compose/intel/hpu/gaudi/compose.yaml +++ b/ChatQnA/docker_compose/intel/hpu/gaudi/compose.yaml @@ -20,9 +20,10 @@ services: no_proxy: ${no_proxy} http_proxy: ${http_proxy} https_proxy: ${https_proxy} - REDIS_URL: ${REDIS_URL} + REDIS_URL: redis://redis-vector-db:6379 + REDIS_HOST: redis-vector-db INDEX_NAME: ${INDEX_NAME} - TEI_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT} + TEI_ENDPOINT: http://tei-embedding-service:80 HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN} tei-embedding-service: image: ghcr.io/huggingface/tei-gaudi:latest @@ -57,9 +58,11 @@ services: no_proxy: ${no_proxy} http_proxy: ${http_proxy} https_proxy: ${https_proxy} - REDIS_URL: ${REDIS_URL} + REDIS_URL: redis://redis-vector-db:6379 + REDIS_HOST: redis-vector-db INDEX_NAME: ${INDEX_NAME} - TEI_EMBEDDING_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT} + TEI_EMBEDDING_ENDPOINT: http://tei-embedding-service:80 + HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN} restart: unless-stopped tei-reranking-service: image: ghcr.io/huggingface/text-embeddings-inference:cpu-1.5 @@ -102,7 +105,7 @@ services: - SYS_NICE ipc: host command: --model-id ${LLM_MODEL_ID} --max-input-length 2048 --max-total-tokens 4096 - chaqna-gaudi-backend-server: + chatqna-gaudi-backend-server: image: ${REGISTRY:-opea}/chatqna:${TAG:-latest} container_name: chatqna-gaudi-backend-server depends_on: @@ -117,51 +120,49 @@ services: - no_proxy=${no_proxy} - https_proxy=${https_proxy} - http_proxy=${http_proxy} - - MEGA_SERVICE_HOST_IP=${MEGA_SERVICE_HOST_IP} - - EMBEDDING_SERVER_HOST_IP=${EMBEDDING_SERVER_HOST_IP} - - EMBEDDING_SERVER_PORT=${EMBEDDING_SERVER_PORT:-8090} - - RETRIEVER_SERVICE_HOST_IP=${RETRIEVER_SERVICE_HOST_IP} - - RERANK_SERVER_HOST_IP=${RERANK_SERVER_HOST_IP} - - RERANK_SERVER_PORT=${RERANK_SERVER_PORT:-8808} - - LLM_SERVER_HOST_IP=${LLM_SERVER_HOST_IP} - - LLM_SERVER_PORT=${LLM_SERVER_PORT:-8005} + - MEGA_SERVICE_HOST_IP=chatqna-gaudi-backend-server + - EMBEDDING_SERVER_HOST_IP=tei-embedding-service + - EMBEDDING_SERVER_PORT=${EMBEDDING_SERVER_PORT:-80} + - RETRIEVER_SERVICE_HOST_IP=retriever + - RERANK_SERVER_HOST_IP=tei-reranking-service + - RERANK_SERVER_PORT=${RERANK_SERVER_PORT:-80} + - LLM_SERVER_HOST_IP=tgi-service + - LLM_SERVER_PORT=${LLM_SERVER_PORT:-80} - LOGFLAG=${LOGFLAG} ipc: host restart: always - chaqna-gaudi-ui-server: + chatqna-gaudi-ui-server: image: ${REGISTRY:-opea}/chatqna-ui:${TAG:-latest} container_name: chatqna-gaudi-ui-server depends_on: - - chaqna-gaudi-backend-server + - chatqna-gaudi-backend-server ports: - "5173:5173" environment: - no_proxy=${no_proxy} - https_proxy=${https_proxy} - http_proxy=${http_proxy} - - CHAT_BASE_URL=${BACKEND_SERVICE_ENDPOINT} - - UPLOAD_FILE_BASE_URL=${DATAPREP_SERVICE_ENDPOINT} - - GET_FILE=${DATAPREP_GET_FILE_ENDPOINT} - - DELETE_FILE=${DATAPREP_DELETE_FILE_ENDPOINT} ipc: host restart: always - chaqna-gaudi-nginx-server: + chatqna-gaudi-nginx-server: image: ${REGISTRY:-opea}/nginx:${TAG:-latest} - container_name: chaqna-gaudi-nginx-server + container_name: chatqna-gaudi-nginx-server depends_on: - - chaqna-gaudi-backend-server - - chaqna-gaudi-ui-server + - chatqna-gaudi-backend-server + - chatqna-gaudi-ui-server ports: - "${NGINX_PORT:-80}:80" environment: - no_proxy=${no_proxy} - https_proxy=${https_proxy} - http_proxy=${http_proxy} - - FRONTEND_SERVICE_IP=${FRONTEND_SERVICE_IP} - - FRONTEND_SERVICE_PORT=${FRONTEND_SERVICE_PORT} - - BACKEND_SERVICE_NAME=${BACKEND_SERVICE_NAME} - - BACKEND_SERVICE_IP=${BACKEND_SERVICE_IP} - - BACKEND_SERVICE_PORT=${BACKEND_SERVICE_PORT} + - FRONTEND_SERVICE_IP=chatqna-gaudi-ui-server + - FRONTEND_SERVICE_PORT=5173 + - BACKEND_SERVICE_NAME=chatqna + - BACKEND_SERVICE_IP=chatqna-gaudi-backend-server + - BACKEND_SERVICE_PORT=8888 + - DATAPREP_SERVICE_IP=dataprep-redis-service + - DATAPREP_SERVICE_PORT=6007 ipc: host restart: always diff --git a/ChatQnA/docker_compose/intel/hpu/gaudi/compose_guardrails.yaml b/ChatQnA/docker_compose/intel/hpu/gaudi/compose_guardrails.yaml index db49c41a8..3edb7bba7 100644 --- a/ChatQnA/docker_compose/intel/hpu/gaudi/compose_guardrails.yaml +++ b/ChatQnA/docker_compose/intel/hpu/gaudi/compose_guardrails.yaml @@ -20,9 +20,10 @@ services: no_proxy: ${no_proxy} http_proxy: ${http_proxy} https_proxy: ${https_proxy} - REDIS_URL: ${REDIS_URL} + REDIS_URL: redis://redis-vector-db:6379 + REDIS_HOST: redis-vector-db INDEX_NAME: ${INDEX_NAME} - TEI_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT} + TEI_ENDPOINT: http://tei-embedding-service:80 HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN} tgi-guardrails-service: image: ghcr.io/huggingface/tgi-gaudi:2.0.5 @@ -59,8 +60,8 @@ services: no_proxy: ${no_proxy} http_proxy: ${http_proxy} https_proxy: ${https_proxy} - SAFETY_GUARD_MODEL_ID: ${SAFETY_GUARD_MODEL_ID} - SAFETY_GUARD_ENDPOINT: ${SAFETY_GUARD_ENDPOINT} + SAFETY_GUARD_MODEL_ID: ${GURADRAILS_MODEL_ID} + SAFETY_GUARD_ENDPOINT: http://tgi-guardrails-service:80 HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN} restart: unless-stopped tei-embedding-service: @@ -94,9 +95,11 @@ services: no_proxy: ${no_proxy} http_proxy: ${http_proxy} https_proxy: ${https_proxy} - REDIS_URL: ${REDIS_URL} + REDIS_URL: redis://redis-vector-db:6379 + REDIS_HOST: redis-vector-db INDEX_NAME: ${INDEX_NAME} - TEI_EMBEDDING_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT} + TEI_EMBEDDING_ENDPOINT: http://tei-embedding-service:80 + HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN} restart: unless-stopped tei-reranking-service: image: ghcr.io/huggingface/text-embeddings-inference:cpu-1.5 @@ -139,7 +142,7 @@ services: - SYS_NICE ipc: host command: --model-id ${LLM_MODEL_ID} --max-input-length 1024 --max-total-tokens 2048 - chaqna-gaudi-backend-server: + chatqna-gaudi-backend-server: image: ${REGISTRY:-opea}/chatqna-guardrails:${TAG:-latest} container_name: chatqna-gaudi-guardrails-server depends_on: @@ -156,53 +159,51 @@ services: - no_proxy=${no_proxy} - https_proxy=${https_proxy} - http_proxy=${http_proxy} - - MEGA_SERVICE_HOST_IP=${MEGA_SERVICE_HOST_IP} - - GUARDRAIL_SERVICE_HOST_IP=${GUARDRAIL_SERVICE_HOST_IP} + - MEGA_SERVICE_HOST_IP=chatqna-gaudi-backend-server + - GUARDRAIL_SERVICE_HOST_IP=guardrails - GUARDRAIL_SERVICE_PORT=${GUARDRAIL_SERVICE_PORT:-9090} - - EMBEDDING_SERVER_HOST_IP=${EMBEDDING_SERVER_HOST_IP} - - EMBEDDING_SERVER_PORT=${EMBEDDING_SERVER_PORT:-8090} - - RETRIEVER_SERVICE_HOST_IP=${RETRIEVER_SERVICE_HOST_IP} - - RERANK_SERVER_HOST_IP=${RERANK_SERVER_HOST_IP} - - RERANK_SERVER_PORT=${RERANK_SERVER_PORT:-8808} - - LLM_SERVER_HOST_IP=${LLM_SERVER_HOST_IP} - - LLM_SERVER_PORT=${LLM_SERVER_PORT:-8005} + - EMBEDDING_SERVER_HOST_IP=tei-embedding-service + - EMBEDDING_SERVER_PORT=${EMBEDDING_SERVER_PORT:-80} + - RETRIEVER_SERVICE_HOST_IP=retriever + - RERANK_SERVER_HOST_IP=tei-reranking-service + - RERANK_SERVER_PORT=${RERANK_SERVER_PORT:-80} + - LLM_SERVER_HOST_IP=tgi-service + - LLM_SERVER_PORT=${LLM_SERVER_PORT:-80} - LOGFLAG=${LOGFLAG} ipc: host restart: always - chaqna-gaudi-ui-server: + chatqna-gaudi-ui-server: image: ${REGISTRY:-opea}/chatqna-ui:${TAG:-latest} container_name: chatqna-gaudi-ui-server depends_on: - - chaqna-gaudi-backend-server + - chatqna-gaudi-backend-server ports: - "5173:5173" environment: - no_proxy=${no_proxy} - https_proxy=${https_proxy} - http_proxy=${http_proxy} - - CHAT_BASE_URL=${BACKEND_SERVICE_ENDPOINT} - - UPLOAD_FILE_BASE_URL=${DATAPREP_SERVICE_ENDPOINT} - - GET_FILE=${DATAPREP_GET_FILE_ENDPOINT} - - DELETE_FILE=${DATAPREP_DELETE_FILE_ENDPOINT} ipc: host restart: always - chaqna-gaudi-nginx-server: + chatqna-gaudi-nginx-server: image: ${REGISTRY:-opea}/nginx:${TAG:-latest} - container_name: chaqna-gaudi-nginx-server + container_name: chatqna-gaudi-nginx-server depends_on: - - chaqna-gaudi-backend-server - - chaqna-gaudi-ui-server + - chatqna-gaudi-backend-server + - chatqna-gaudi-ui-server ports: - "${NGINX_PORT:-80}:80" environment: - no_proxy=${no_proxy} - https_proxy=${https_proxy} - http_proxy=${http_proxy} - - FRONTEND_SERVICE_IP=${FRONTEND_SERVICE_IP} - - FRONTEND_SERVICE_PORT=${FRONTEND_SERVICE_PORT} - - BACKEND_SERVICE_NAME=${BACKEND_SERVICE_NAME} - - BACKEND_SERVICE_IP=${BACKEND_SERVICE_IP} - - BACKEND_SERVICE_PORT=${BACKEND_SERVICE_PORT} + - FRONTEND_SERVICE_IP=chatqna-gaudi-ui-server + - FRONTEND_SERVICE_PORT=5173 + - BACKEND_SERVICE_NAME=chatqna + - BACKEND_SERVICE_IP=chatqna-gaudi-backend-server + - BACKEND_SERVICE_PORT=8888 + - DATAPREP_SERVICE_IP=dataprep-redis-service + - DATAPREP_SERVICE_PORT=6007 ipc: host restart: always diff --git a/ChatQnA/docker_compose/intel/hpu/gaudi/compose_vllm.yaml b/ChatQnA/docker_compose/intel/hpu/gaudi/compose_vllm.yaml index 0ebf9541b..162527b10 100644 --- a/ChatQnA/docker_compose/intel/hpu/gaudi/compose_vllm.yaml +++ b/ChatQnA/docker_compose/intel/hpu/gaudi/compose_vllm.yaml @@ -20,9 +20,10 @@ services: no_proxy: ${no_proxy} http_proxy: ${http_proxy} https_proxy: ${https_proxy} - REDIS_URL: ${REDIS_URL} + REDIS_URL: redis://redis-vector-db:6379 + REDIS_HOST: redis-vector-db INDEX_NAME: ${INDEX_NAME} - TEI_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT} + TEI_ENDPOINT: http://tei-embedding-service:80 HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN} tei-embedding-service: image: ghcr.io/huggingface/tei-gaudi:latest @@ -42,7 +43,7 @@ services: HABANA_VISIBLE_DEVICES: all OMPI_MCA_btl_vader_single_copy_mechanism: none MAX_WARMUP_SEQUENCE_LENGTH: 512 - command: --model-id ${EMBEDDING_MODEL_ID} + command: --model-id ${EMBEDDING_MODEL_ID} --auto-truncate retriever: image: ${REGISTRY:-opea}/retriever-redis:${TAG:-latest} container_name: retriever-redis-server @@ -55,9 +56,11 @@ services: no_proxy: ${no_proxy} http_proxy: ${http_proxy} https_proxy: ${https_proxy} - REDIS_URL: ${REDIS_URL} + REDIS_URL: redis://redis-vector-db:6379 + REDIS_HOST: redis-vector-db INDEX_NAME: ${INDEX_NAME} - TEI_EMBEDDING_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT} + TEI_EMBEDDING_ENDPOINT: http://tei-embedding-service:80 + HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN} restart: unless-stopped tei-reranking-service: image: ghcr.io/huggingface/text-embeddings-inference:cpu-1.5 @@ -95,7 +98,7 @@ services: - SYS_NICE ipc: host command: /bin/bash -c "export VLLM_CPU_KVCACHE_SPACE=40 && python3 -m vllm.entrypoints.openai.api_server --enforce-eager --model $LLM_MODEL_ID --tensor-parallel-size 1 --host 0.0.0.0 --port 80 --block-size 128 --max-num-seqs 256 --max-seq_len-to-capture 2048" - chaqna-gaudi-backend-server: + chatqna-gaudi-backend-server: image: ${REGISTRY:-opea}/chatqna:${TAG:-latest} container_name: chatqna-gaudi-backend-server depends_on: @@ -110,51 +113,49 @@ services: - no_proxy=${no_proxy} - https_proxy=${https_proxy} - http_proxy=${http_proxy} - - MEGA_SERVICE_HOST_IP=${MEGA_SERVICE_HOST_IP} - - EMBEDDING_SERVER_HOST_IP=${EMBEDDING_SERVER_HOST_IP} - - EMBEDDING_SERVER_PORT=${EMBEDDING_SERVER_PORT:-8090} - - RETRIEVER_SERVICE_HOST_IP=${RETRIEVER_SERVICE_HOST_IP} - - RERANK_SERVER_HOST_IP=${RERANK_SERVER_HOST_IP} - - RERANK_SERVER_PORT=${RERANK_SERVER_PORT:-8808} - - LLM_SERVER_HOST_IP=${LLM_SERVER_HOST_IP} - - LLM_SERVER_PORT=${LLM_SERVER_PORT:-8007} + - MEGA_SERVICE_HOST_IP=chatqna-gaudi-backend-server + - EMBEDDING_SERVER_HOST_IP=tei-embedding-service + - EMBEDDING_SERVER_PORT=${EMBEDDING_SERVER_PORT:-80} + - RETRIEVER_SERVICE_HOST_IP=retriever + - RERANK_SERVER_HOST_IP=tei-reranking-service + - RERANK_SERVER_PORT=${RERANK_SERVER_PORT:-80} + - LLM_SERVER_HOST_IP=vllm-service + - LLM_SERVER_PORT=${LLM_SERVER_PORT:-80} - LOGFLAG=${LOGFLAG} ipc: host restart: always - chaqna-gaudi-ui-server: + chatqna-gaudi-ui-server: image: ${REGISTRY:-opea}/chatqna-ui:${TAG:-latest} container_name: chatqna-gaudi-ui-server depends_on: - - chaqna-gaudi-backend-server + - chatqna-gaudi-backend-server ports: - "5173:5173" environment: - no_proxy=${no_proxy} - https_proxy=${https_proxy} - http_proxy=${http_proxy} - - CHAT_BASE_URL=${BACKEND_SERVICE_ENDPOINT} - - UPLOAD_FILE_BASE_URL=${DATAPREP_SERVICE_ENDPOINT} - - GET_FILE=${DATAPREP_GET_FILE_ENDPOINT} - - DELETE_FILE=${DATAPREP_DELETE_FILE_ENDPOINT} ipc: host restart: always - chaqna-gaudi-nginx-server: + chatqna-gaudi-nginx-server: image: ${REGISTRY:-opea}/nginx:${TAG:-latest} - container_name: chaqna-gaudi-nginx-server + container_name: chatqna-gaudi-nginx-server depends_on: - - chaqna-gaudi-backend-server - - chaqna-gaudi-ui-server + - chatqna-gaudi-backend-server + - chatqna-gaudi-ui-server ports: - "${NGINX_PORT:-80}:80" environment: - no_proxy=${no_proxy} - https_proxy=${https_proxy} - http_proxy=${http_proxy} - - FRONTEND_SERVICE_IP=${FRONTEND_SERVICE_IP} - - FRONTEND_SERVICE_PORT=${FRONTEND_SERVICE_PORT} - - BACKEND_SERVICE_NAME=${BACKEND_SERVICE_NAME} - - BACKEND_SERVICE_IP=${BACKEND_SERVICE_IP} - - BACKEND_SERVICE_PORT=${BACKEND_SERVICE_PORT} + - FRONTEND_SERVICE_IP=chatqna-gaudi-ui-server + - FRONTEND_SERVICE_PORT=5173 + - BACKEND_SERVICE_NAME=chatqna + - BACKEND_SERVICE_IP=chatqna-gaudi-backend-server + - BACKEND_SERVICE_PORT=8888 + - DATAPREP_SERVICE_IP=dataprep-redis-service + - DATAPREP_SERVICE_PORT=6007 ipc: host restart: always diff --git a/ChatQnA/docker_compose/intel/hpu/gaudi/compose_vllm_ray.yaml b/ChatQnA/docker_compose/intel/hpu/gaudi/compose_vllm_ray.yaml index e80b05ec1..f8b9fc7e3 100644 --- a/ChatQnA/docker_compose/intel/hpu/gaudi/compose_vllm_ray.yaml +++ b/ChatQnA/docker_compose/intel/hpu/gaudi/compose_vllm_ray.yaml @@ -20,9 +20,10 @@ services: no_proxy: ${no_proxy} http_proxy: ${http_proxy} https_proxy: ${https_proxy} - REDIS_URL: ${REDIS_URL} + REDIS_URL: redis://redis-vector-db:6379 + REDIS_HOST: redis-vector-db INDEX_NAME: ${INDEX_NAME} - TEI_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT} + TEI_ENDPOINT: http://tei-embedding-service:80 HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN} tei-embedding-service: image: ghcr.io/huggingface/tei-gaudi:latest @@ -42,7 +43,7 @@ services: HABANA_VISIBLE_DEVICES: all OMPI_MCA_btl_vader_single_copy_mechanism: none MAX_WARMUP_SEQUENCE_LENGTH: 512 - command: --model-id ${EMBEDDING_MODEL_ID} + command: --model-id ${EMBEDDING_MODEL_ID} --auto-truncate retriever: image: ${REGISTRY:-opea}/retriever-redis:${TAG:-latest} container_name: retriever-redis-server @@ -55,9 +56,11 @@ services: no_proxy: ${no_proxy} http_proxy: ${http_proxy} https_proxy: ${https_proxy} - REDIS_URL: ${REDIS_URL} + REDIS_URL: redis://redis-vector-db:6379 + REDIS_HOST: redis-vector-db INDEX_NAME: ${INDEX_NAME} - TEI_EMBEDDING_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT} + TEI_EMBEDDING_ENDPOINT: http://tei-embedding-service:80 + HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN} restart: unless-stopped tei-reranking-service: image: ghcr.io/huggingface/text-embeddings-inference:cpu-1.5 @@ -95,7 +98,7 @@ services: - SYS_NICE ipc: host command: /bin/bash -c "ray start --head && python vllm_ray_openai.py --port_number 8000 --model_id_or_path $LLM_MODEL_ID --tensor_parallel_size 2 --enforce_eager True" - chaqna-gaudi-backend-server: + chatqna-gaudi-backend-server: image: ${REGISTRY:-opea}/chatqna:${TAG:-latest} container_name: chatqna-gaudi-backend-server depends_on: @@ -110,51 +113,49 @@ services: - no_proxy=${no_proxy} - https_proxy=${https_proxy} - http_proxy=${http_proxy} - - MEGA_SERVICE_HOST_IP=${MEGA_SERVICE_HOST_IP} - - EMBEDDING_SERVER_HOST_IP=${EMBEDDING_SERVER_HOST_IP} - - EMBEDDING_SERVER_PORT=${EMBEDDING_SERVER_PORT:-8090} - - RETRIEVER_SERVICE_HOST_IP=${RETRIEVER_SERVICE_HOST_IP} - - RERANK_SERVER_HOST_IP=${RERANK_SERVER_HOST_IP} - - RERANK_SERVER_PORT=${RERANK_SERVER_PORT:-8808} - - LLM_SERVER_HOST_IP=${LLM_SERVER_HOST_IP} - - LLM_SERVER_PORT=${LLM_SERVER_PORT:-8006} + - MEGA_SERVICE_HOST_IP=chatqna-gaudi-backend-server + - EMBEDDING_SERVER_HOST_IP=tei-embedding-service + - EMBEDDING_SERVER_PORT=${EMBEDDING_SERVER_PORT:-80} + - RETRIEVER_SERVICE_HOST_IP=retriever + - RERANK_SERVER_HOST_IP=tei-reranking-service + - RERANK_SERVER_PORT=${RERANK_SERVER_PORT:-80} + - LLM_SERVER_HOST_IP=vllm-ray-service + - LLM_SERVER_PORT=${LLM_SERVER_PORT:-8000} - LOGFLAG=${LOGFLAG} ipc: host restart: always - chaqna-gaudi-ui-server: + chatqna-gaudi-ui-server: image: ${REGISTRY:-opea}/chatqna-ui:${TAG:-latest} container_name: chatqna-gaudi-ui-server depends_on: - - chaqna-gaudi-backend-server + - chatqna-gaudi-backend-server ports: - "5173:5173" environment: - no_proxy=${no_proxy} - https_proxy=${https_proxy} - http_proxy=${http_proxy} - - CHAT_BASE_URL=${BACKEND_SERVICE_ENDPOINT} - - UPLOAD_FILE_BASE_URL=${DATAPREP_SERVICE_ENDPOINT} - - GET_FILE=${DATAPREP_GET_FILE_ENDPOINT} - - DELETE_FILE=${DATAPREP_DELETE_FILE_ENDPOINT} ipc: host restart: always - chaqna-gaudi-nginx-server: + chatqna-gaudi-nginx-server: image: ${REGISTRY:-opea}/nginx:${TAG:-latest} - container_name: chaqna-gaudi-nginx-server + container_name: chatqna-gaudi-nginx-server depends_on: - - chaqna-gaudi-backend-server - - chaqna-gaudi-ui-server + - chatqna-gaudi-backend-server + - chatqna-gaudi-ui-server ports: - "${NGINX_PORT:-80}:80" environment: - no_proxy=${no_proxy} - https_proxy=${https_proxy} - http_proxy=${http_proxy} - - FRONTEND_SERVICE_IP=${FRONTEND_SERVICE_IP} - - FRONTEND_SERVICE_PORT=${FRONTEND_SERVICE_PORT} - - BACKEND_SERVICE_NAME=${BACKEND_SERVICE_NAME} - - BACKEND_SERVICE_IP=${BACKEND_SERVICE_IP} - - BACKEND_SERVICE_PORT=${BACKEND_SERVICE_PORT} + - FRONTEND_SERVICE_IP=chatqna-gaudi-ui-server + - FRONTEND_SERVICE_PORT=5173 + - BACKEND_SERVICE_NAME=chatqna + - BACKEND_SERVICE_IP=chatqna-gaudi-backend-server + - BACKEND_SERVICE_PORT=8888 + - DATAPREP_SERVICE_IP=dataprep-redis-service + - DATAPREP_SERVICE_PORT=6007 ipc: host restart: always diff --git a/ChatQnA/docker_compose/intel/hpu/gaudi/compose_without_rerank.yaml b/ChatQnA/docker_compose/intel/hpu/gaudi/compose_without_rerank.yaml index 9d20468df..cf5a7c2ca 100644 --- a/ChatQnA/docker_compose/intel/hpu/gaudi/compose_without_rerank.yaml +++ b/ChatQnA/docker_compose/intel/hpu/gaudi/compose_without_rerank.yaml @@ -20,9 +20,10 @@ services: no_proxy: ${no_proxy} http_proxy: ${http_proxy} https_proxy: ${https_proxy} - REDIS_URL: ${REDIS_URL} + REDIS_URL: redis://redis-vector-db:6379 + REDIS_HOST: redis-vector-db INDEX_NAME: ${INDEX_NAME} - TEI_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT} + TEI_ENDPOINT: http://tei-embedding-service:80 HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN} tei-embedding-service: image: ghcr.io/huggingface/tei-gaudi:latest @@ -57,9 +58,11 @@ services: no_proxy: ${no_proxy} http_proxy: ${http_proxy} https_proxy: ${https_proxy} - REDIS_URL: ${REDIS_URL} + REDIS_URL: redis://redis-vector-db:6379 + REDIS_HOST: redis-vector-db INDEX_NAME: ${INDEX_NAME} - TEI_EMBEDDING_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT} + TEI_EMBEDDING_ENDPOINT: http://tei-embedding-service:80 + HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN} restart: unless-stopped tgi-service: image: ghcr.io/huggingface/tgi-gaudi:2.0.5 @@ -86,7 +89,7 @@ services: - SYS_NICE ipc: host command: --model-id ${LLM_MODEL_ID} --max-input-length 1024 --max-total-tokens 2048 - chaqna-gaudi-backend-server: + chatqna-gaudi-backend-server: image: ${REGISTRY:-opea}/chatqna-without-rerank:${TAG:-latest} container_name: chatqna-gaudi-backend-server depends_on: @@ -100,49 +103,47 @@ services: - no_proxy=${no_proxy} - https_proxy=${https_proxy} - http_proxy=${http_proxy} - - MEGA_SERVICE_HOST_IP=${MEGA_SERVICE_HOST_IP} - - EMBEDDING_SERVER_HOST_IP=${EMBEDDING_SERVER_HOST_IP} - - EMBEDDING_SERVER_PORT=${EMBEDDING_SERVER_PORT:-8090} - - RETRIEVER_SERVICE_HOST_IP=${RETRIEVER_SERVICE_HOST_IP} - - LLM_SERVER_HOST_IP=${LLM_SERVER_HOST_IP} - - LLM_SERVER_PORT=${LLM_SERVER_PORT:-8005} + - MEGA_SERVICE_HOST_IP=chatqna-gaudi-backend-server + - EMBEDDING_SERVER_HOST_IP=tei-embedding-service + - EMBEDDING_SERVER_PORT=${EMBEDDING_SERVER_PORT:-80} + - RETRIEVER_SERVICE_HOST_IP=retriever + - LLM_SERVER_HOST_IP=tgi-service + - LLM_SERVER_PORT=${LLM_SERVER_PORT:-80} - LOGFLAG=${LOGFLAG} ipc: host restart: always - chaqna-gaudi-ui-server: + chatqna-gaudi-ui-server: image: ${REGISTRY:-opea}/chatqna-ui:${TAG:-latest} container_name: chatqna-gaudi-ui-server depends_on: - - chaqna-gaudi-backend-server + - chatqna-gaudi-backend-server ports: - "5173:5173" environment: - no_proxy=${no_proxy} - https_proxy=${https_proxy} - http_proxy=${http_proxy} - - CHAT_BASE_URL=${BACKEND_SERVICE_ENDPOINT} - - UPLOAD_FILE_BASE_URL=${DATAPREP_SERVICE_ENDPOINT} - - GET_FILE=${DATAPREP_GET_FILE_ENDPOINT} - - DELETE_FILE=${DATAPREP_DELETE_FILE_ENDPOINT} ipc: host restart: always - chaqna-gaudi-nginx-server: + chatqna-gaudi-nginx-server: image: ${REGISTRY:-opea}/nginx:${TAG:-latest} - container_name: chaqna-gaudi-nginx-server + container_name: chatqna-gaudi-nginx-server depends_on: - - chaqna-gaudi-backend-server - - chaqna-gaudi-ui-server + - chatqna-gaudi-backend-server + - chatqna-gaudi-ui-server ports: - "${NGINX_PORT:-80}:80" environment: - no_proxy=${no_proxy} - https_proxy=${https_proxy} - http_proxy=${http_proxy} - - FRONTEND_SERVICE_IP=${FRONTEND_SERVICE_IP} - - FRONTEND_SERVICE_PORT=${FRONTEND_SERVICE_PORT} - - BACKEND_SERVICE_NAME=${BACKEND_SERVICE_NAME} - - BACKEND_SERVICE_IP=${BACKEND_SERVICE_IP} - - BACKEND_SERVICE_PORT=${BACKEND_SERVICE_PORT} + - FRONTEND_SERVICE_IP=chatqna-gaudi-ui-server + - FRONTEND_SERVICE_PORT=5173 + - BACKEND_SERVICE_NAME=chatqna + - BACKEND_SERVICE_IP=chatqna-gaudi-backend-server + - BACKEND_SERVICE_PORT=8888 + - DATAPREP_SERVICE_IP=dataprep-redis-service + - DATAPREP_SERVICE_PORT=6007 ipc: host restart: always diff --git a/ChatQnA/docker_compose/intel/hpu/gaudi/set_env.sh b/ChatQnA/docker_compose/intel/hpu/gaudi/set_env.sh index 1612f88f4..2fda4f75f 100644 --- a/ChatQnA/docker_compose/intel/hpu/gaudi/set_env.sh +++ b/ChatQnA/docker_compose/intel/hpu/gaudi/set_env.sh @@ -7,20 +7,4 @@ export EMBEDDING_MODEL_ID="BAAI/bge-base-en-v1.5" export RERANK_MODEL_ID="BAAI/bge-reranker-base" export LLM_MODEL_ID="Intel/neural-chat-7b-v3-3" -export TEI_EMBEDDING_ENDPOINT="http://${host_ip}:8090" -export REDIS_URL="redis://${host_ip}:6379" export INDEX_NAME="rag-redis" -export MEGA_SERVICE_HOST_IP=${host_ip} -export EMBEDDING_SERVER_HOST_IP=${host_ip} -export RETRIEVER_SERVICE_HOST_IP=${host_ip} -export RERANK_SERVER_HOST_IP=${host_ip} -export LLM_SERVER_HOST_IP=${host_ip} -export BACKEND_SERVICE_ENDPOINT="http://${host_ip}:8888/v1/chatqna" -export DATAPREP_SERVICE_ENDPOINT="http://${host_ip}:6007/v1/dataprep" -export DATAPREP_GET_FILE_ENDPOINT="http://${host_ip}:6007/v1/dataprep/get_file" -export DATAPREP_DELETE_FILE_ENDPOINT="http://${host_ip}:6007/v1/dataprep/delete_file" -export FRONTEND_SERVICE_IP=${host_ip} -export FRONTEND_SERVICE_PORT=5173 -export BACKEND_SERVICE_NAME=chatqna -export BACKEND_SERVICE_IP=${host_ip} -export BACKEND_SERVICE_PORT=8888 diff --git a/ChatQnA/tests/test_compose_guardrails_on_gaudi.sh b/ChatQnA/tests/test_compose_guardrails_on_gaudi.sh index 1878cdfa0..fcc3f8041 100644 --- a/ChatQnA/tests/test_compose_guardrails_on_gaudi.sh +++ b/ChatQnA/tests/test_compose_guardrails_on_gaudi.sh @@ -34,27 +34,9 @@ function start_services() { export EMBEDDING_MODEL_ID="BAAI/bge-base-en-v1.5" export RERANK_MODEL_ID="BAAI/bge-reranker-base" export LLM_MODEL_ID="Intel/neural-chat-7b-v3-3" - export TEI_EMBEDDING_ENDPOINT="http://${ip_address}:8090" - export REDIS_URL="redis://${ip_address}:6379" export INDEX_NAME="rag-redis" export HUGGINGFACEHUB_API_TOKEN=${HUGGINGFACEHUB_API_TOKEN} - export MEGA_SERVICE_HOST_IP=${ip_address} - export EMBEDDING_SERVER_HOST_IP=${ip_address} - export RETRIEVER_SERVICE_HOST_IP=${ip_address} - export RERANK_SERVER_HOST_IP=${ip_address} - export LLM_SERVER_HOST_IP=${ip_address} - export GUARDRAIL_SERVICE_HOST_IP=${ip_address} - export EMBEDDING_SERVER_PORT=8090 - export RERANK_SERVER_PORT=8808 - export LLM_SERVER_PORT=8008 - export GUARDRAIL_SERVICE_PORT=9090 - export BACKEND_SERVICE_ENDPOINT="http://${ip_address}:8888/v1/chatqna" - export DATAPREP_SERVICE_ENDPOINT="http://${ip_address}:6007/v1/dataprep" export GURADRAILS_MODEL_ID="meta-llama/Meta-Llama-Guard-2-8B" - export SAFETY_GUARD_MODEL_ID="meta-llama/Meta-Llama-Guard-2-8B" - export SAFETY_GUARD_ENDPOINT="http://${ip_address}:8088" - - sed -i "s/backend_address/$ip_address/g" $WORKPATH/ui/svelte/.env # Start Docker Containers docker compose -f compose_guardrails.yaml up -d > ${LOG_PATH}/start_services_with_compose.log diff --git a/ChatQnA/tests/test_compose_on_gaudi.sh b/ChatQnA/tests/test_compose_on_gaudi.sh index ac2e9b68d..1d5b8bc8a 100644 --- a/ChatQnA/tests/test_compose_on_gaudi.sh +++ b/ChatQnA/tests/test_compose_on_gaudi.sh @@ -34,27 +34,8 @@ function start_services() { export EMBEDDING_MODEL_ID="BAAI/bge-base-en-v1.5" export RERANK_MODEL_ID="BAAI/bge-reranker-base" export LLM_MODEL_ID="meta-llama/Meta-Llama-3-8B-Instruct" - export TEI_EMBEDDING_ENDPOINT="http://${ip_address}:8090" - export TEI_RERANKING_ENDPOINT="http://${ip_address}:8808" - export TGI_LLM_ENDPOINT="http://${ip_address}:8005" - export REDIS_URL="redis://${ip_address}:6379" - export REDIS_HOST=${ip_address} export INDEX_NAME="rag-redis" export HUGGINGFACEHUB_API_TOKEN=${HUGGINGFACEHUB_API_TOKEN} - export MEGA_SERVICE_HOST_IP=${ip_address} - export EMBEDDING_SERVER_HOST_IP=${ip_address} - export RETRIEVER_SERVICE_HOST_IP=${ip_address} - export RERANK_SERVER_HOST_IP=${ip_address} - export LLM_SERVER_HOST_IP=${ip_address} - export EMBEDDING_SERVER_PORT=8090 - export RERANK_SERVER_PORT=8808 - export LLM_SERVER_PORT=8005 - export BACKEND_SERVICE_ENDPOINT="http://${ip_address}:8888/v1/chatqna" - export DATAPREP_SERVICE_ENDPOINT="http://${ip_address}:6007/v1/dataprep" - export DATAPREP_GET_FILE_ENDPOINT="http://${ip_address}:6008/v1/dataprep/get_file" - export DATAPREP_DELETE_FILE_ENDPOINT="http://${ip_address}:6009/v1/dataprep/delete_file" - - sed -i "s/backend_address/$ip_address/g" $WORKPATH/ui/svelte/.env # Start Docker Containers docker compose -f compose.yaml up -d > ${LOG_PATH}/start_services_with_compose.log diff --git a/ChatQnA/tests/test_compose_on_xeon.sh b/ChatQnA/tests/test_compose_on_xeon.sh index 7a1a598af..d4b37e3f1 100644 --- a/ChatQnA/tests/test_compose_on_xeon.sh +++ b/ChatQnA/tests/test_compose_on_xeon.sh @@ -34,25 +34,8 @@ function start_services() { export EMBEDDING_MODEL_ID="BAAI/bge-base-en-v1.5" export RERANK_MODEL_ID="BAAI/bge-reranker-base" export LLM_MODEL_ID="meta-llama/Meta-Llama-3-8B-Instruct" - export TEI_EMBEDDING_ENDPOINT="http://${ip_address}:6006" - export REDIS_URL="redis://${ip_address}:6379" - export REDIS_HOST=${ip_address} export INDEX_NAME="rag-redis" export HUGGINGFACEHUB_API_TOKEN=${HUGGINGFACEHUB_API_TOKEN} - export MEGA_SERVICE_HOST_IP=${ip_address} - export EMBEDDING_SERVER_HOST_IP=${ip_address} - export RETRIEVER_SERVICE_HOST_IP=${ip_address} - export RERANK_SERVER_HOST_IP=${ip_address} - export LLM_SERVER_HOST_IP=${ip_address} - export EMBEDDING_SERVER_PORT=6006 - export RERANK_SERVER_PORT=8808 - export LLM_SERVER_PORT=9009 - export BACKEND_SERVICE_ENDPOINT="http://${ip_address}:8888/v1/chatqna" - export DATAPREP_SERVICE_ENDPOINT="http://${ip_address}:6007/v1/dataprep" - export DATAPREP_GET_FILE_ENDPOINT="http://${ip_address}:6007/v1/dataprep/get_file" - export DATAPREP_DELETE_FILE_ENDPOINT="http://${ip_address}:6007/v1/dataprep/delete_file" - - sed -i "s/backend_address/$ip_address/g" $WORKPATH/ui/svelte/.env # Start Docker Containers docker compose -f compose.yaml up -d > ${LOG_PATH}/start_services_with_compose.log diff --git a/ChatQnA/tests/test_compose_qdrant_on_xeon.sh b/ChatQnA/tests/test_compose_qdrant_on_xeon.sh index bb099ef61..79108ddd4 100644 --- a/ChatQnA/tests/test_compose_qdrant_on_xeon.sh +++ b/ChatQnA/tests/test_compose_qdrant_on_xeon.sh @@ -31,23 +31,8 @@ function start_services() { export EMBEDDING_MODEL_ID="BAAI/bge-base-en-v1.5" export RERANK_MODEL_ID="BAAI/bge-reranker-base" export LLM_MODEL_ID="Intel/neural-chat-7b-v3-3" - export TEI_EMBEDDING_ENDPOINT="http://${ip_address}:6040" - export QDRANT_HOST=${ip_address} - export QDRANT_PORT=6333 export INDEX_NAME="rag-qdrant" export HUGGINGFACEHUB_API_TOKEN=${HUGGINGFACEHUB_API_TOKEN} - export MEGA_SERVICE_HOST_IP=${ip_address} - export EMBEDDING_SERVER_HOST_IP=${ip_address} - export RETRIEVER_SERVICE_HOST_IP=${ip_address} - export RERANK_SERVER_HOST_IP=${ip_address} - export LLM_SERVER_HOST_IP=${ip_address} - export MEGA_SERVICE_PORT=8912 - export EMBEDDING_SERVER_PORT=6040 - export RETRIEVER_SERVICE_PORT=6045 - export RERANK_SERVER_PORT=6041 - export LLM_SERVER_PORT=6042 - export BACKEND_SERVICE_ENDPOINT="http://${ip_address}:8912/v1/chatqna" - export DATAPREP_SERVICE_ENDPOINT="http://${ip_address}:6043/v1/dataprep" sed -i "s/backend_address/$ip_address/g" $WORKPATH/ui/svelte/.env diff --git a/ChatQnA/tests/test_compose_vllm_on_gaudi.sh b/ChatQnA/tests/test_compose_vllm_on_gaudi.sh index f53b93dc2..de6cd50ed 100644 --- a/ChatQnA/tests/test_compose_vllm_on_gaudi.sh +++ b/ChatQnA/tests/test_compose_vllm_on_gaudi.sh @@ -32,22 +32,8 @@ function start_services() { export EMBEDDING_MODEL_ID="BAAI/bge-base-en-v1.5" export RERANK_MODEL_ID="BAAI/bge-reranker-base" export LLM_MODEL_ID="Intel/neural-chat-7b-v3-3" - export TEI_EMBEDDING_ENDPOINT="http://${ip_address}:8090" - export REDIS_URL="redis://${ip_address}:6379" export INDEX_NAME="rag-redis" export HUGGINGFACEHUB_API_TOKEN=${HUGGINGFACEHUB_API_TOKEN} - export MEGA_SERVICE_HOST_IP=${ip_address} - export EMBEDDING_SERVER_HOST_IP=${ip_address} - export RETRIEVER_SERVICE_HOST_IP=${ip_address} - export RERANK_SERVER_HOST_IP=${ip_address} - export LLM_SERVER_HOST_IP=${ip_address} - export EMBEDDING_SERVER_PORT=8090 - export RERANK_SERVER_PORT=8808 - export LLM_SERVER_PORT=8007 - export BACKEND_SERVICE_ENDPOINT="http://${ip_address}:8888/v1/chatqna" - export DATAPREP_SERVICE_ENDPOINT="http://${ip_address}:6007/v1/dataprep" - - sed -i "s/backend_address/$ip_address/g" $WORKPATH/ui/svelte/.env # Start Docker Containers docker compose -f compose_vllm.yaml up -d > ${LOG_PATH}/start_services_with_compose.log diff --git a/ChatQnA/tests/test_compose_vllm_on_xeon.sh b/ChatQnA/tests/test_compose_vllm_on_xeon.sh index 5d6167f4b..b664a6af8 100644 --- a/ChatQnA/tests/test_compose_vllm_on_xeon.sh +++ b/ChatQnA/tests/test_compose_vllm_on_xeon.sh @@ -35,22 +35,8 @@ function start_services() { export EMBEDDING_MODEL_ID="BAAI/bge-base-en-v1.5" export RERANK_MODEL_ID="BAAI/bge-reranker-base" export LLM_MODEL_ID="Intel/neural-chat-7b-v3-3" - export TEI_EMBEDDING_ENDPOINT="http://${ip_address}:6006" - export REDIS_URL="redis://${ip_address}:6379" export INDEX_NAME="rag-redis" export HUGGINGFACEHUB_API_TOKEN=${HUGGINGFACEHUB_API_TOKEN} - export MEGA_SERVICE_HOST_IP=${ip_address} - export EMBEDDING_SERVER_HOST_IP=${ip_address} - export RETRIEVER_SERVICE_HOST_IP=${ip_address} - export RERANK_SERVER_HOST_IP=${ip_address} - export LLM_SERVER_HOST_IP=${ip_address} - export EMBEDDING_SERVER_PORT=6006 - export RERANK_SERVER_PORT=8808 - export LLM_SERVER_PORT=9009 - export BACKEND_SERVICE_ENDPOINT="http://${ip_address}:8888/v1/chatqna" - export DATAPREP_SERVICE_ENDPOINT="http://${ip_address}:6007/v1/dataprep" - - sed -i "s/backend_address/$ip_address/g" $WORKPATH/ui/svelte/.env # Start Docker Containers docker compose -f compose_vllm.yaml up -d > ${LOG_PATH}/start_services_with_compose.log @@ -192,7 +178,7 @@ function main() { elif [ "${mode}" == "" ]; then validate_microservices validate_megaservice - #validate_frontend + # validate_frontend fi stop_docker diff --git a/ChatQnA/tests/test_compose_vllm_ray_on_gaudi.sh b/ChatQnA/tests/test_compose_vllm_ray_on_gaudi.sh index cf2b8a1e2..d7d1dbe6b 100644 --- a/ChatQnA/tests/test_compose_vllm_ray_on_gaudi.sh +++ b/ChatQnA/tests/test_compose_vllm_ray_on_gaudi.sh @@ -33,22 +33,8 @@ function start_services() { export EMBEDDING_MODEL_ID="BAAI/bge-base-en-v1.5" export RERANK_MODEL_ID="BAAI/bge-reranker-base" export LLM_MODEL_ID="Intel/neural-chat-7b-v3-3" - export TEI_EMBEDDING_ENDPOINT="http://${ip_address}:8090" - export REDIS_URL="redis://${ip_address}:6379" export INDEX_NAME="rag-redis" export HUGGINGFACEHUB_API_TOKEN=${HUGGINGFACEHUB_API_TOKEN} - export MEGA_SERVICE_HOST_IP=${ip_address} - export EMBEDDING_SERVER_HOST_IP=${ip_address} - export RETRIEVER_SERVICE_HOST_IP=${ip_address} - export RERANK_SERVER_HOST_IP=${ip_address} - export LLM_SERVER_HOST_IP=${ip_address} - export EMBEDDING_SERVER_PORT=8090 - export RERANK_SERVER_PORT=8808 - export LLM_SERVER_PORT=8006 - export BACKEND_SERVICE_ENDPOINT="http://${ip_address}:8888/v1/chatqna" - export DATAPREP_SERVICE_ENDPOINT="http://${ip_address}:6007/v1/dataprep" - - sed -i "s/backend_address/$ip_address/g" $WORKPATH/ui/svelte/.env # Start Docker Containers docker compose -f compose_vllm_ray.yaml up -d > ${LOG_PATH}/start_services_with_compose.log diff --git a/ChatQnA/tests/test_compose_without_rerank_on_gaudi.sh b/ChatQnA/tests/test_compose_without_rerank_on_gaudi.sh index a60e6ca62..22c5e8c94 100644 --- a/ChatQnA/tests/test_compose_without_rerank_on_gaudi.sh +++ b/ChatQnA/tests/test_compose_without_rerank_on_gaudi.sh @@ -33,23 +33,8 @@ function start_services() { cd $WORKPATH/docker_compose/intel/hpu/gaudi export EMBEDDING_MODEL_ID="BAAI/bge-base-en-v1.5" export LLM_MODEL_ID="Intel/neural-chat-7b-v3-3" - export TEI_EMBEDDING_ENDPOINT="http://${ip_address}:8090" - export REDIS_URL="redis://${ip_address}:6379" - export REDIS_HOST=${ip_address} export INDEX_NAME="rag-redis" export HUGGINGFACEHUB_API_TOKEN=${HUGGINGFACEHUB_API_TOKEN} - export MEGA_SERVICE_HOST_IP=${ip_address} - export EMBEDDING_SERVER_HOST_IP=${ip_address} - export RETRIEVER_SERVICE_HOST_IP=${ip_address} - export LLM_SERVER_HOST_IP=${ip_address} - export EMBEDDING_SERVER_PORT=8090 - export LLM_SERVER_PORT=8005 - export BACKEND_SERVICE_ENDPOINT="http://${ip_address}:8888/v1/chatqna" - export DATAPREP_SERVICE_ENDPOINT="http://${ip_address}:6007/v1/dataprep" - export DATAPREP_GET_FILE_ENDPOINT="http://${ip_address}:6008/v1/dataprep/get_file" - export DATAPREP_DELETE_FILE_ENDPOINT="http://${ip_address}:6009/v1/dataprep/delete_file" - - sed -i "s/backend_address/$ip_address/g" $WORKPATH/ui/svelte/.env # Start Docker Containers docker compose -f compose_without_rerank.yaml up -d > ${LOG_PATH}/start_services_with_compose.log diff --git a/ChatQnA/tests/test_compose_without_rerank_on_xeon.sh b/ChatQnA/tests/test_compose_without_rerank_on_xeon.sh index 55b9f7f1a..b0ffc22bc 100644 --- a/ChatQnA/tests/test_compose_without_rerank_on_xeon.sh +++ b/ChatQnA/tests/test_compose_without_rerank_on_xeon.sh @@ -33,23 +33,8 @@ function start_services() { export EMBEDDING_MODEL_ID="BAAI/bge-base-en-v1.5" export LLM_MODEL_ID="Intel/neural-chat-7b-v3-3" - export TEI_EMBEDDING_ENDPOINT="http://${ip_address}:6006" - export REDIS_URL="redis://${ip_address}:6379" - export REDIS_HOST=${ip_address} export INDEX_NAME="rag-redis" export HUGGINGFACEHUB_API_TOKEN=${HUGGINGFACEHUB_API_TOKEN} - export MEGA_SERVICE_HOST_IP=${ip_address} - export EMBEDDING_SERVER_HOST_IP=${ip_address} - export RETRIEVER_SERVICE_HOST_IP=${ip_address} - export LLM_SERVER_HOST_IP=${ip_address} - export EMBEDDING_SERVER_PORT=6006 - export LLM_SERVER_PORT=9009 - export BACKEND_SERVICE_ENDPOINT="http://${ip_address}:8888/v1/chatqna" - export DATAPREP_SERVICE_ENDPOINT="http://${ip_address}:6007/v1/dataprep" - export DATAPREP_GET_FILE_ENDPOINT="http://${ip_address}:6007/v1/dataprep/get_file" - export DATAPREP_DELETE_FILE_ENDPOINT="http://${ip_address}:6007/v1/dataprep/delete_file" - - sed -i "s/backend_address/$ip_address/g" $WORKPATH/ui/svelte/.env # Start Docker Containers docker compose -f compose_without_rerank.yaml up -d > ${LOG_PATH}/start_services_with_compose.log diff --git a/ChatQnA/ui/svelte/playwright.config.ts b/ChatQnA/ui/svelte/playwright.config.ts index bbeb13bcf..937f88bf7 100644 --- a/ChatQnA/ui/svelte/playwright.config.ts +++ b/ChatQnA/ui/svelte/playwright.config.ts @@ -38,7 +38,7 @@ export default defineConfig({ /* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */ actionTimeout: 0, /* Base URL to use in actions like `await page.goto('/')`. */ - baseURL: "http://localhost:5173", + baseURL: "http://localhost:80", /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ trace: "on-first-retry",