add diskspace freeer action (#67) #21
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: Pull triton images to local repo | |
on: | |
push: | |
branches: | |
- main | |
env: | |
REGISTRY: ghcr.io | |
jobs: | |
free-disk-space: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Free Disk Space (Ubuntu) | |
uses: jlumbroso/free-disk-space@main | |
with: | |
tool-cache: false | |
# only run this workflow if changes have been | |
# made to the triton Dockerfile or to this workflow, | |
# which contain all the info that we need | |
changes: | |
runs-on: ubuntu-latest | |
if: github.repository_owner == 'ML4GW' | |
outputs: | |
triton: ${{ steps.filter.outputs.triton }} | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v2 | |
- | |
uses: dorny/paths-filter@v2 | |
id: filter | |
with: | |
filters: | | |
triton: | |
- '.github/triton.Dockerfile' | |
- '.github/workflows/triton-build.yaml' | |
# now define the main job which will build | |
# and push the containers in parallel | |
main: | |
needs: changes | |
if: ${{ needs.changes.outputs.triton == 'true' }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
trt-version: ["8.2.3", "8.4.1"] | |
include: | |
- trt-version: 8.2.3 | |
triton-tag: 22.02 | |
- trt-version: 8.4.1 | |
triton-tag: 22.07 | |
- trt-version: 8.5.1 | |
triton-tag: 22.12 | |
- trt-version: 8.6.1.6 | |
triton-tag: 24.01 | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v2 | |
- | |
name: Log in to container registry | |
uses: docker/login-action@master | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- | |
name: Triton Server pull-push | |
env: | |
TAG: ${{ env.REGISTRY }}/ml4gw/hermes/tritonserver:${{ matrix.triton-tag }} | |
run: | | |
docker build \ | |
-f .github/triton.Dockerfile \ | |
--build-arg TRITON_TAG=${{ matrix.triton-tag }} \ | |
--build-arg TENSORRT_VERSION=${{ matrix.trt-version }} \ | |
-t ${{ env.TAG }} \ | |
.github/ | |
docker push ${{ env.TAG }} |