Skip to content

Commit

Permalink
ci: build on fork
Browse files Browse the repository at this point in the history
  • Loading branch information
jcudit committed Sep 13, 2024
1 parent 80cd82e commit 1e09702
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 38 deletions.
28 changes: 3 additions & 25 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ jobs:
concurrency:
group: ${{ github.workflow }}-${{ github.job }}-${{matrix.name}}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
runs-on:
group: aws-highmemory-32-plus-priv
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
Expand All @@ -61,26 +60,10 @@ jobs:
uses: docker/setup-buildx-action@v3
with:
install: true
buildkitd-config: /tmp/buildkitd.toml

- 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/github-slug-action@v4

- name: Login to internal Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
registry: registry.internal.huggingface.tech

- name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
Expand All @@ -94,8 +77,7 @@ jobs:
uses: docker/metadata-action@v5
with:
images: |
registry.internal.huggingface.tech/api-inference/text-embeddings-inference
ghcr.io/huggingface/text-embeddings-inference
ghcr.io/jcudit/text-embeddings-inference
flavor: |
latest=false
tags: |
Expand All @@ -122,16 +104,13 @@ jobs:
${{matrix.extraBuildArgs}}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=s3,region=us-east-1,bucket=ci-docker-buildx-cache,name=text-embeddings-inference-cache-${{matrix.name}},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
cache-to: type=s3,region=us-east-1,bucket=ci-docker-buildx-cache,name=text-embeddings-inference-cache-${{matrix.name}},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

- name: Extract metadata (tags, labels) for Docker
id: meta-grpc
uses: docker/metadata-action@v5
with:
images: |
registry.internal.huggingface.tech/api-inference/text-embeddings-inference
ghcr.io/huggingface/text-embeddings-inference
ghcr.io/jcudit/text-embeddings-inference
flavor: |
latest=false
tags: |
Expand Down Expand Up @@ -159,4 +138,3 @@ jobs:
${{matrix.extraBuildArgs}}
tags: ${{ steps.meta-grpc.outputs.tags }}
labels: ${{ steps.meta-grpc.outputs.labels }}
cache-from: type=s3,region=us-east-1,bucket=ci-docker-buildx-cache,name=text-embeddings-inference-cache-${{matrix.name}},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
26 changes: 13 additions & 13 deletions .github/workflows/matrix.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,56 +2,56 @@
{
"name": "turing",
"imageNamePrefix": "turing-",
"runOn": "main",
"sccache": true,
"runOn": "disabled",
"sccache": false,
"cudaComputeCap": 75,
"extraBuildArgs": "DEFAULT_USE_FLASH_ATTENTION=False",
"dockerfile": "Dockerfile-cuda"
},
{
"name": "ampere",
"imageNamePrefix": "",
"runOn": "always",
"sccache": true,
"runOn": "main",
"sccache": false,
"cudaComputeCap": 80,
"dockerfile": "Dockerfile-cuda"
},
{
"name": "a10",
"imageNamePrefix": "86-",
"runOn": "main",
"sccache": true,
"runOn": "disable",
"sccache": false,
"cudaComputeCap": 86,
"dockerfile": "Dockerfile-cuda"
},
{
"name": "RTX 4000",
"imageNamePrefix": "89-",
"runOn": "main",
"sccache": true,
"runOn": "disable",
"sccache": false,
"cudaComputeCap": 89,
"dockerfile": "Dockerfile-cuda"
},
{
"name": "Hopper",
"imageNamePrefix": "hopper-",
"runOn": "main",
"sccache": true,
"runOn": "disable",
"sccache": false,
"cudaComputeCap": 90,
"dockerfile": "Dockerfile-cuda"
},
{
"name": "All",
"imageNamePrefix": "cuda-",
"runOn": "main",
"runOn": "disable",
"sccache": false,
"dockerfile": "Dockerfile-cuda-all"
},
{
"name": "cpu",
"imageNamePrefix": "cpu-",
"runOn": "main",
"sccache": true,
"runOn": "disabled",
"sccache": false,
"dockerfile": "Dockerfile"
}
]

0 comments on commit 1e09702

Please sign in to comment.