publish docker image #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: publish docker image | |
| on: | |
| schedule: | |
| # Runs every Monday at midnight UTC | |
| - cron: "0 0 * * 1" | |
| jobs: | |
| docker: | |
| runs-on: ubuntu-latest | |
| environment: docker | |
| # Only runs if the current branch is 'master' | |
| # Only runs if the current repository is espnet/espnet | |
| if: github.repository == 'espnet/espnet' && github.ref == 'refs/heads/master' | |
| steps: | |
| - uses: actions/checkout@master | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Build and push CPU container | |
| run: | | |
| cd docker | |
| docker build --build-arg FROM_TAG=runtime-latest \ | |
| -f prebuilt/devel.dockerfile \ | |
| --target devel \ | |
| -t espnet/espnet:cpu-latest . | |
| docker push espnet/espnet:cpu-latest | |
| - name: Build and push GPU container | |
| run: | | |
| cd docker | |
| docker build --build-arg FROM_TAG=cuda-latest \ | |
| --build-arg CUDA_VER=11.1 \ | |
| -f prebuilt/devel.dockerfile \ | |
| --target devel \ | |
| -t espnet/espnet:gpu-latest . | |
| docker push espnet/espnet:gpu-latest |