Skip to content

Commit

Permalink
fix all workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
fxmarty committed Jun 20, 2024
1 parent 60824ef commit 6ea0923
Show file tree
Hide file tree
Showing 6 changed files with 97 additions and 21 deletions.
21 changes: 17 additions & 4 deletions .github/workflows/build_75.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,35 +24,45 @@
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Tailscale
uses: huggingface/tailscale-action@main
with:
authkey: ${{ secrets.TAILSCALE_AUTHKEY }}

- name: Initialize Docker Buildx
uses: docker/[email protected]
with:
install: true
config-inline: |
[registry."docker.io"]
mirrors = ["registry.github-runners.huggingface.tech"]
- name: Configure sccache
uses: actions/github-script@v6
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Inject slug/short variables
uses: rlespinasse/[email protected]
- name: Tailscale
uses: huggingface/tailscale-action@main
with:
authkey: ${{ secrets.TAILSCALE_AUTHKEY }}

- name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Login to internal Container Registry
uses: docker/[email protected]
with:
username: ${{ secrets.TAILSCALE_DOCKER_USERNAME }}
password: ${{ secrets.TAILSCALE_DOCKER_PASSWORD }}
registry: registry.internal.huggingface.tech

- name: Extract metadata (tags, labels) for Docker
id: meta-75
uses: docker/[email protected]
Expand All @@ -67,6 +77,7 @@
type=semver,pattern=turing-{{major}}.{{minor}}
type=raw,value=turing-latest
type=raw,value=turing-sha-${{ env.GITHUB_SHA_SHORT }}
- name: Build and push Docker image
id: build-and-push-75
uses: docker/build-push-action@v4
Expand All @@ -87,6 +98,7 @@
labels: ${{ steps.meta-75.outputs.labels }}
cache-from: type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-75,mode=max
cache-to: type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-75,mode=max

- name: Extract metadata (tags, labels) for Docker
id: meta-75-grpc
uses: docker/[email protected]
Expand All @@ -101,6 +113,7 @@
type=semver,pattern=turing-{{major}}.{{minor}}-grpc
type=raw,value=turing-latest-grpc
type=raw,value=turing-sha-${{ env.GITHUB_SHA_SHORT }}-grpc
- name: Build and push Docker image
id: build-and-push-75-grpc
uses: docker/build-push-action@v4
Expand Down
21 changes: 17 additions & 4 deletions .github/workflows/build_86.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,35 +24,45 @@
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Tailscale
uses: huggingface/tailscale-action@main
with:
authkey: ${{ secrets.TAILSCALE_AUTHKEY }}

- name: Initialize Docker Buildx
uses: docker/[email protected]
with:
install: true
config-inline: |
[registry."docker.io"]
mirrors = ["registry.github-runners.huggingface.tech"]
- name: Configure sccache
uses: actions/github-script@v6
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Inject slug/short variables
uses: rlespinasse/[email protected]
- name: Tailscale
uses: huggingface/tailscale-action@main
with:
authkey: ${{ secrets.TAILSCALE_AUTHKEY }}

- name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Login to internal Container Registry
uses: docker/[email protected]
with:
username: ${{ secrets.TAILSCALE_DOCKER_USERNAME }}
password: ${{ secrets.TAILSCALE_DOCKER_PASSWORD }}
registry: registry.internal.huggingface.tech

- name: Extract metadata (tags, labels) for Docker
id: meta-86
uses: docker/[email protected]
Expand All @@ -67,6 +77,7 @@
type=semver,pattern=86-{{major}}.{{minor}}
type=raw,value=86-latest,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
type=raw,value=86-sha-${{ env.GITHUB_SHA_SHORT }}
- name: Build and push Docker image
id: build-and-push-86
uses: docker/build-push-action@v4
Expand All @@ -86,6 +97,7 @@
labels: ${{ steps.meta-86.outputs.labels }}
cache-from: type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-86,mode=max
cache-to: type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-86,mode=max

- name: Extract metadata (tags, labels) for Docker
id: meta-86-grpc
uses: docker/[email protected]
Expand All @@ -100,6 +112,7 @@
type=semver,pattern=86-{{major}}.{{minor}}-grpc
type=raw,value=86-latest-grpc
type=raw,value=86-sha-${{ env.GITHUB_SHA_SHORT }}-grpc
- name: Build and push Docker image
id: build-and-push-86-grpc
uses: docker/build-push-action@v4
Expand Down
21 changes: 17 additions & 4 deletions .github/workflows/build_89.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,35 +24,45 @@
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Tailscale
uses: huggingface/tailscale-action@main
with:
authkey: ${{ secrets.TAILSCALE_AUTHKEY }}

- name: Initialize Docker Buildx
uses: docker/[email protected]
with:
install: true
config-inline: |
[registry."docker.io"]
mirrors = ["registry.github-runners.huggingface.tech"]
- name: Configure sccache
uses: actions/github-script@v6
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Inject slug/short variables
uses: rlespinasse/[email protected]
- name: Tailscale
uses: huggingface/tailscale-action@main
with:
authkey: ${{ secrets.TAILSCALE_AUTHKEY }}

