update image build for gaudi (#316)
Signed-off-by: chensuyue <suyue.chen@intel.com>
This commit is contained in:
3
.github/workflows/reuse-image-build.yml
vendored
3
.github/workflows/reuse-image-build.yml
vendored
@@ -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}
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user