api docs #50
This file contains 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: NGC Build & Push | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
dockerhub: | |
name: NGC | |
runs-on: [single-gpu, nvidia-gpu, a10, ci] | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Log in to NGC | |
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a | |
with: | |
registry: nvcr.io | |
username: ${{ secrets.NVCR_USERNAME }} | |
password: ${{ secrets.NVCR_PASSWORD }} | |
- name: Set short git commit SHA | |
id: vars | |
run: | | |
sha=$(git rev-parse --short ${{ github.sha }}) | |
echo "SHA=$sha" >> $GITHUB_ENV | |
- name: SHA | |
run: echo ${{ env.SHA }} | |
- name: Build and Push NGC Image | |
run: | | |
docker build -t autotrain-advanced:latest . | |
docker tag autotrain-advanced:latest nvcr.io/ycymhzotssoi/autotrain-advanced:latest | |
docker tag autotrain-advanced:latest nvcr.io/ycymhzotssoi/autotrain-advanced:${{ env.SHA }} | |
docker push nvcr.io/ycymhzotssoi/autotrain-advanced:latest | |
docker push nvcr.io/ycymhzotssoi/autotrain-advanced:${{ env.SHA }} | |