diff --git a/.github/workflows/reuse-image-build.yml b/.github/workflows/reuse-image-build.yml index 316fc7124..e2ed6883b 100644 --- a/.github/workflows/reuse-image-build.yml +++ b/.github/workflows/reuse-image-build.yml @@ -27,5 +27,6 @@ jobs: id: build-microservice-image env: micro_service: ${{ inputs.micro_service }} + hardware: ${{ matrix.node }} run: | - bash .github/workflows/scripts/docker_images_build_push.sh ${micro_service} + bash .github/workflows/scripts/docker_images_build_push.sh ${micro_service} ${hardware} diff --git a/.github/workflows/scripts/docker_images_build_push.sh b/.github/workflows/scripts/docker_images_build_push.sh index 9c888fbde..2a9506b1f 100644 --- a/.github/workflows/scripts/docker_images_build_push.sh +++ b/.github/workflows/scripts/docker_images_build_push.sh @@ -13,10 +13,15 @@ function docker_build() { IMAGE_NAME=$1 micro_service=$2 dockerfile_path=${WORKSPACE}/comps/${micro_service} - if [ -f "$dockerfile_path/Dockerfile" ]; then - DOCKERFILE_PATH="$dockerfile_path/Dockerfile" - elif [ -f "$dockerfile_path/docker/Dockerfile" ]; then - DOCKERFILE_PATH="$dockerfile_path/docker/Dockerfile" + if [[ "$IMAGE_NAME" == *"gaudi" ]]; then + dockerfile_name="Dockerfile_hpu" + else + dockerfile_name="Dockerfile" + fi + if [ -f "$dockerfile_path/$dockerfile_name" ]; then + DOCKERFILE_PATH="$dockerfile_path/$dockerfile_name" + elif [ -f "$dockerfile_path/docker/$dockerfile_name" ]; then + DOCKERFILE_PATH="$dockerfile_path/docker/$dockerfile_name" else echo "Dockerfile not found" exit 1 @@ -29,6 +34,7 @@ function docker_build() { } micro_service=$1 +hardware=$(echo $2 | cut -d- -f3) case ${micro_service} in "asr"|"tts") IMAGE_NAME="opea/${micro_service}" @@ -55,10 +61,10 @@ case ${micro_service} in IMAGE_NAME="opea/web-retriever-chroma" ;; "tts/speecht5") - IMAGE_NAME="opea/speecht5" + if [ "${hardware}" == "gaudi" ]; then IMAGE_NAME="opea/speecht5-gaudi"; else IMAGE_NAME="opea/speecht5"; fi ;; "asr/whisper") - IMAGE_NAME="opea/whisper" + if [ "${hardware}" == "gaudi" ]; then IMAGE_NAME="opea/whisper-gaudi"; else IMAGE_NAME="opea/whisper"; fi ;; *) echo "Not supported yet" diff --git a/comps/asr/README.md b/comps/asr/README.md index c1dacb261..4cf78cbf1 100644 --- a/comps/asr/README.md +++ b/comps/asr/README.md @@ -73,7 +73,7 @@ docker build -t opea/whisper:latest --build-arg https_proxy=$https_proxy --build ```bash cd ../.. -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 . ``` ### 2.1.2 ASR Service Image @@ -95,7 +95,7 @@ docker run -p 7066:7066 --ipc=host -e http_proxy=$http_proxy -e https_proxy=$htt - Gaudi2 HPU ```bash -docker run -p 7066:7066 --runtime=habana -e HABANA_VISIBLE_DEVICES=all -e OMPI_MCA_btl_vader_single_copy_mechanism=none --cap-add=sys_nice --ipc=host -e http_proxy=$http_proxy -e https_proxy=$https_proxy opea/whisper:latest +docker run -p 7066:7066 --runtime=habana -e HABANA_VISIBLE_DEVICES=all -e OMPI_MCA_btl_vader_single_copy_mechanism=none --cap-add=sys_nice --ipc=host -e http_proxy=$http_proxy -e https_proxy=$https_proxy opea/whisper-gaudi:latest ``` ### 2.2.2 Start ASR service diff --git a/comps/tts/README.md b/comps/tts/README.md index a26e72200..52ab6c92b 100644 --- a/comps/tts/README.md +++ b/comps/tts/README.md @@ -49,7 +49,7 @@ docker build -t opea/speecht5:latest --build-arg https_proxy=$https_proxy --buil ```bash cd ../.. -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 . ``` ### 2.1.2 TTS Service Image @@ -71,7 +71,7 @@ docker run -p 7055:7055 --ipc=host -e http_proxy=$http_proxy -e https_proxy=$htt - Gaudi2 HPU ```bash -docker run -p 7055:7055 --runtime=habana -e HABANA_VISIBLE_DEVICES=all -e OMPI_MCA_btl_vader_single_copy_mechanism=none --cap-add=sys_nice --ipc=host -e http_proxy=$http_proxy -e https_proxy=$https_proxy opea/speecht5:latest +docker run -p 7055:7055 --runtime=habana -e HABANA_VISIBLE_DEVICES=all -e OMPI_MCA_btl_vader_single_copy_mechanism=none --cap-add=sys_nice --ipc=host -e http_proxy=$http_proxy -e https_proxy=$https_proxy opea/speecht5-gaudi:latest ``` ### 2.2.2 Start TTS service