|
25 | 25 | - name: Checkout repository
|
26 | 26 | uses: actions/checkout@v3
|
27 | 27 |
|
28 |
| - - name: Tailscale |
29 |
| - uses: huggingface/tailscale-action@v1 |
30 |
| - with: |
31 |
| - authkey: ${{ secrets.TAILSCALE_AUTHKEY }} |
32 |
| - |
33 | 28 | - name: Initialize Docker Buildx
|
34 | 29 | uses: docker/setup-buildx-action@v2.0.0
|
35 | 30 | with:
|
|
49 | 44 | username: ${{ github.actor }}
|
50 | 45 | password: ${{ secrets.GITHUB_TOKEN }}
|
51 | 46 |
|
52 |
| - - name: Login to internal Container Registry |
53 |
| - uses: docker/login-action@v2.1.0 |
54 |
| - with: |
55 |
| - username: ${{ secrets.TAILSCALE_DOCKER_USERNAME }} |
56 |
| - password: ${{ secrets.TAILSCALE_DOCKER_PASSWORD }} |
57 |
| - registry: registry.internal.huggingface.tech |
58 |
| - |
59 | 47 | - name: Extract metadata (tags, labels) for Docker
|
60 | 48 | id: meta
|
61 | 49 | uses: docker/metadata-action@v4.3.0
|
62 | 50 | with:
|
63 | 51 | images: |
|
64 |
| - registry.internal.huggingface.tech/api-inference/text-embeddings-inference |
| 52 | + registry-push.github-runners.huggingface.tech/api-inference/text-embeddings-inference |
65 | 53 | ghcr.io/huggingface/text-embeddings-inference
|
66 | 54 | flavor: |
|
67 | 55 | latest=false
|
|
84 | 72 | DOCKER_LABEL=sha-${{ env.GITHUB_SHA_SHORT }}
|
85 | 73 | tags: ${{ steps.meta.outputs.tags }}
|
86 | 74 | labels: ${{ steps.meta.outputs.labels }}
|
87 |
| - cache-from: type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-all,mode=max |
88 |
| - cache-to: type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-all,mode=max |
89 |
| - |
90 |
| - - name: Extract metadata (tags, labels) for Docker |
91 |
| - id: meta-sagemaker |
92 |
| - uses: docker/metadata-action@v4.3.0 |
93 |
| - with: |
94 |
| - images: | |
95 |
| - registry.internal.huggingface.tech/api-inference/text-embeddings-inference/sagemaker |
96 |
| - flavor: | |
97 |
| - latest=false |
98 |
| - tags: | |
99 |
| - type=semver,pattern=cuda-{{version}} |
100 |
| - type=semver,pattern=cuda-{{major}}.{{minor}} |
101 |
| - type=raw,value=cuda-latest,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }} |
102 |
| - type=raw,value=cuda-sha-${{ env.GITHUB_SHA_SHORT }} |
103 |
| -
|
104 |
| - - name: Build and push Docker image |
105 |
| - id: build-and-push-sagemaker |
106 |
| - uses: docker/build-push-action@v4 |
107 |
| - with: |
108 |
| - context: . |
109 |
| - file: Dockerfile-cuda-all |
110 |
| - push: ${{ github.event_name != 'pull_request' }} |
111 |
| - platforms: 'linux/amd64' |
112 |
| - target: sagemaker |
113 |
| - build-args: | |
114 |
| - GIT_SHA=${{ env.GITHUB_SHA }} |
115 |
| - DOCKER_LABEL=sha-${{ env.GITHUB_SHA_SHORT }} |
116 |
| - tags: ${{ steps.meta-sagemaker.outputs.tags }} |
117 |
| - labels: ${{ steps.meta-sagemaker.outputs.labels }} |
118 |
| - cache-from: type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-all,mode=max |
119 |
| - cache-to: type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-all,mode=max |
| 75 | + cache-from: type=s3,region=us-east-1,bucket=ci-docker-buildx-cache,name=text-embeddings-inference-cache-all,access_key_id=${{ secrets.S3_CI_DOCKER_BUILDX_CACHE_ACCESS_KEY_ID }},secret_access_key=${{ secrets.S3_CI_DOCKER_BUILDX_CACHE_SECRET_ACCESS_KEY }},mode=max |
| 76 | + cache-to: type=s3,region=us-east-1,bucket=ci-docker-buildx-cache,name=text-embeddings-inference-cache-all,access_key_id=${{ secrets.S3_CI_DOCKER_BUILDX_CACHE_ACCESS_KEY_ID }},secret_access_key=${{ secrets.S3_CI_DOCKER_BUILDX_CACHE_SECRET_ACCESS_KEY }},mode=max |
0 commit comments