|
7 | 7 | - samples/abn-sample
|
8 | 8 |
|
9 | 9 | jobs:
|
| 10 | + # A/B/n sample backend HTTP service |
10 | 11 | build-and-push-backend:
|
11 | 12 | runs-on: ubuntu-latest
|
12 | 13 | steps:
|
|
39 | 40 | file: samples/abn-sample/backend/Dockerfile
|
40 | 41 | push: true
|
41 | 42 |
|
| 43 | + # A/B/n sample frontend where the backend is a simple HTTP server (see above) |
| 44 | + # Sample frontends are provided in both go and node |
42 | 45 | build-and-push-frontends:
|
43 | 46 | runs-on: ubuntu-latest
|
44 | 47 | strategy:
|
@@ -74,3 +77,121 @@ jobs:
|
74 | 77 | file: samples/abn-sample/frontend/${{ matrix.lang }}/Dockerfile
|
75 | 78 | push: true
|
76 | 79 |
|
| 80 | + |
| 81 | + # A/B/n sample frontend for modelmesh-serving |
| 82 | + # In this case, the backends are models deployed as InferenceServices |
| 83 | + # This frontend is implemented omly in go |
| 84 | + build-and-push-mm-frontend: |
| 85 | + runs-on: ubuntu-latest |
| 86 | + strategy: |
| 87 | + matrix: |
| 88 | + lang: [go] |
| 89 | + steps: |
| 90 | + - uses: actions/checkout@v3 |
| 91 | + with: |
| 92 | + fetch-depth: 0 |
| 93 | + - name: Get version |
| 94 | + run: | |
| 95 | + tagref=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') |
| 96 | + # Strip "v" prefix from tagref |
| 97 | + echo "VERSION=$(echo $tagref | sed -e 's/^v//')" >> $GITHUB_ENV |
| 98 | + echo "MAJOR_MINOR_VERSION=$(echo $tagref | sed -e 's/^v//' -e 's,\([0-9]*\.[0-9]*\)\.\([0-9]*\),\1,')" >> $GITHUB_ENV |
| 99 | + - name: Get owner |
| 100 | + run: | |
| 101 | + ownerrepo=${{ github.repository }} |
| 102 | + owner=$(echo $ownerrepo | cut -f1 -d/) |
| 103 | + if [[ "$owner" == "iter8-tools" ]]; then |
| 104 | + owner=iter8 |
| 105 | + fi |
| 106 | + echo "OWNER=$owner" >> $GITHUB_ENV |
| 107 | + - uses: docker/setup-buildx-action@v2 |
| 108 | + - uses: docker/login-action@v2 |
| 109 | + with: |
| 110 | + username: ${{ secrets.DOCKERHUB_USERNAME }} |
| 111 | + password: ${{ secrets.DOCKERHUB_SECRET }} |
| 112 | + - uses: docker/build-push-action@v4 |
| 113 | + with: |
| 114 | + platforms: linux/amd64,linux/arm64 |
| 115 | + tags: ${{ env.OWNER }}/abn-sample-mm-frontend-${{ matrix.lang }}:${{ env.VERSION }},${{ env.OWNER }}/abn-sample-mm-frontend-${{ matrix.lang }}:${{ env.MAJOR_MINOR_VERSION }},${{ env.OWNER }}/abn-sample-mm-frontend-${{ matrix.lang }}:latest |
| 116 | + file: samples/abn-sample/mm-frontend/${{ matrix.lang }}/Dockerfile |
| 117 | + context: samples/abn-sample/mm-frontend/${{ matrix.lang }} |
| 118 | + push: true |
| 119 | + |
| 120 | + # A/B/n sample frontend for KServe w/ HTTP |
| 121 | + # In this case, the backends are models deployed as InferenceServices |
| 122 | + # This frontend is implemented omly in go |
| 123 | + build-and-push-kserve-http-frontend: |
| 124 | + runs-on: ubuntu-latest |
| 125 | + strategy: |
| 126 | + matrix: |
| 127 | + lang: [go] |
| 128 | + steps: |
| 129 | + - uses: actions/checkout@v3 |
| 130 | + with: |
| 131 | + fetch-depth: 0 |
| 132 | + - name: Get version |
| 133 | + run: | |
| 134 | + tagref=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') |
| 135 | + # Strip "v" prefix from tagref |
| 136 | + echo "VERSION=$(echo $tagref | sed -e 's/^v//')" >> $GITHUB_ENV |
| 137 | + echo "MAJOR_MINOR_VERSION=$(echo $tagref | sed -e 's/^v//' -e 's,\([0-9]*\.[0-9]*\)\.\([0-9]*\),\1,')" >> $GITHUB_ENV |
| 138 | + - name: Get owner |
| 139 | + run: | |
| 140 | + ownerrepo=${{ github.repository }} |
| 141 | + owner=$(echo $ownerrepo | cut -f1 -d/) |
| 142 | + if [[ "$owner" == "iter8-tools" ]]; then |
| 143 | + owner=iter8 |
| 144 | + fi |
| 145 | + echo "OWNER=$owner" >> $GITHUB_ENV |
| 146 | + - uses: docker/setup-buildx-action@v2 |
| 147 | + - uses: docker/login-action@v2 |
| 148 | + with: |
| 149 | + username: ${{ secrets.DOCKERHUB_USERNAME }} |
| 150 | + password: ${{ secrets.DOCKERHUB_SECRET }} |
| 151 | + - uses: docker/build-push-action@v4 |
| 152 | + with: |
| 153 | + platforms: linux/amd64,linux/arm64 |
| 154 | + tags: ${{ env.OWNER }}/abn-sample-kserve-http-frontend-${{ matrix.lang }}:${{ env.VERSION }},${{ env.OWNER }}/abn-sample-kserve-http-frontend-${{ matrix.lang }}:${{ env.MAJOR_MINOR_VERSION }},${{ env.OWNER }}/abn-sample-kserve-http-frontend-${{ matrix.lang }}:latest |
| 155 | + file: samples/abn-sample/kserve-http-frontend/${{ matrix.lang }}/Dockerfile |
| 156 | + context: samples/abn-sample/kserve-http-frontend/${{ matrix.lang }} |
| 157 | + push: true |
| 158 | + |
| 159 | + # A/B/n sample frontend for KServe w/ gRPC |
| 160 | + # In this case, the backends are models deployed as InferenceServices |
| 161 | + # This frontend is implemented omly in go |
| 162 | + build-and-push-kserve-grpc-frontend: |
| 163 | + runs-on: ubuntu-latest |
| 164 | + strategy: |
| 165 | + matrix: |
| 166 | + lang: [go] |
| 167 | + steps: |
| 168 | + - uses: actions/checkout@v3 |
| 169 | + with: |
| 170 | + fetch-depth: 0 |
| 171 | + - name: Get version |
| 172 | + run: | |
| 173 | + tagref=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') |
| 174 | + # Strip "v" prefix from tagref |
| 175 | + echo "VERSION=$(echo $tagref | sed -e 's/^v//')" >> $GITHUB_ENV |
| 176 | + echo "MAJOR_MINOR_VERSION=$(echo $tagref | sed -e 's/^v//' -e 's,\([0-9]*\.[0-9]*\)\.\([0-9]*\),\1,')" >> $GITHUB_ENV |
| 177 | + - name: Get owner |
| 178 | + run: | |
| 179 | + ownerrepo=${{ github.repository }} |
| 180 | + owner=$(echo $ownerrepo | cut -f1 -d/) |
| 181 | + if [[ "$owner" == "iter8-tools" ]]; then |
| 182 | + owner=iter8 |
| 183 | + fi |
| 184 | + echo "OWNER=$owner" >> $GITHUB_ENV |
| 185 | + - uses: docker/setup-buildx-action@v2 |
| 186 | + - uses: docker/login-action@v2 |
| 187 | + with: |
| 188 | + username: ${{ secrets.DOCKERHUB_USERNAME }} |
| 189 | + password: ${{ secrets.DOCKERHUB_SECRET }} |
| 190 | + - uses: docker/build-push-action@v4 |
| 191 | + with: |
| 192 | + platforms: linux/amd64,linux/arm64 |
| 193 | + tags: ${{ env.OWNER }}/abn-sample-kserve-grpc-frontend-${{ matrix.lang }}:${{ env.VERSION }},${{ env.OWNER }}/abn-sample-kserve-grpc-frontend-${{ matrix.lang }}:${{ env.MAJOR_MINOR_VERSION }},${{ env.OWNER }}/abn-sample-kserve-grpc-frontend-${{ matrix.lang }}:latest |
| 194 | + file: samples/abn-sample/kserve-grpc-frontend/${{ matrix.lang }}/Dockerfile |
| 195 | + context: samples/abn-sample/kserve-grpc-frontend/${{ matrix.lang }} |
| 196 | + push: true |
| 197 | + |
0 commit comments