|
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
|
|
164 | 170 | push: ${{ github.event_name != 'pull_request' }}
|
165 | 171 | platforms: 'linux/amd64'
|
166 | 172 | build-args: |
|
| 173 | + SCCACHE_GHA_ENABLED=on |
| 174 | + ACTIONS_CACHE_URL=${{ env.ACTIONS_CACHE_URL }} |
| 175 | + ACTIONS_RUNTIME_TOKEN=${{ env.ACTIONS_RUNTIME_TOKEN }} |
167 | 176 | CUDA_COMPUTE_CAP=75
|
168 | 177 | GIT_SHA=${{ env.GITHUB_SHA }}
|
169 | 178 | DOCKER_LABEL=sha-${{ env.GITHUB_SHA_SHORT }}
|
170 | 179 | tags: ${{ steps.meta-75.outputs.tags }}
|
171 | 180 | 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 | 181 | - name: Build and push Docker image
|
175 | 182 | id: build-and-push-80
|
176 | 183 | uses: docker/build-push-action@v4
|
|
180 | 187 | push: ${{ github.event_name != 'pull_request' }}
|
181 | 188 | platforms: 'linux/amd64'
|
182 | 189 | build-args: |
|
| 190 | + SCCACHE_GHA_ENABLED=on |
| 191 | + ACTIONS_CACHE_URL=${{ env.ACTIONS_CACHE_URL }} |
| 192 | + ACTIONS_RUNTIME_TOKEN=${{ env.ACTIONS_RUNTIME_TOKEN }} |
183 | 193 | CUDA_COMPUTE_CAP=80
|
184 | 194 | GIT_SHA=${{ env.GITHUB_SHA }}
|
185 | 195 | DOCKER_LABEL=sha-${{ env.GITHUB_SHA_SHORT }}
|
186 | 196 | tags: ${{ steps.meta-80.outputs.tags }}
|
187 | 197 | 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 | 198 | - name: Build and push Docker image
|
191 | 199 | id: build-and-push-86
|
192 | 200 | uses: docker/build-push-action@v4
|
|
196 | 204 | push: ${{ github.event_name != 'pull_request' }}
|
197 | 205 | platforms: 'linux/amd64'
|
198 | 206 | build-args: |
|
| 207 | + SCCACHE_GHA_ENABLED=on |
| 208 | + ACTIONS_CACHE_URL=${{ env.ACTIONS_CACHE_URL }} |
| 209 | + ACTIONS_RUNTIME_TOKEN=${{ env.ACTIONS_RUNTIME_TOKEN }} |
199 | 210 | CUDA_COMPUTE_CAP=86
|
200 | 211 | GIT_SHA=${{ env.GITHUB_SHA }}
|
201 | 212 | DOCKER_LABEL=sha-${{ env.GITHUB_SHA_SHORT }}
|
202 | 213 | tags: ${{ steps.meta-86.outputs.tags }}
|
203 | 214 | 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 | 215 | - name: Build and push Docker image
|
207 | 216 | id: build-and-push-90
|
208 | 217 | uses: docker/build-push-action@v4
|
|
212 | 221 | push: ${{ github.event_name != 'pull_request' }}
|
213 | 222 | platforms: 'linux/amd64'
|
214 | 223 | build-args: |
|
| 224 | + SCCACHE_GHA_ENABLED=on |
| 225 | + ACTIONS_CACHE_URL=${{ env.ACTIONS_CACHE_URL }} |
| 226 | + ACTIONS_RUNTIME_TOKEN=${{ env.ACTIONS_RUNTIME_TOKEN }} |
215 | 227 | CUDA_COMPUTE_CAP=90
|
216 | 228 | GIT_SHA=${{ env.GITHUB_SHA }}
|
217 | 229 | DOCKER_LABEL=sha-${{ env.GITHUB_SHA_SHORT }}
|
218 | 230 | tags: ${{ steps.meta-90.outputs.tags }}
|
219 | 231 | 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 |
222 | 232 | - name: Build and push Docker image
|
223 | 233 | id: build-and-push-cpu
|
224 | 234 | uses: docker/build-push-action@v4
|
|
228 | 238 | push: ${{ github.event_name != 'pull_request' }}
|
229 | 239 | platforms: 'linux/amd64'
|
230 | 240 | build-args: |
|
| 241 | + SCCACHE_GHA_ENABLED=on |
| 242 | + ACTIONS_CACHE_URL=${{ env.ACTIONS_CACHE_URL }} |
| 243 | + ACTIONS_RUNTIME_TOKEN=${{ env.ACTIONS_RUNTIME_TOKEN }} |
231 | 244 | GIT_SHA=${{ env.GITHUB_SHA }}
|
232 | 245 | DOCKER_LABEL=sha-${{ env.GITHUB_SHA_SHORT }}
|
233 | 246 | tags: ${{ steps.meta-cpu.outputs.tags }}
|
234 | 247 | 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 | 248 |
|
238 | 249 | stop-runner:
|
239 | 250 | name: Stop self-hosted EC2 runner
|
|
0 commit comments