- name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Login to internal Container Registry
uses: docker/[email protected]
with:
username: ${{ secrets.TAILSCALE_DOCKER_USERNAME }}
password: ${{ secrets.TAILSCALE_DOCKER_PASSWORD }}
registry: registry.internal.huggingface.tech

- name: Extract metadata (tags, labels) for Docker
id: meta-89
uses: docker/[email protected]
Expand All @@ -67,6 +77,7 @@
type=semver,pattern=89-{{major}}.{{minor}}
type=raw,value=89-latest,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
type=raw,value=89-sha-${{ env.GITHUB_SHA_SHORT }}
- name: Build and push Docker image
id: build-and-push-89
uses: docker/build-push-action@v4
Expand All @@ -86,6 +97,7 @@
labels: ${{ steps.meta-89.outputs.labels }}
cache-from: type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-89,mode=max
cache-to: type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-89,mode=max

- name: Extract metadata (tags, labels) for Docker
id: meta-89-grpc
uses: docker/[email protected]
Expand All @@ -100,6 +112,7 @@
type=semver,pattern=89-{{major}}.{{minor}}-grpc
type=raw,value=89-latest-grpc
type=raw,value=89-sha-${{ env.GITHUB_SHA_SHORT }}-grpc
- name: Build and push Docker image
id: build-and-push-89-grpc
uses: docker/build-push-action@v4
Expand Down
21 changes: 17 additions & 4 deletions .github/workflows/build_90.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,35 +24,45 @@
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Tailscale
uses: huggingface/tailscale-action@main
with:
authkey: ${{ secrets.TAILSCALE_AUTHKEY }}

- name: Initialize Docker Buildx
uses: docker/[email protected]
with:
install: true
config-inline: |
[registry."docker.io"]
mirrors = ["registry.github-runners.huggingface.tech"]
- name: Configure sccache
uses: actions/github-script@v6
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Inject slug/short variables
uses: rlespinasse/[email protected]
- name: Tailscale
uses: huggingface/tailscale-action@main
with:
authkey: ${{ secrets.TAILSCALE_AUTHKEY }}

- name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Login to internal Container Registry
uses: docker/[email protected]
with:
username: ${{ secrets.TAILSCALE_DOCKER_USERNAME }}
password: ${{ secrets.TAILSCALE_DOCKER_PASSWORD }}
registry: registry.internal.huggingface.tech

- name: Extract metadata (tags, labels) for Docker
id: meta-90
uses: docker/[email protected]
Expand All @@ -67,6 +77,7 @@
type=semver,pattern=hopper-{{major}}.{{minor}}
type=raw,value=hopper-latest,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
type=raw,value=hopper-sha-${{ env.GITHUB_SHA_SHORT }}
- name: Build and push Docker image
id: build-and-push-90
uses: docker/build-push-action@v4
Expand All @@ -86,6 +97,7 @@
labels: ${{ steps.meta-90.outputs.labels }}
cache-from: type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-90,mode=max
cache-to: type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-90,mode=max

- name: Extract metadata (tags, labels) for Docker
id: meta-90-grpc
uses: docker/[email protected]
Expand All @@ -100,6 +112,7 @@
type=semver,pattern=hopper-{{major}}.{{minor}}-grpc
type=raw,value=hopper-latest-grpc
type=raw,value=hopper-sha-${{ env.GITHUB_SHA_SHORT }}-grpc
- name: Build and push Docker image
id: build-and-push-90-grpc
uses: docker/build-push-action@v4
Expand Down
20 changes: 16 additions & 4 deletions .github/workflows/build_all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,29 +24,38 @@
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Tailscale
uses: huggingface/tailscale-action@v1
with:
authkey: ${{ secrets.TAILSCALE_AUTHKEY }}

- name: Initialize Docker Buildx
uses: docker/[email protected]
with:
install: true
config-inline: |
[registry."docker.io"]
mirrors = ["registry.github-runners.huggingface.tech"]
- name: Inject slug/short variables
uses: rlespinasse/[email protected]
- name: Tailscale
uses: huggingface/tailscale-action@v1
with:
authkey: ${{ secrets.TAILSCALE_AUTHKEY }}

- name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Login to internal Container Registry
uses: docker/[email protected]
with:
username: ${{ secrets.TAILSCALE_DOCKER_USERNAME }}
password: ${{ secrets.TAILSCALE_DOCKER_PASSWORD }}
registry: registry.internal.huggingface.tech

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/[email protected]
Expand All @@ -61,6 +70,7 @@
type=semver,pattern=cuda-{{major}}.{{minor}}
type=raw,value=cuda-latest,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
type=raw,value=cuda-sha-${{ env.GITHUB_SHA_SHORT }}
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v4
Expand All @@ -76,6 +86,7 @@
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-all,mode=max
cache-to: type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-all,mode=max

- name: Extract metadata (tags, labels) for Docker
id: meta-sagemaker
uses: docker/[email protected]
Expand All @@ -89,6 +100,7 @@
type=semver,pattern=cuda-{{major}}.{{minor}}
type=raw,value=cuda-latest,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
type=raw,value=cuda-sha-${{ env.GITHUB_SHA_SHORT }}
- name: Build and push Docker image
id: build-and-push-sagemaker
uses: docker/build-push-action@v4
Expand Down
Loading

0 comments on commit 6ea0923

Please sign in to comment.