Skip to content

Commit ed918bc

Browse files
authored
Integrate EdgeCraftRAG set_env to ut scripts and add README.md for UT scripts. (opea-project#1963)
Signed-off-by: ZePan110 <[email protected]>
1 parent 1c0b173 commit ed918bc

File tree

4 files changed

+33
-19
lines changed

4 files changed

+33
-19
lines changed

EdgeCraftRAG/docker_compose/intel/gpu/arc/set_env.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,13 @@
55
pushd "../../../../../" > /dev/null
66
source .set_env.sh
77
popd > /dev/null
8+
9+
export MODEL_PATH=${MODEL_PATH}
10+
export DOC_PATH=${DOC_PATH}
11+
export UI_TMPFILE_PATH=${UI_TMPFILE_PATH}
12+
export HOST_IP=${HOST_IP}
13+
export LLM_MODEL=${LLM_MODEL}
14+
export HF_ENDPOINT=${HF_ENDPOINT}
15+
export vLLM_ENDPOINT=${vLLM_ENDPOINT}
16+
export HUGGINGFACEHUB_API_TOKEN=${HUGGINGFACEHUB_API_TOKEN}
17+
export no_proxy="localhost, 127.0.0.1, 192.168.1.1"

EdgeCraftRAG/tests/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# EdgeCraftRAG E2E test scripts
2+
3+
## Set the required environment variable
4+
5+
```bash
6+
export HUGGINGFACEHUB_API_TOKEN="Your_Huggingface_API_Token"
7+
```
8+
9+
## Run test
10+
11+
On Intel ARC with TGI:
12+
13+
```bash
14+
bash test_compose_on_arc.sh
15+
```
16+
17+
On Intel ARC with vLLM:
18+
19+
```bash
20+
bash test_compose_vllm_on_arc.sh
21+
```

EdgeCraftRAG/tests/test_compose_on_arc.sh

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,10 @@ function build_docker_images() {
4646
}
4747

4848
function start_services() {
49-
export MODEL_PATH=${MODEL_PATH}
50-
export DOC_PATH=${DOC_PATH}
5149
export UI_UPLOAD_PATH=${UI_UPLOAD_PATH}
52-
export HOST_IP=${HOST_IP}
53-
export LLM_MODEL=${LLM_MODEL}
54-
export HF_ENDPOINT=${HF_ENDPOINT}
55-
export vLLM_ENDPOINT=${vLLM_ENDPOINT}
56-
export HUGGINGFACEHUB_API_TOKEN=${HUGGINGFACEHUB_API_TOKEN}
57-
export no_proxy="localhost, 127.0.0.1, 192.168.1.1"
5850

5951
cd $WORKPATH/docker_compose/intel/gpu/arc
60-
52+
source set_env.sh
6153
# Start Docker Containers
6254
docker compose -f $COMPOSE_FILE up -d > ${LOG_PATH}/start_services_with_compose.log
6355
sleep 20

EdgeCraftRAG/tests/test_compose_vllm_on_arc.sh

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,8 @@ function build_docker_images() {
5353
}
5454

5555
function start_services() {
56-
export MODEL_PATH=${MODEL_PATH}
57-
export DOC_PATH=${DOC_PATH}
58-
export UI_TMPFILE_PATH=${UI_TMPFILE_PATH}
59-
export HOST_IP=${HOST_IP}
60-
export LLM_MODEL=${LLM_MODEL}
61-
export HF_ENDPOINT=${HF_ENDPOINT}
62-
export vLLM_ENDPOINT=${vLLM_ENDPOINT}
63-
export HUGGINGFACEHUB_API_TOKEN=${HUGGINGFACEHUB_API_TOKEN}
64-
export no_proxy="localhost, 127.0.0.1, 192.168.1.1"
65-
6656
cd $WORKPATH/docker_compose/intel/gpu/arc
57+
source set_env.sh
6758

6859
# Start Docker Containers
6960
docker compose -f $COMPOSE_FILE up -d > ${LOG_PATH}/start_services_with_compose.log

0 commit comments

Comments
 (0)