|
78 | 78 | install: true
|
79 | 79 | - name: Inject slug/short variables
|
80 | 80 | uses: rlespinasse/github-slug-action@v4.4.1
|
81 |
| -# - name: Tailscale |
82 |
| -# uses: tailscale/github-action@7bd8039bf25c23c4ab1b8d6e2cc2da2280601966 |
83 |
| -# with: |
84 |
| -# authkey: ${{ secrets.TAILSCALE_AUTHKEY }} |
| 81 | + - name: Tailscale |
| 82 | + uses: tailscale/github-action@7bd8039bf25c23c4ab1b8d6e2cc2da2280601966 |
| 83 | + with: |
| 84 | + authkey: ${{ secrets.TAILSCALE_AUTHKEY }} |
85 | 85 | - name: Login to GitHub Container Registry
|
86 |
| -# if: github.event_name != 'pull_request' |
| 86 | + if: github.event_name != 'pull_request' |
87 | 87 | uses: docker/login-action@v2
|
88 | 88 | with:
|
89 | 89 | registry: ghcr.io
|
90 | 90 | username: ${{ github.actor }}
|
91 | 91 | password: ${{ secrets.GITHUB_TOKEN }}
|
92 |
| -# - name: Login to internal Container Registry |
93 |
| -# uses: docker/login-action@v2.1.0 |
94 |
| -# with: |
95 |
| -# username: ${{ secrets.TAILSCALE_DOCKER_USERNAME }} |
96 |
| -# password: ${{ secrets.TAILSCALE_DOCKER_PASSWORD }} |
97 |
| -# registry: registry.internal.huggingface.tech |
| 92 | + - name: Login to internal Container Registry |
| 93 | + uses: docker/login-action@v2.1.0 |
| 94 | + with: |
| 95 | + username: ${{ secrets.TAILSCALE_DOCKER_USERNAME }} |
| 96 | + password: ${{ secrets.TAILSCALE_DOCKER_PASSWORD }} |
| 97 | + registry: registry.internal.huggingface.tech |
98 | 98 | - name: Extract metadata (tags, labels) for Docker
|
99 | 99 | id: meta-75
|
100 | 100 | uses: docker/metadata-action@v4.3.0
|
101 | 101 | with:
|
102 |
| - flavor: | |
103 |
| - latest=auto |
104 | 102 | images: |
|
| 103 | + registry.internal.huggingface.tech/api-inference/text-embeddings-inference |
105 | 104 | ghcr.io/huggingface/text-embeddings-inference
|
106 | 105 | tags: |
|
107 | 106 | type=semver,pattern=turing-{{version}}
|
|
112 | 111 | id: meta-80
|
113 | 112 | uses: docker/metadata-action@v4.3.0
|
114 | 113 | with:
|
115 |
| - flavor: | |
116 |
| - latest=auto |
117 | 114 | images: |
|
| 115 | + registry.internal.huggingface.tech/api-inference/text-embeddings-inference |
118 | 116 | ghcr.io/huggingface/text-embeddings-inference
|
119 | 117 | tags: |
|
120 | 118 | type=semver,pattern={{version}}
|
|
125 | 123 | id: meta-86
|
126 | 124 | uses: docker/metadata-action@v4.3.0
|
127 | 125 | with:
|
128 |
| - flavor: | |
129 |
| - latest=auto |
130 | 126 | images: |
|
| 127 | + registry.internal.huggingface.tech/api-inference/text-embeddings-inference |
131 | 128 | ghcr.io/huggingface/text-embeddings-inference
|
132 | 129 | tags: |
|
133 | 130 | type=semver,pattern=86-{{version}}
|
|
138 | 135 | id: meta-90
|
139 | 136 | uses: docker/metadata-action@v4.3.0
|
140 | 137 | with:
|
141 |
| - flavor: | |
142 |
| - latest=auto |
143 | 138 | images: |
|
| 139 | + registry.internal.huggingface.tech/api-inference/text-embeddings-inference |
144 | 140 | ghcr.io/huggingface/text-embeddings-inference
|
145 | 141 | tags: |
|
146 | 142 | type=semver,pattern=hopper-{{version}}
|
|
151 | 147 | id: meta-cpu
|
152 | 148 | uses: docker/metadata-action@v4.3.0
|
153 | 149 | with:
|
154 |
| - flavor: | |
155 |
| - latest=auto |
156 | 150 | images: |
|
| 151 | + registry.internal.huggingface.tech/api-inference/text-embeddings-inference |
157 | 152 | ghcr.io/huggingface/text-embeddings-inference
|
158 | 153 | tags: |
|
159 | 154 | type=semver,pattern=cpu-{{version}}
|
|
174 | 169 | DOCKER_LABEL=sha-${{ env.GITHUB_SHA_SHORT }}
|
175 | 170 | tags: ${{ steps.meta-75.outputs.tags }}
|
176 | 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 |
177 | 174 | - name: Build and push Docker image
|
178 | 175 | id: build-and-push-80
|
179 | 176 | uses: docker/build-push-action@v4
|
|
188 | 185 | DOCKER_LABEL=sha-${{ env.GITHUB_SHA_SHORT }}
|
189 | 186 | tags: ${{ steps.meta-80.outputs.tags }}
|
190 | 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 |
191 | 190 | - name: Build and push Docker image
|
192 | 191 | id: build-and-push-86
|
193 | 192 | uses: docker/build-push-action@v4
|
|
202 | 201 | DOCKER_LABEL=sha-${{ env.GITHUB_SHA_SHORT }}
|
203 | 202 | tags: ${{ steps.meta-86.outputs.tags }}
|
204 | 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 |
205 | 206 | - name: Build and push Docker image
|
206 | 207 | id: build-and-push-90
|
207 | 208 | uses: docker/build-push-action@v4
|
|
216 | 217 | DOCKER_LABEL=sha-${{ env.GITHUB_SHA_SHORT }}
|
217 | 218 | tags: ${{ steps.meta-90.outputs.tags }}
|
218 | 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 |
219 | 222 | - name: Build and push Docker image
|
220 | 223 | id: build-and-push-cpu
|
221 | 224 | uses: docker/build-push-action@v4
|
|
229 | 232 | DOCKER_LABEL=sha-${{ env.GITHUB_SHA_SHORT }}
|
230 | 233 | tags: ${{ steps.meta-cpu.outputs.tags }}
|
231 | 234 | 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 |
232 | 237 |
|
233 | 238 | stop-runner:
|
234 | 239 | name: Stop self-hosted EC2 runner
|
|
0 commit comments