26
26
uses : docker/setup-buildx-action@v2.0.0
27
27
with :
28
28
install : true
29
- - name : Configure sccache
30
- uses : actions/github-script@v6
31
- with :
32
- script : |
33
- core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
34
- core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
35
29
- name : Inject slug/short variables
36
30
uses : rlespinasse/github-slug-action@v4.4.1
37
31
- name : Tailscale
74
68
push : ${{ github.event_name != 'pull_request' }}
75
69
platforms : ' linux/amd64'
76
70
build-args : |
77
- SCCACHE_GHA_ENABLED=on
78
- ACTIONS_CACHE_URL=${{ env.ACTIONS_CACHE_URL }}
79
- ACTIONS_RUNTIME_TOKEN=${{ env.ACTIONS_RUNTIME_TOKEN }}
80
71
GIT_SHA=${{ env.GITHUB_SHA }}
81
72
DOCKER_LABEL=sha-${{ env.GITHUB_SHA_SHORT }}
82
73
tags : ${{ steps.meta.outputs.tags }}
83
74
labels : ${{ steps.meta.outputs.labels }}
84
75
cache-from : type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-all,mode=max
85
76
cache-to : type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-all,mode=max
86
-
87
- build-and-push-sagemaker-image :
88
- needs :
89
- - build-and-push-image
90
- concurrency :
91
- group : ${{ github.workflow }}-${{ github.job }}-all-${{ github.head_ref || github.run_id }}
92
- cancel-in-progress : true
93
- runs-on : [self-hosted, intel-cpu, 32-cpu, tgi-ci]
94
- permissions :
95
- contents : write
96
- packages : write
97
- # This is used to complete the identity challenge
98
- # with sigstore/fulcio when running outside of PRs.
99
- id-token : write
100
- security-events : write
101
- steps :
102
- - name : Checkout repository
103
- uses : actions/checkout@v3
104
- - name : Initialize Docker Buildx
105
- uses : docker/setup-buildx-action@v2.0.0
106
- with :
107
- install : true
108
- - name : Configure sccache
109
- uses : actions/github-script@v6
110
- with :
111
- script : |
112
- core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
113
- core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
114
- - name : Inject slug/short variables
115
- uses : rlespinasse/github-slug-action@v4.4.1
116
- - name : Login to internal Container Registry
117
- uses : docker/login-action@v2.1.0
118
- with :
119
- username : ${{ secrets.TAILSCALE_DOCKER_USERNAME }}
120
- password : ${{ secrets.TAILSCALE_DOCKER_PASSWORD }}
121
- registry : registry.internal.huggingface.tech
122
77
- name : Extract metadata (tags, labels) for Docker
123
- id : meta
78
+ id : meta-sagemaker
124
79
uses : docker/metadata-action@v4.3.0
125
80
with :
126
81
images : |
142
97
platforms : ' linux/amd64'
143
98
target : sagemaker
144
99
build-args : |
145
- SCCACHE_GHA_ENABLED=on
146
- ACTIONS_CACHE_URL=${{ env.ACTIONS_CACHE_URL }}
147
- ACTIONS_RUNTIME_TOKEN=${{ env.ACTIONS_RUNTIME_TOKEN }}
148
100
GIT_SHA=${{ env.GITHUB_SHA }}
149
101
DOCKER_LABEL=sha-${{ env.GITHUB_SHA_SHORT }}
150
- tags : ${{ steps.meta.outputs.tags }}
151
- labels : ${{ steps.meta.outputs.labels }}
102
+ tags : ${{ steps.meta-sagemaker .outputs.tags }}
103
+ labels : ${{ steps.meta-sagemaker .outputs.labels }}
152
104
cache-from : type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-all,mode=max
153
- cache-to : type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-all,mode=max
105
+ cache-to : type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-all,mode=max
0 commit comments