| name: Build and Publish Docker Image | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| build-amd64: | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| matrix: | |
| include: | |
| - cuda_version: 11.8 | |
| torch_version: 2.4.1 | |
| tag_prefix: pytorch2.4.1-cuda11.8 | |
| - cuda_version: 12.8 | |
| torch_version: 2.8.0 | |
| tag_prefix: pytorch2.8.0-cuda12.8 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Extract Docker Meta | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: nanaoto/index-tts | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build Docker Image | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| file: ./Dockerfile | |
| push: false | |
| platforms: linux/amd64 | |
| build-args: | | |
| CUDA_VERSION=${{ matrix.cuda_version }} | |
| TORCH_VERSION=${{ matrix.torch_version }} | |
| tags: | | |
| nanaoto/index-tts:${{ matrix.tag_prefix }}-${{ steps.meta.outputs.tags }}-amd64 | |
| nanaoto/index-tts:latest-${{ matrix.tag_prefix }}-amd64 | |