Skip to content

Commit ea6aacb

Browse files
letonghanchensuyue
andauthored
Refine Configurable Ports in DocSum (#1978)
Signed-off-by: letonghan <[email protected]> Co-authored-by: chen, suyue <[email protected]>
1 parent bed9d6b commit ea6aacb

File tree

8 files changed

+28
-11
lines changed

8 files changed

+28
-11
lines changed

DocSum/docker_compose/intel/cpu/xeon/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ cd GenAIExamples/DocSum/docker_compose
3131
source intel/set_env.sh
3232
```
3333

34-
NOTE: by default vLLM does "warmup" at start, to optimize its performance for the specified model and the underlying platform, which can take long time. For development (and e.g. autoscaling) it can be skipped with `export VLLM_SKIP_WARMUP=true`.
34+
> NOTE: by default vLLM does "warmup" at start, to optimize its performance for the specified model and the underlying platform, which can take long time. For development (and e.g. autoscaling) it can be skipped with `export VLLM_SKIP_WARMUP=true`.
35+
36+
> NOTE: If any port on your local machine is occupied (like `9000/8008/8888`, etc.), modify it in `set_env.sh`, then run `source set_env.sh` again.
3537
3638
Checkout a released version, such as v1.3:
3739

DocSum/docker_compose/intel/cpu/xeon/compose.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ services:
66
image: ${REGISTRY:-opea}/vllm:${TAG:-latest}
77
container_name: docsum-xeon-vllm-service
88
ports:
9-
- "8008:80"
9+
- ${LLM_ENDPOINT_PORT:-8008}:80
1010
volumes:
1111
- "${MODEL_CACHE:-./data}:/root/.cache/huggingface/hub"
1212
shm_size: 1g
@@ -52,7 +52,7 @@ services:
5252
image: ${REGISTRY:-opea}/whisper:${TAG:-latest}
5353
container_name: docsum-xeon-whisper-server
5454
ports:
55-
- "7066:7066"
55+
- ${ASR_SERVICE_PORT:-7066}:7066
5656
ipc: host
5757
environment:
5858
no_proxy: ${no_proxy}
@@ -74,7 +74,9 @@ services:
7474
- http_proxy=${http_proxy}
7575
- MEGA_SERVICE_HOST_IP=${MEGA_SERVICE_HOST_IP}
7676
- LLM_SERVICE_HOST_IP=${LLM_SERVICE_HOST_IP}
77+
- LLM_SERVICE_PORT=${LLM_PORT}
7778
- ASR_SERVICE_HOST_IP=${ASR_SERVICE_HOST_IP}
79+
- ASR_SERVICE_PORT=${ASR_SERVICE_PORT}
7880
ipc: host
7981
restart: always
8082

DocSum/docker_compose/intel/cpu/xeon/compose_tgi.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ services:
5151
image: ${REGISTRY:-opea}/whisper:${TAG:-latest}
5252
container_name: docsum-xeon-whisper-server
5353
ports:
54-
- "7066:7066"
54+
- ${ASR_SERVICE_PORT:-7066}:7066
5555
ipc: host
5656
environment:
5757
no_proxy: ${no_proxy}
@@ -73,7 +73,9 @@ services:
7373
- http_proxy=${http_proxy}
7474
- MEGA_SERVICE_HOST_IP=${MEGA_SERVICE_HOST_IP}
7575
- LLM_SERVICE_HOST_IP=${LLM_SERVICE_HOST_IP}
76+
- LLM_SERVICE_PORT=${LLM_PORT}
7677
- ASR_SERVICE_HOST_IP=${ASR_SERVICE_HOST_IP}
78+
- ASR_SERVICE_PORT=${ASR_SERVICE_PORT}
7779
ipc: host
7880
restart: always
7981

DocSum/docker_compose/intel/hpu/gaudi/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ cd GenAIExamples/DocSum/docker_compose
3333
source intel/set_env.sh
3434
```
3535

36-
NOTE: by default vLLM does "warmup" at start, to optimize its performance for the specified model and the underlying platform, which can take long time. For development (and e.g. autoscaling) it can be skipped with `export VLLM_SKIP_WARMUP=true`.
36+
> NOTE: by default vLLM does "warmup" at start, to optimize its performance for the specified model and the underlying platform, which can take long time. For development (and e.g. autoscaling) it can be skipped with `export VLLM_SKIP_WARMUP=true`.
37+
38+
> NOTE: If any port on your local machine is occupied (like `9000/8008/8888`, etc.), modify it in `set_env.sh`, then run `source set_env.sh` again.
3739
3840
Checkout a released version, such as v1.3:
3941

DocSum/docker_compose/intel/hpu/gaudi/compose.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ services:
66
image: ${REGISTRY:-opea}/vllm-gaudi:${TAG:-latest}
77
container_name: docsum-gaudi-vllm-service
88
ports:
9-
- "8008:80"
9+
- ${LLM_ENDPOINT_PORT:-8008}:80
1010
volumes:
1111
- "${MODEL_CACHE:-./data}:/root/.cache/huggingface/hub"
1212
environment:
@@ -58,7 +58,7 @@ services:
5858
image: ${REGISTRY:-opea}/whisper:${TAG:-latest}
5959
container_name: docsum-gaudi-whisper-server
6060
ports:
61-
- "7066:7066"
61+
- ${ASR_SERVICE_PORT:-7066}:7066
6262
ipc: host
6363
environment:
6464
no_proxy: ${no_proxy}
@@ -85,8 +85,9 @@ services:
8585
- http_proxy=${http_proxy}
8686
- MEGA_SERVICE_HOST_IP=${MEGA_SERVICE_HOST_IP}
8787
- LLM_SERVICE_HOST_IP=${LLM_SERVICE_HOST_IP}
88+
- LLM_SERVICE_PORT=${LLM_PORT}
8889
- ASR_SERVICE_HOST_IP=${ASR_SERVICE_HOST_IP}
89-
90+
- ASR_SERVICE_PORT=${ASR_SERVICE_PORT}
9091
ipc: host
9192
restart: always
9293

DocSum/docker_compose/intel/hpu/gaudi/compose_tgi.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ services:
6262
image: ${REGISTRY:-opea}/whisper:${TAG:-latest}
6363
container_name: docsum-gaudi-whisper-server
6464
ports:
65-
- "7066:7066"
65+
- ${ASR_SERVICE_PORT:-7066}:7066
6666
ipc: host
6767
environment:
6868
no_proxy: ${no_proxy}
@@ -89,8 +89,9 @@ services:
8989
- http_proxy=${http_proxy}
9090
- MEGA_SERVICE_HOST_IP=${MEGA_SERVICE_HOST_IP}
9191
- LLM_SERVICE_HOST_IP=${LLM_SERVICE_HOST_IP}
92+
- LLM_SERVICE_PORT=${LLM_PORT}
9293
- ASR_SERVICE_HOST_IP=${ASR_SERVICE_HOST_IP}
93-
94+
- ASR_SERVICE_PORT=${ASR_SERVICE_PORT}
9495
ipc: host
9596
restart: always
9697

DocSum/docker_compose/intel/set_env.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export MAX_TOTAL_TOKENS=2048
2424

2525
export LLM_PORT=9000
2626
export LLM_ENDPOINT="http://${host_ip}:${LLM_ENDPOINT_PORT}"
27+
export ASR_SERVICE_PORT=7066
2728
export DocSum_COMPONENT_NAME="OpeaDocSumvLLM" # OpeaDocSumTgi
2829
export FRONTEND_SERVICE_PORT=5173
2930
export MEGA_SERVICE_HOST_IP=${host_ip}

DocSum/tests/test_compose_on_gaudi.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ export MAX_SEQ_LEN_TO_CAPTURE=2048
2727
export MAX_INPUT_TOKENS=2048
2828
export MAX_TOTAL_TOKENS=4096
2929

30+
# set service host and no_proxy
31+
export LLM_ENDPOINT="http://vllm-service:80"
32+
export LLM_SERVICE_HOST_IP="llm-docsum-vllm"
33+
export ASR_SERVICE_HOST_IP="whisper"
34+
export no_proxy=$no_proxy,$LLM_SERVICE_HOST_IP,$ASR_SERVICE_HOST_IP,"vllm-service"
35+
3036
# Get the root folder of the current script
3137
ROOT_FOLDER=$(dirname "$(readlink -f "$0")")
3238

@@ -54,7 +60,7 @@ function build_docker_images() {
5460
function start_services() {
5561
cd $WORKPATH/docker_compose/intel/hpu/gaudi
5662
docker compose -f compose.yaml up -d > ${LOG_PATH}/start_services_with_compose.log
57-
sleep 1m
63+
sleep 2m
5864
}
5965

6066
get_base64_str() {

0 commit comments

Comments
 (0)