Skip to content

Commit

Permalink
update audioqna image name (opea-project#408)
Browse files Browse the repository at this point in the history
Signed-off-by: chensuyue <[email protected]>
  • Loading branch information
chensuyue authored Jul 17, 2024
1 parent 9551594 commit 615f0d2
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 50 deletions.
8 changes: 4 additions & 4 deletions AudioQnA/docker/gaudi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ cd GenAIComps
### 2. Build ASR Image

```bash
docker build -t opea/whisper:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/asr/whisper/Dockerfile_hpu .
docker build -t opea/whisper-gaudi:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/asr/whisper/Dockerfile_hpu .


docker build -t opea/asr:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/asr/Dockerfile .
Expand All @@ -29,7 +29,7 @@ docker build --no-cache -t opea/llm-tgi:latest --build-arg https_proxy=$https_pr
### 4. Build TTS Image

```bash
docker build -t opea/speecht5:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/tts/speecht5/Dockerfile_hpu .
docker build -t opea/speecht5-gaudi:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/tts/speecht5/Dockerfile_hpu .

docker build -t opea/tts:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/tts/Dockerfile .
```
Expand All @@ -46,10 +46,10 @@ docker build --no-cache -t opea/audioqna:latest --build-arg https_proxy=$https_p

Then run the command `docker images`, you will have following images ready:

1. `opea/whisper:latest`
1. `opea/whisper-gaudi:latest`
2. `opea/asr:latest`
3. `opea/llm-tgi:latest`
4. `opea/speecht5:latest`
4. `opea/speecht5-gaudi:latest`
5. `opea/tts:latest`
6. `opea/audioqna:latest`

Expand Down
4 changes: 2 additions & 2 deletions AudioQnA/docker/gaudi/docker_compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ version: "3.8"

services:
whisper-service:
image: opea/whisper:latest
image: opea/whisper-gaudi:latest
container_name: whisper-service
ports:
- "7066:7066"
Expand All @@ -30,7 +30,7 @@ services:
environment:
ASR_ENDPOINT: ${ASR_ENDPOINT}
speecht5-service:
image: opea/speecht5:latest
image: opea/speecht5-gaudi:latest
container_name: speecht5-service
ports:
- "7055:7055"
Expand Down
47 changes: 23 additions & 24 deletions AudioQnA/tests/test_audioqna_on_gaudi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# SPDX-License-Identifier: Apache-2.0

set -e
echo "IMAGE_REPO=${IMAGE_REPO}"

WORKPATH=$(dirname "$PWD")
LOG_PATH="$WORKPATH/tests"
Expand All @@ -13,11 +14,11 @@ function build_docker_images() {
git clone https://github.com/opea-project/GenAIComps.git
cd GenAIComps

docker build -t opea/whisper:latest -f comps/asr/whisper/Dockerfile_hpu .
docker build -t opea/whisper-gaudi:latest -f comps/asr/whisper/Dockerfile_hpu .

docker build -t opea/asr:latest -f comps/asr/Dockerfile .
docker build -t opea/llm-tgi:latest -f comps/llms/text-generation/tgi/Dockerfile .
docker build -t opea/speecht5:latest -f comps/tts/speecht5/Dockerfile_hpu .
docker build -t opea/speecht5-gaudi:latest -f comps/tts/speecht5/Dockerfile_hpu .
docker build -t opea/tts:latest -f comps/tts/Dockerfile .

docker pull ghcr.io/huggingface/tgi-gaudi:2.0.1
Expand Down Expand Up @@ -54,23 +55,27 @@ function start_services() {

# sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env

# Replace the container name with a test-specific name
# echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
# sed -i "s#image: opea/chatqna:latest#image: opea/chatqna:${IMAGE_TAG}#g" docker_compose.yaml
# sed -i "s#image: opea/chatqna-ui:latest#image: opea/chatqna-ui:${IMAGE_TAG}#g" docker_compose.yaml
# sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" docker_compose.yaml
if [[ "$IMAGE_REPO" != "" ]]; then
# Replace the container name with a test-specific name
echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
sed -i "s#image: opea/audioqna:latest#image: opea/audioqna:${IMAGE_TAG}#g" docker_compose.yaml
sed -i "s#image: opea/audioqna-ui:latest#image: opea/audioqna-ui:${IMAGE_TAG}#g" docker_compose.yaml
sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" docker_compose.yaml
echo "cat docker_compose.yaml"
cat docker_compose.yaml
fi

# Start Docker Containers
docker compose -f docker_compose.yaml up -d
# n=0
# until [[ "$n" -ge 200 ]]; do
# docker logs tgi-gaudi-server > tgi_service_start.log
# if grep -q Connected tgi_service_start.log; then
# break
# fi
# sleep 1s
# n=$((n+1))
# done
sleep 8m
n=0
until [[ "$n" -ge 500 ]]; do
docker logs tgi-gaudi-server > $LOG_PATH/tgi_service_start.log
if grep -q Connected $LOG_PATH/tgi_service_start.log; then
break
fi
sleep 1s
n=$((n+1))
done
}


Expand Down Expand Up @@ -130,14 +135,8 @@ function stop_docker() {
function main() {

stop_docker
# begin_time=$(date +%s)
build_docker_images
# start_time=$(date +%s)
if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
start_services
# end_time=$(date +%s)
# minimal_duration=$((end_time-start_time))
# maximal_duration=$((end_time-begin_time))
# echo "Mega service start duration is "$maximal_duration"s"

# validate_microservices
validate_megaservice
Expand Down
41 changes: 21 additions & 20 deletions AudioQnA/tests/test_audioqna_on_xeon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# SPDX-License-Identifier: Apache-2.0

set -e
echo "IMAGE_REPO=${IMAGE_REPO}"

WORKPATH=$(dirname "$PWD")
LOG_PATH="$WORKPATH/tests"
Expand Down Expand Up @@ -50,23 +51,27 @@ function start_services() {

# sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env

# Replace the container name with a test-specific name
# echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
# sed -i "s#image: opea/chatqna:latest#image: opea/chatqna:${IMAGE_TAG}#g" docker_compose.yaml
# sed -i "s#image: opea/chatqna-ui:latest#image: opea/chatqna-ui:${IMAGE_TAG}#g" docker_compose.yaml
# sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" docker_compose.yaml
if [[ "$IMAGE_REPO" != "" ]]; then
# Replace the container name with a test-specific name
echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
sed -i "s#image: opea/audioqna:latest#image: opea/audioqna:${IMAGE_TAG}#g" docker_compose.yaml
sed -i "s#image: opea/audioqna-ui:latest#image: opea/audioqna-ui:${IMAGE_TAG}#g" docker_compose.yaml
sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" docker_compose.yaml
echo "cat docker_compose.yaml"
cat docker_compose.yaml
fi

# Start Docker Containers
docker compose -f docker_compose.yaml up -d
sleep 3m
# n=0
# until [[ "$n" -ge 200 ]]; do
# docker logs tgi-service > tgi_service_start.log
# if grep -q Connected tgi_service_start.log; then
# break
# fi
# sleep 1s
# n=$((n+1))
# done
n=0
until [[ "$n" -ge 200 ]]; do
docker logs tgi-service > $LOG_PATH/tgi_service_start.log
if grep -q Connected $LOG_PATH/tgi_service_start.log; then
break
fi
sleep 1s
n=$((n+1))
done
}


Expand Down Expand Up @@ -118,12 +123,8 @@ function stop_docker() {
function main() {

stop_docker
build_docker_images
# begin_time=$(date +%s)
if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
start_services
# end_time=$(date +%s)
# maximal_duration=$((end_time-begin_time))
# echo "Mega service start duration is "$maximal_duration"s" && sleep 1s

validate_megaservice
# validate_frontend
Expand Down

0 comments on commit 615f0d2

Please sign in to comment.