Skip to content

Commit a704322

Browse files
authored
Fix CI build timeout (#296)
1 parent 7e55c61 commit a704322

File tree

9 files changed

+122
-32
lines changed

9 files changed

+122
-32
lines changed

.github/workflows/build_75.yaml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,35 +24,45 @@
2424
steps:
2525
- name: Checkout repository
2626
uses: actions/checkout@v3
27+
28+
- name: Tailscale
29+
uses: huggingface/tailscale-action@main
30+
with:
31+
authkey: ${{ secrets.TAILSCALE_AUTHKEY }}
32+
2733
- name: Initialize Docker Buildx
2834
uses: docker/setup-buildx-action@v2.0.0
2935
with:
3036
install: true
37+
config-inline: |
38+
[registry."docker.io"]
39+
mirrors = ["registry.github-runners.huggingface.tech"]
40+
3141
- name: Configure sccache
3242
uses: actions/github-script@v6
3343
with:
3444
script: |
3545
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
3646
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
47+
3748
- name: Inject slug/short variables
3849
uses: rlespinasse/github-slug-action@v4.4.1
39-
- name: Tailscale
40-
uses: huggingface/tailscale-action@v1
41-
with:
42-
authkey: ${{ secrets.TAILSCALE_AUTHKEY }}
50+
4351
- name: Login to GitHub Container Registry
4452
if: github.event_name != 'pull_request'
4553
uses: docker/login-action@v2
4654
with:
4755
registry: ghcr.io
4856
username: ${{ github.actor }}
4957
password: ${{ secrets.GITHUB_TOKEN }}
58+
5059
- name: Login to internal Container Registry
5160
uses: docker/login-action@v2.1.0
5261
with:
5362
username: ${{ secrets.TAILSCALE_DOCKER_USERNAME }}
5463
password: ${{ secrets.TAILSCALE_DOCKER_PASSWORD }}
5564
registry: registry.internal.huggingface.tech
65+
5666
- name: Extract metadata (tags, labels) for Docker
5767
id: meta-75
5868
uses: docker/metadata-action@v4.3.0
@@ -67,6 +77,7 @@
6777
type=semver,pattern=turing-{{major}}.{{minor}}
6878
type=raw,value=turing-latest
6979
type=raw,value=turing-sha-${{ env.GITHUB_SHA_SHORT }}
80+
7081
- name: Build and push Docker image
7182
id: build-and-push-75
7283
uses: docker/build-push-action@v4
@@ -87,6 +98,7 @@
8798
labels: ${{ steps.meta-75.outputs.labels }}
8899
cache-from: type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-75,mode=max
89100
cache-to: type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-75,mode=max
101+
90102
- name: Extract metadata (tags, labels) for Docker
91103
id: meta-75-grpc
92104
uses: docker/metadata-action@v4.3.0
@@ -101,6 +113,7 @@
101113
type=semver,pattern=turing-{{major}}.{{minor}}-grpc
102114
type=raw,value=turing-latest-grpc
103115
type=raw,value=turing-sha-${{ env.GITHUB_SHA_SHORT }}-grpc
116+
104117
- name: Build and push Docker image
105118
id: build-and-push-75-grpc
106119
uses: docker/build-push-action@v4

.github/workflows/build_80.yaml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,35 +36,45 @@
3636
steps:
3737
- name: Checkout repository
3838
uses: actions/checkout@v3
39+
40+
- name: Tailscale
41+
uses: huggingface/tailscale-action@main
42+
with:
43+
authkey: ${{ secrets.TAILSCALE_AUTHKEY }}
44+
3945
- name: Initialize Docker Buildx
4046
uses: docker/setup-buildx-action@v2.0.0
4147
with:
4248
install: true
49+
config-inline: |
50+
[registry."docker.io"]
51+
mirrors = ["registry.github-runners.huggingface.tech"]
52+
4353
- name: Configure sccache
4454
uses: actions/github-script@v6
4555
with:
4656
script: |
4757
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
4858
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
59+
4960
- name: Inject slug/short variables
5061
uses: rlespinasse/github-slug-action@v4.4.1
51-
- name: Tailscale
52-
uses: huggingface/tailscale-action@v1
53-
with:
54-
authkey: ${{ secrets.TAILSCALE_AUTHKEY }}
62+
5563
- name: Login to GitHub Container Registry
5664
if: github.event_name != 'pull_request'
5765
uses: docker/login-action@v2
5866
with:
5967
registry: ghcr.io
6068
username: ${{ github.actor }}
6169
password: ${{ secrets.GITHUB_TOKEN }}
70+
6271
- name: Login to internal Container Registry
6372
uses: docker/login-action@v2.1.0
6473
with:
6574
username: ${{ secrets.TAILSCALE_DOCKER_USERNAME }}
6675
password: ${{ secrets.TAILSCALE_DOCKER_PASSWORD }}
6776
registry: registry.internal.huggingface.tech
77+
6878
- name: Extract metadata (tags, labels) for Docker
6979
id: meta-80
7080
uses: docker/metadata-action@v4.3.0
@@ -79,6 +89,7 @@
7989
type=semver,pattern={{major}}.{{minor}}
8090
type=raw,value=latest
8191
type=raw,value=sha-${{ env.GITHUB_SHA_SHORT }}
92+
8293
- name: Build and push Docker image
8394
id: build-and-push-80
8495
uses: docker/build-push-action@v4
@@ -98,6 +109,7 @@
98109
labels: ${{ steps.meta-80.outputs.labels }}
99110
cache-from: type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-80,mode=max
100111
cache-to: type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-80,mode=max
112+
101113
- name: Extract metadata (tags, labels) for Docker
102114
id: meta-80-grpc
103115
uses: docker/metadata-action@v4.3.0
@@ -112,6 +124,7 @@
112124
type=semver,pattern={{major}}.{{minor}}-grpc
113125
type=raw,value=latest-grpc
114126
type=raw,value=sha-${{ env.GITHUB_SHA_SHORT }}-grpc
127+
115128
- name: Build and push Docker image
116129
id: build-and-push-80-grpc
117130
uses: docker/build-push-action@v4

.github/workflows/build_86.yaml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,35 +24,45 @@
2424
steps:
2525
- name: Checkout repository
2626
uses: actions/checkout@v3
27+
28+
- name: Tailscale
29+
uses: huggingface/tailscale-action@main
30+
with:
31+
authkey: ${{ secrets.TAILSCALE_AUTHKEY }}
32+
2733
- name: Initialize Docker Buildx
2834
uses: docker/setup-buildx-action@v2.0.0
2935
with:
3036
install: true
37+
config-inline: |
38+
[registry."docker.io"]
39+
mirrors = ["registry.github-runners.huggingface.tech"]
40+
3141
- name: Configure sccache
3242
uses: actions/github-script@v6
3343
with:
3444
script: |
3545
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
3646
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
47+
3748
- name: Inject slug/short variables
3849
uses: rlespinasse/github-slug-action@v4.4.1
39-
- name: Tailscale
40-
uses: huggingface/tailscale-action@v1
41-
with:
42-
authkey: ${{ secrets.TAILSCALE_AUTHKEY }}
50+
4351
- name: Login to GitHub Container Registry
4452
if: github.event_name != 'pull_request'
4553
uses: docker/login-action@v2
4654
with:
4755
registry: ghcr.io
4856
username: ${{ github.actor }}
4957
password: ${{ secrets.GITHUB_TOKEN }}
58+
5059
- name: Login to internal Container Registry
5160
uses: docker/login-action@v2.1.0
5261
with:
5362
username: ${{ secrets.TAILSCALE_DOCKER_USERNAME }}
5463
password: ${{ secrets.TAILSCALE_DOCKER_PASSWORD }}
5564
registry: registry.internal.huggingface.tech
65+
5666
- name: Extract metadata (tags, labels) for Docker
5767
id: meta-86
5868
uses: docker/metadata-action@v4.3.0
@@ -67,6 +77,7 @@
6777
type=semver,pattern=86-{{major}}.{{minor}}
6878
type=raw,value=86-latest,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
6979
type=raw,value=86-sha-${{ env.GITHUB_SHA_SHORT }}
80+
7081
- name: Build and push Docker image
7182
id: build-and-push-86
7283
uses: docker/build-push-action@v4
@@ -86,6 +97,7 @@
8697
labels: ${{ steps.meta-86.outputs.labels }}
8798
cache-from: type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-86,mode=max
8899
cache-to: type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-86,mode=max
100+
89101
- name: Extract metadata (tags, labels) for Docker
90102
id: meta-86-grpc
91103
uses: docker/metadata-action@v4.3.0
@@ -100,6 +112,7 @@
100112
type=semver,pattern=86-{{major}}.{{minor}}-grpc
101113
type=raw,value=86-latest-grpc
102114
type=raw,value=86-sha-${{ env.GITHUB_SHA_SHORT }}-grpc
115+
103116
- name: Build and push Docker image
104117
id: build-and-push-86-grpc
105118
uses: docker/build-push-action@v4

.github/workflows/build_89.yaml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,35 +24,45 @@
2424
steps:
2525
- name: Checkout repository
2626
uses: actions/checkout@v3
27+
28+
- name: Tailscale
29+
uses: huggingface/tailscale-action@main
30+
with:
31+
authkey: ${{ secrets.TAILSCALE_AUTHKEY }}
32+
2733
- name: Initialize Docker Buildx
2834
uses: docker/setup-buildx-action@v2.0.0
2935
with:
3036
install: true
37+
config-inline: |
38+
[registry."docker.io"]
39+
mirrors = ["registry.github-runners.huggingface.tech"]
40+
3141
- name: Configure sccache
3242
uses: actions/github-script@v6
3343
with:
3444
script: |
3545
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
3646
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
47+
3748
- name: Inject slug/short variables
3849
uses: rlespinasse/github-slug-action@v4.4.1
39-
- name: Tailscale
40-
uses: huggingface/tailscale-action@v1
41-
with:
42-
authkey: ${{ secrets.TAILSCALE_AUTHKEY }}
50+
4351
- name: Login to GitHub Container Registry
4452
if: github.event_name != 'pull_request'
4553
uses: docker/login-action@v2
4654
with:
4755
registry: ghcr.io
4856
username: ${{ github.actor }}
4957
password: ${{ secrets.GITHUB_TOKEN }}
58+
5059
- name: Login to internal Container Registry
5160
uses: docker/login-action@v2.1.0
5261
with:
5362
username: ${{ secrets.TAILSCALE_DOCKER_USERNAME }}
5463
password: ${{ secrets.TAILSCALE_DOCKER_PASSWORD }}
5564
registry: registry.internal.huggingface.tech
65+
5666
- name: Extract metadata (tags, labels) for Docker
5767
id: meta-89
5868
uses: docker/metadata-action@v4.3.0
@@ -67,6 +77,7 @@
6777
type=semver,pattern=89-{{major}}.{{minor}}
6878
type=raw,value=89-latest,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
6979
type=raw,value=89-sha-${{ env.GITHUB_SHA_SHORT }}
80+
7081
- name: Build and push Docker image
7182
id: build-and-push-89
7283
uses: docker/build-push-action@v4
@@ -86,6 +97,7 @@
8697
labels: ${{ steps.meta-89.outputs.labels }}
8798
cache-from: type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-89,mode=max
8899
cache-to: type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-89,mode=max
100+
89101
- name: Extract metadata (tags, labels) for Docker
90102
id: meta-89-grpc
91103
uses: docker/metadata-action@v4.3.0
@@ -100,6 +112,7 @@
100112
type=semver,pattern=89-{{major}}.{{minor}}-grpc
101113
type=raw,value=89-latest-grpc
102114
type=raw,value=89-sha-${{ env.GITHUB_SHA_SHORT }}-grpc
115+
103116
- name: Build and push Docker image
104117
id: build-and-push-89-grpc
105118
uses: docker/build-push-action@v4

.github/workflows/build_90.yaml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,35 +24,45 @@
2424
steps:
2525
- name: Checkout repository
2626
uses: actions/checkout@v3
27+
28+
- name: Tailscale
29+
uses: huggingface/tailscale-action@main
30+
with:
31+
authkey: ${{ secrets.TAILSCALE_AUTHKEY }}
32+
2733
- name: Initialize Docker Buildx
2834
uses: docker/setup-buildx-action@v2.0.0
2935
with:
3036
install: true
37+
config-inline: |
38+
[registry."docker.io"]
39+
mirrors = ["registry.github-runners.huggingface.tech"]
40+
3141
- name: Configure sccache
3242
uses: actions/github-script@v6
3343
with:
3444
script: |
3545
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
3646
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
47+
3748
- name: Inject slug/short variables
3849
uses: rlespinasse/github-slug-action@v4.4.1
39-
- name: Tailscale
40-
uses: huggingface/tailscale-action@v1
41-
with:
42-
authkey: ${{ secrets.TAILSCALE_AUTHKEY }}
50+
4351
- name: Login to GitHub Container Registry
4452
if: github.event_name != 'pull_request'
4553
uses: docker/login-action@v2
4654
with:
4755
registry: ghcr.io
4856
username: ${{ github.actor }}
4957
password: ${{ secrets.GITHUB_TOKEN }}
58+
5059
- name: Login to internal Container Registry
5160
uses: docker/login-action@v2.1.0
5261
with:
5362
username: ${{ secrets.TAILSCALE_DOCKER_USERNAME }}
5463
password: ${{ secrets.TAILSCALE_DOCKER_PASSWORD }}
5564
registry: registry.internal.huggingface.tech
65+
5666
- name: Extract metadata (tags, labels) for Docker
5767
id: meta-90
5868
uses: docker/metadata-action@v4.3.0
@@ -67,6 +77,7 @@
6777
type=semver,pattern=hopper-{{major}}.{{minor}}
6878
type=raw,value=hopper-latest,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
6979
type=raw,value=hopper-sha-${{ env.GITHUB_SHA_SHORT }}
80+
7081
- name: Build and push Docker image
7182
id: build-and-push-90
7283
uses: docker/build-push-action@v4
@@ -86,6 +97,7 @@
8697
labels: ${{ steps.meta-90.outputs.labels }}
8798
cache-from: type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-90,mode=max
8899
cache-to: type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-90,mode=max
100+
89101
- name: Extract metadata (tags, labels) for Docker
90102
id: meta-90-grpc
91103
uses: docker/metadata-action@v4.3.0
@@ -100,6 +112,7 @@
100112
type=semver,pattern=hopper-{{major}}.{{minor}}-grpc
101113
type=raw,value=hopper-latest-grpc
102114
type=raw,value=hopper-sha-${{ env.GITHUB_SHA_SHORT }}-grpc
115+
103116
- name: Build and push Docker image
104117
id: build-and-push-90-grpc
105118
uses: docker/build-push-action@v4

0 commit comments

Comments
 (0)