33 # FIXME: デフォルトブランチへのpush時にビルドをテストする
44 # https://github.com/VOICEVOX/voicevox_engine/pull/1669#discussion_r2076730954
55 workflow_call :
6- release :
7- types :
8- - created
6+ inputs :
7+ version :
8+ type : string
9+ required : true
910 workflow_dispatch :
1011 inputs :
1112 version :
1516env :
1617 IMAGE_NAME : ${{ vars.DOCKERHUB_USERNAME }}/voicevox_engine
1718 VOICEVOX_RESOURCE_VERSION : " 0.23.0"
18- VOICEVOX_CORE_VERSION : " 0.15.7"
19- ONNXRUNTIME_VERSION : " 1.13.1"
2019
2120defaults :
2221 run :
4544 # prefixes: Docker tagのプレフィックス。カンマ区切り。空文字列の場合、バージョン文字列のみがタグ名になる
4645 # buildcache_prefix: ビルドキャッシュのプレフィックス。空文字列やカンマは使用不可
4746 # target: Dockerfileのビルドステージ名
48- # base_image: Dockerfileのビルド用ステージのベースイメージ
49- # base_runtime_image: Dockerfileの実行用ステージのベースイメージ
47+ # base_image: Dockerfileのベースイメージ
5048 # platforms: Dockerのプラットフォームバリアント。カンマ区切り。 参考: https://docs.docker.com/build/building/multi-platform/
5149 include :
5250 # Ubuntu 20.04 / AMD64
@@ -55,55 +53,54 @@ jobs:
5553 buildcache_prefix : " cpu-amd64-ubuntu20.04"
5654 target : runtime-env
5755 base_image : mirror.gcr.io/ubuntu:20.04
58- base_runtime_image : mirror.gcr.io/ubuntu:20.04
56+ voicevox_engine_target : linux-cpu-x64
5957 platforms : linux/amd64
6058 # Ubuntu 20.04 / ARM64
6159 - os : ubuntu-24.04-arm
6260 prefixes : " cpu-arm64-ubuntu20.04"
6361 buildcache_prefix : " cpu-arm64-ubuntu20.04"
6462 target : runtime-env
6563 base_image : mirror.gcr.io/ubuntu:20.04
66- base_runtime_image : mirror.gcr.io/ubuntu:20.04
64+ voicevox_engine_target : linux-cpu-arm64
6765 platforms : linux/arm64/v8
6866 # Ubuntu 20.04 / AMD64 / NVIDIA
6967 - os : ubuntu-latest
7068 prefixes : " nvidia-ubuntu20.04,nvidia-amd64-ubuntu20.04"
7169 buildcache_prefix : " nvidia-amd64-ubuntu20.04"
7270 target : runtime-nvidia-env
7371 base_image : mirror.gcr.io/ubuntu:20.04
74- base_runtime_image : mirror.gcr.io/nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu20.04
72+ voicevox_engine_target : linux-nvidia
7573 platforms : linux/amd64
7674 # Ubuntu 22.04 / AMD64
7775 - os : ubuntu-latest
7876 prefixes : " cpu-amd64,cpu-amd64-ubuntu22.04"
7977 buildcache_prefix : " cpu-amd64-ubuntu22.04"
8078 target : runtime-env
8179 base_image : mirror.gcr.io/ubuntu:22.04
82- base_runtime_image : mirror.gcr.io/ubuntu:22.04
80+ voicevox_engine_target : linux-cpu-x64
8381 platforms : linux/amd64
8482 # Ubuntu 22.04 / ARM64
8583 - os : ubuntu-24.04-arm
8684 prefixes : " cpu-arm64,cpu-arm64-ubuntu22.04"
8785 buildcache_prefix : " cpu-arm64-ubuntu22.04"
8886 target : runtime-env
8987 base_image : mirror.gcr.io/ubuntu:22.04
90- base_runtime_image : mirror.gcr.io/ubuntu:22.04
88+ voicevox_engine_target : linux-cpu-arm64
9189 platforms : linux/arm64/v8
9290 # Ubuntu 22.04 / AMD64 / NVIDIA
9391 - os : ubuntu-latest
9492 prefixes : " nvidia,nvidia-amd64,nvidia-ubuntu22.04,nvidia-amd64-ubuntu22.04"
9593 buildcache_prefix : " nvidia-amd64-ubuntu22.04"
9694 target : runtime-nvidia-env
9795 base_image : mirror.gcr.io/ubuntu:22.04
98- base_runtime_image : mirror.gcr.io/nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu22.04
96+ voicevox_engine_target : linux-nvidia
9997 platforms : linux/amd64
10098
10199 steps :
102100 - name : <Setup> Check out the repository
103101 uses : actions/checkout@v4
104102
105- - name : <Setup> Prepare Python version
106- id : prepare-python
103+ - name : <Setup> Prepare Python
107104 uses : ./.github/actions/prepare_python
108105
109106 - name : <Setup> Set up Docker Buildx
@@ -116,26 +113,6 @@ jobs:
116113 username : ${{ vars.DOCKERHUB_USERNAME }}
117114 password : ${{ secrets.DOCKERHUB_TOKEN }}
118115
119- - name : <Setup> Prepare VOICEVOX RESOURCE cache
120- uses : actions/cache@v4
121- id : voicevox-resource-cache
122- with :
123- key : voicevox-resource-${{ env.VOICEVOX_RESOURCE_VERSION }}
124- path : download/resource
125-
126- - name : <Setup> Check out the VOICEVOX RESOURCE repository
127- if : steps.voicevox-resource-cache.outputs.cache-hit != 'true'
128- uses : actions/checkout@v4
129- with :
130- repository : VOICEVOX/voicevox_resource
131- ref : ${{ env.VOICEVOX_RESOURCE_VERSION }}
132- path : download/resource
133-
134- - name : <Build> Merge VOICEVOX RESOURCE
135- env :
136- DOWNLOAD_RESOURCE_PATH : download/resource
137- run : bash tools/process_voicevox_resource.bash
138-
139116 - name : <Build> Generate Docker image names
140117 id : generate-docker-image-names
141118 run : |
@@ -181,13 +158,9 @@ jobs:
181158 file : ./Dockerfile
182159 build-args : |
183160 BASE_IMAGE=${{ matrix.base_image }}
184- BASE_RUNTIME_IMAGE=${{ matrix.base_runtime_image }}
185- PYTHON_VERSION=${{ steps.prepare-python.outputs.python-version }}
186161 VOICEVOX_ENGINE_VERSION=${{ needs.config.outputs.version }}
187- VOICEVOX_CORE_VERSION =${{ env.VOICEVOX_CORE_VERSION }}
162+ VOICEVOX_ENGINE_TARGET =${{ matrix.voicevox_engine_target }}
188163 VOICEVOX_RESOURCE_VERSION=${{ env.VOICEVOX_RESOURCE_VERSION }}
189- USE_GPU=${{ matrix.target == 'runtime-nvidia-env' }}
190- ONNXRUNTIME_VERSION=${{ env.ONNXRUNTIME_VERSION }}
191164 target : ${{ matrix.target }}
192165 push : true
193166 tags : ${{ steps.generate-docker-image-names.outputs.tags }}
@@ -215,8 +188,7 @@ jobs:
215188 - name : <Setup> Check out the repository
216189 uses : actions/checkout@v4
217190
218- - name : <Setup> Prepare Python version
219- id : prepare-python
191+ - name : <Setup> Prepare Python
220192 uses : ./.github/actions/prepare_python
221193
222194 - name : <Setup> Set up Docker Buildx
0 commit comments