diff --git a/DocIndexRetriever/docker_compose/intel/cpu/xeon/set_env.sh b/DocIndexRetriever/docker_compose/intel/cpu/xeon/set_env.sh index e4f5c207b..ca8818e06 100644 --- a/DocIndexRetriever/docker_compose/intel/cpu/xeon/set_env.sh +++ b/DocIndexRetriever/docker_compose/intel/cpu/xeon/set_env.sh @@ -5,3 +5,25 @@ pushd "../../../../../" > /dev/null source .set_env.sh popd > /dev/null + +ip_address=$(hostname -I | awk '{print $1}') +export EMBEDDING_MODEL_ID="BAAI/bge-base-en-v1.5" +export RERANK_MODEL_ID="BAAI/bge-reranker-base" +export TEI_EMBEDDING_ENDPOINT="http://${ip_address}:6006" +export TEI_RERANKING_ENDPOINT="http://${ip_address}:8808" +export TGI_LLM_ENDPOINT="http://${ip_address}:8008" +export HUGGINGFACEHUB_API_TOKEN=${HUGGINGFACEHUB_API_TOKEN} +export MEGA_SERVICE_HOST_IP=${ip_address} +export EMBEDDING_SERVICE_HOST_IP=${ip_address} +export RETRIEVER_SERVICE_HOST_IP=${ip_address} +export RERANK_SERVICE_HOST_IP=${ip_address} +export LLM_SERVICE_HOST_IP=${ip_address} +export host_ip=${ip_address} +export RERANK_TYPE="tei" +export LOGFLAG=true + +export REDIS_URL="redis://${ip_address}:6379" +export INDEX_NAME="rag-redis" + +export MILVUS_HOST=${ip_address} +export DATAPREP_SERVICE_ENDPOINT="http://${host_ip}:6007/v1/dataprep/ingest" diff --git a/DocIndexRetriever/docker_compose/intel/hpu/gaudi/set_env.sh b/DocIndexRetriever/docker_compose/intel/hpu/gaudi/set_env.sh index e4f5c207b..0c2b818df 100644 --- a/DocIndexRetriever/docker_compose/intel/hpu/gaudi/set_env.sh +++ b/DocIndexRetriever/docker_compose/intel/hpu/gaudi/set_env.sh @@ -5,3 +5,26 @@ pushd "../../../../../" > /dev/null source .set_env.sh popd > /dev/null + +ip_address=$(hostname -I | awk '{print $1}') +export EMBEDDING_MODEL_ID="BAAI/bge-base-en-v1.5" +export RERANK_MODEL_ID="BAAI/bge-reranker-base" +export TEI_EMBEDDING_ENDPOINT="http://${ip_address}:8090" +export TEI_RERANKING_ENDPOINT="http://${ip_address}:8808" +export HUGGINGFACEHUB_API_TOKEN=${HUGGINGFACEHUB_API_TOKEN} +export MEGA_SERVICE_HOST_IP=${ip_address} +export EMBEDDING_SERVICE_HOST_IP=${ip_address} +export RETRIEVER_SERVICE_HOST_IP=${ip_address} +export RERANK_SERVICE_HOST_IP=${ip_address} +export host_ip=${ip_address} +export RERANK_TYPE="tei" +export LOGFLAG=true + +export REDIS_URL="redis://${ip_address}:6379" +export INDEX_NAME="rag-redis" + + +export TGI_LLM_ENDPOINT="http://${ip_address}:8008" +export MILVUS_HOST=${ip_address} +export LLM_SERVICE_HOST_IP=${ip_address} +export DATAPREP_SERVICE_ENDPOINT="http://${host_ip}:6007/v1/dataprep/ingest" diff --git a/DocIndexRetriever/tests/README.md b/DocIndexRetriever/tests/README.md new file mode 100644 index 000000000..be057c423 --- /dev/null +++ b/DocIndexRetriever/tests/README.md @@ -0,0 +1,33 @@ +# DocIndexRetriever E2E test scripts + +## Set the required environment variable + +```bash +export HUGGINGFACEHUB_API_TOKEN="Your_Huggingface_API_Token" +``` + +## Run test + +On Intel Xeon with TGI: + +```bash +bash test_compose_on_xeon.sh +``` + +On Intel Gaudi with TGI: + +```bash +bash test_compose_on_gaudi.sh +``` + +On AMD ROCm with TGI: + +```bash +bash test_compose_on_rocm.sh +``` + +On AMD ROCm with vLLM: + +```bash +bash test_compose_vllm_on_rocm.sh +``` diff --git a/DocIndexRetriever/tests/test_compose_milvus_on_gaudi.sh b/DocIndexRetriever/tests/test_compose_milvus_on_gaudi.sh index 40633be8f..e0fc2b01e 100644 --- a/DocIndexRetriever/tests/test_compose_milvus_on_gaudi.sh +++ b/DocIndexRetriever/tests/test_compose_milvus_on_gaudi.sh @@ -36,22 +36,7 @@ function build_docker_images() { function start_services() { echo "Starting Docker Services...." cd $WORKPATH/docker_compose/intel/hpu/gaudi - export EMBEDDING_MODEL_ID="BAAI/bge-base-en-v1.5" - export RERANK_MODEL_ID="BAAI/bge-reranker-base" - export TEI_EMBEDDING_ENDPOINT="http://${ip_address}:8090" - export TEI_RERANKING_ENDPOINT="http://${ip_address}:8808" - export TGI_LLM_ENDPOINT="http://${ip_address}:8008" - export MILVUS_HOST=${ip_address} - export HUGGINGFACEHUB_API_TOKEN=${HUGGINGFACEHUB_API_TOKEN} - export MEGA_SERVICE_HOST_IP=${ip_address} - export EMBEDDING_SERVICE_HOST_IP=${ip_address} - export RETRIEVER_SERVICE_HOST_IP=${ip_address} - export RERANK_SERVICE_HOST_IP=${ip_address} - export LLM_SERVICE_HOST_IP=${ip_address} - export host_ip=${ip_address} - export DATAPREP_SERVICE_ENDPOINT="http://${host_ip}:6007/v1/dataprep/ingest" - export RERANK_TYPE="tei" - export LOGFLAG=true + source ./set_env.sh # Start Docker Containers docker compose -f compose_milvus.yaml up -d diff --git a/DocIndexRetriever/tests/test_compose_milvus_on_xeon.sh b/DocIndexRetriever/tests/test_compose_milvus_on_xeon.sh index 59b1c40aa..f8942173c 100755 --- a/DocIndexRetriever/tests/test_compose_milvus_on_xeon.sh +++ b/DocIndexRetriever/tests/test_compose_milvus_on_xeon.sh @@ -35,22 +35,7 @@ function build_docker_images() { function start_services() { echo "Starting Docker Services...." cd $WORKPATH/docker_compose/intel/cpu/xeon - export EMBEDDING_MODEL_ID="BAAI/bge-base-en-v1.5" - export RERANK_MODEL_ID="BAAI/bge-reranker-base" - export TEI_EMBEDDING_ENDPOINT="http://${ip_address}:6006" - export TEI_RERANKING_ENDPOINT="http://${ip_address}:8808" - export TGI_LLM_ENDPOINT="http://${ip_address}:8008" - export MILVUS_HOST=${ip_address} - export HUGGINGFACEHUB_API_TOKEN=${HUGGINGFACEHUB_API_TOKEN} - export MEGA_SERVICE_HOST_IP=${ip_address} - export EMBEDDING_SERVICE_HOST_IP=${ip_address} - export RETRIEVER_SERVICE_HOST_IP=${ip_address} - export RERANK_SERVICE_HOST_IP=${ip_address} - export LLM_SERVICE_HOST_IP=${ip_address} - export host_ip=${ip_address} - export DATAPREP_SERVICE_ENDPOINT="http://${host_ip}:6007/v1/dataprep/ingest" - export RERANK_TYPE="tei" - export LOGFLAG=true + source ./set_env.sh # Start Docker Containers docker compose -f compose_milvus.yaml up -d diff --git a/DocIndexRetriever/tests/test_compose_on_gaudi.sh b/DocIndexRetriever/tests/test_compose_on_gaudi.sh index 4b9de5a2d..596fbd8f4 100644 --- a/DocIndexRetriever/tests/test_compose_on_gaudi.sh +++ b/DocIndexRetriever/tests/test_compose_on_gaudi.sh @@ -34,20 +34,7 @@ function build_docker_images() { function start_services() { echo "Starting Docker Services...." cd $WORKPATH/docker_compose/intel/hpu/gaudi - export EMBEDDING_MODEL_ID="BAAI/bge-base-en-v1.5" - export RERANK_MODEL_ID="BAAI/bge-reranker-base" - export TEI_EMBEDDING_ENDPOINT="http://${ip_address}:8090" - export TEI_RERANKING_ENDPOINT="http://${ip_address}:8808" - 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_SERVICE_HOST_IP=${ip_address} - export RETRIEVER_SERVICE_HOST_IP=${ip_address} - export RERANK_SERVICE_HOST_IP=${ip_address} - export host_ip=${ip_address} - export RERANK_TYPE="tei" - export LOGFLAG=true + source ./set_env.sh # Start Docker Containers docker compose up -d diff --git a/DocIndexRetriever/tests/test_compose_on_xeon.sh b/DocIndexRetriever/tests/test_compose_on_xeon.sh index 467411653..aab0cb4c6 100644 --- a/DocIndexRetriever/tests/test_compose_on_xeon.sh +++ b/DocIndexRetriever/tests/test_compose_on_xeon.sh @@ -34,22 +34,7 @@ function build_docker_images() { function start_services() { echo "Starting Docker Services...." cd $WORKPATH/docker_compose/intel/cpu/xeon - export EMBEDDING_MODEL_ID="BAAI/bge-base-en-v1.5" - export RERANK_MODEL_ID="BAAI/bge-reranker-base" - export TEI_EMBEDDING_ENDPOINT="http://${ip_address}:6006" - export TEI_RERANKING_ENDPOINT="http://${ip_address}:8808" - export TGI_LLM_ENDPOINT="http://${ip_address}:8008" - 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_SERVICE_HOST_IP=${ip_address} - export RETRIEVER_SERVICE_HOST_IP=${ip_address} - export RERANK_SERVICE_HOST_IP=${ip_address} - export LLM_SERVICE_HOST_IP=${ip_address} - export host_ip=${ip_address} - export RERANK_TYPE="tei" - export LOGFLAG=true + source ./set_env.sh # Start Docker Containers docker compose up -d