|
76 | 76 | uses: docker/setup-buildx-action@v2.0.0
|
77 | 77 | with:
|
78 | 78 | install: true
|
| 79 | + - name: Configure sccache |
| 80 | + uses: actions/github-script@v6 |
| 81 | + with: |
| 82 | + script: | |
| 83 | + core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); |
| 84 | + core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); |
79 | 85 | - name: Inject slug/short variables
|
80 | 86 | uses: rlespinasse/github-slug-action@v4.4.1
|
81 | 87 | - name: Tailscale
|
|
155 | 161 | type=semver,pattern=cpu-{{major}}.{{minor}}
|
156 | 162 | type=raw,value=cpu-latest,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
|
157 | 163 | type=raw,value=cpu-sha-${{ env.GITHUB_SHA_SHORT }}
|
158 |
| - - name: Build and push Docker image |
159 |
| - id: build-and-push-75 |
160 |
| - uses: docker/build-push-action@v4 |
161 |
| - with: |
162 |
| - context: . |
163 |
| - file: Dockerfile-cuda |
164 |
| - push: ${{ github.event_name != 'pull_request' }} |
165 |
| - platforms: 'linux/amd64' |
166 |
| - build-args: | |
167 |
| - CUDA_COMPUTE_CAP=75 |
168 |
| - GIT_SHA=${{ env.GITHUB_SHA }} |
169 |
| - DOCKER_LABEL=sha-${{ env.GITHUB_SHA_SHORT }} |
170 |
| - tags: ${{ steps.meta-75.outputs.tags }} |
171 |
| - labels: ${{ steps.meta-75.outputs.labels }} |
172 |
| - cache-from: type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-75,mode=min |
173 |
| - cache-to: type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-75,mode=min |
174 |
| - - name: Build and push Docker image |
175 |
| - id: build-and-push-80 |
176 |
| - uses: docker/build-push-action@v4 |
177 |
| - with: |
178 |
| - context: . |
179 |
| - file: Dockerfile-cuda |
180 |
| - push: ${{ github.event_name != 'pull_request' }} |
181 |
| - platforms: 'linux/amd64' |
182 |
| - build-args: | |
183 |
| - CUDA_COMPUTE_CAP=80 |
184 |
| - GIT_SHA=${{ env.GITHUB_SHA }} |
185 |
| - DOCKER_LABEL=sha-${{ env.GITHUB_SHA_SHORT }} |
186 |
| - tags: ${{ steps.meta-80.outputs.tags }} |
187 |
| - labels: ${{ steps.meta-80.outputs.labels }} |
188 |
| - cache-from: type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-80,mode=min |
189 |
| - cache-to: type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-80,mode=min |
190 |
| - - name: Build and push Docker image |
191 |
| - id: build-and-push-86 |
192 |
| - uses: docker/build-push-action@v4 |
193 |
| - with: |
194 |
| - context: . |
195 |
| - file: Dockerfile-cuda |
196 |
| - push: ${{ github.event_name != 'pull_request' }} |
197 |
| - platforms: 'linux/amd64' |
198 |
| - build-args: | |
199 |
| - CUDA_COMPUTE_CAP=86 |
200 |
| - GIT_SHA=${{ env.GITHUB_SHA }} |
201 |
| - DOCKER_LABEL=sha-${{ env.GITHUB_SHA_SHORT }} |
202 |
| - tags: ${{ steps.meta-86.outputs.tags }} |
203 |
| - labels: ${{ steps.meta-86.outputs.labels }} |
204 |
| - cache-from: type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-86,mode=min |
205 |
| - cache-to: type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-86,mode=min |
206 |
| - - name: Build and push Docker image |
207 |
| - id: build-and-push-90 |
208 |
| - uses: docker/build-push-action@v4 |
209 |
| - with: |
210 |
| - context: . |
211 |
| - file: Dockerfile-cuda |
212 |
| - push: ${{ github.event_name != 'pull_request' }} |
213 |
| - platforms: 'linux/amd64' |
214 |
| - build-args: | |
215 |
| - CUDA_COMPUTE_CAP=90 |
216 |
| - GIT_SHA=${{ env.GITHUB_SHA }} |
217 |
| - DOCKER_LABEL=sha-${{ env.GITHUB_SHA_SHORT }} |
218 |
| - tags: ${{ steps.meta-90.outputs.tags }} |
219 |
| - labels: ${{ steps.meta-90.outputs.labels }} |
220 |
| - cache-from: type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-90,mode=min |
221 |
| - cache-to: type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-90,mode=min |
| 164 | +# - name: Build and push Docker image |
| 165 | +# id: build-and-push-75 |
| 166 | +# uses: docker/build-push-action@v4 |
| 167 | +# with: |
| 168 | +# context: . |
| 169 | +# file: Dockerfile-cuda |
| 170 | +# push: ${{ github.event_name != 'pull_request' }} |
| 171 | +# platforms: 'linux/amd64' |
| 172 | +# build-args: | |
| 173 | +# CUDA_COMPUTE_CAP=75 |
| 174 | +# GIT_SHA=${{ env.GITHUB_SHA }} |
| 175 | +# DOCKER_LABEL=sha-${{ env.GITHUB_SHA_SHORT }} |
| 176 | +# tags: ${{ steps.meta-75.outputs.tags }} |
| 177 | +# labels: ${{ steps.meta-75.outputs.labels }} |
| 178 | +# - name: Build and push Docker image |
| 179 | +# id: build-and-push-80 |
| 180 | +# uses: docker/build-push-action@v4 |
| 181 | +# with: |
| 182 | +# context: . |
| 183 | +# file: Dockerfile-cuda |
| 184 | +# push: ${{ github.event_name != 'pull_request' }} |
| 185 | +# platforms: 'linux/amd64' |
| 186 | +# build-args: | |
| 187 | +# CUDA_COMPUTE_CAP=80 |
| 188 | +# GIT_SHA=${{ env.GITHUB_SHA }} |
| 189 | +# DOCKER_LABEL=sha-${{ env.GITHUB_SHA_SHORT }} |
| 190 | +# tags: ${{ steps.meta-80.outputs.tags }} |
| 191 | +# labels: ${{ steps.meta-80.outputs.labels }} |
| 192 | +# - name: Build and push Docker image |
| 193 | +# id: build-and-push-86 |
| 194 | +# uses: docker/build-push-action@v4 |
| 195 | +# with: |
| 196 | +# context: . |
| 197 | +# file: Dockerfile-cuda |
| 198 | +# push: ${{ github.event_name != 'pull_request' }} |
| 199 | +# platforms: 'linux/amd64' |
| 200 | +# build-args: | |
| 201 | +# CUDA_COMPUTE_CAP=86 |
| 202 | +# GIT_SHA=${{ env.GITHUB_SHA }} |
| 203 | +# DOCKER_LABEL=sha-${{ env.GITHUB_SHA_SHORT }} |
| 204 | +# tags: ${{ steps.meta-86.outputs.tags }} |
| 205 | +# labels: ${{ steps.meta-86.outputs.labels }} |
| 206 | +# - name: Build and push Docker image |
| 207 | +# id: build-and-push-90 |
| 208 | +# uses: docker/build-push-action@v4 |
| 209 | +# with: |
| 210 | +# context: . |
| 211 | +# file: Dockerfile-cuda |
| 212 | +# push: ${{ github.event_name != 'pull_request' }} |
| 213 | +# platforms: 'linux/amd64' |
| 214 | +# build-args: | |
| 215 | +# CUDA_COMPUTE_CAP=90 |
| 216 | +# GIT_SHA=${{ env.GITHUB_SHA }} |
| 217 | +# DOCKER_LABEL=sha-${{ env.GITHUB_SHA_SHORT }} |
| 218 | +# tags: ${{ steps.meta-90.outputs.tags }} |
| 219 | +# labels: ${{ steps.meta-90.outputs.labels }} |
222 | 220 | - name: Build and push Docker image
|
223 | 221 | id: build-and-push-cpu
|
224 | 222 | uses: docker/build-push-action@v4
|
|
228 | 226 | push: ${{ github.event_name != 'pull_request' }}
|
229 | 227 | platforms: 'linux/amd64'
|
230 | 228 | build-args: |
|
| 229 | + SCCACHE_GHA_ENABLED="true" |
| 230 | + ACTIONS_CACHE_URL=${{ env.ACTIONS_CACHE_URL }} |
| 231 | + ACTIONS_RUNTIME_TOKEN=${{ env.ACTIONS_RUNTIME_TOKEN }} |
231 | 232 | GIT_SHA=${{ env.GITHUB_SHA }}
|
232 | 233 | DOCKER_LABEL=sha-${{ env.GITHUB_SHA_SHORT }}
|
233 | 234 | tags: ${{ steps.meta-cpu.outputs.tags }}
|
234 | 235 | labels: ${{ steps.meta-cpu.outputs.labels }}
|
235 |
| - cache-from: type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-cpu,mode=min |
236 |
| - cache-to: type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-cpu,mode=min |
237 | 236 |
|
238 | 237 | stop-runner:
|
239 | 238 | name: Stop self-hosted EC2 runner
|
|
0 commit comments