Skip to content

Commit ddaf53e

Browse files
authored
ci: Migrate to new Runners (#74)
1 parent 2b4b5d2 commit ddaf53e

File tree

5 files changed

+5
-304
lines changed

5 files changed

+5
-304
lines changed

.github/workflows/build_75.yaml

Lines changed: 1 addition & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -21,47 +21,11 @@
2121
- 'main'
2222

2323
jobs:
24-
start-runner:
25-
name: Start self-hosted EC2 runner
26-
runs-on: ubuntu-latest
27-
env:
28-
AWS_REGION: us-east-1
29-
EC2_AMI_ID: ami-03cfed9ea28f4b002
30-
EC2_INSTANCE_TYPE: r5.8xlarge
31-
EC2_SUBNET_ID: subnet-931b34f5,subnet-ecb993cd,subnet-943dc2d8,subnet-45371f1a,subnet-ee93e0df,subnet-fddc3dfc
32-
EC2_SECURITY_GROUP: sg-030175c435ac141d6
33-
outputs:
34-
label: ${{ steps.start-ec2-runner.outputs.label }}
35-
ec2-instance-id: ${{ steps.start-ec2-runner.outputs.ec2-instance-id }}
36-
steps:
37-
- name: Configure AWS credentials
38-
uses: aws-actions/configure-aws-credentials@v1
39-
with:
40-
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
41-
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
42-
aws-region: ${{ env.AWS_REGION }}
43-
- name: Start EC2 runner
44-
id: start-ec2-runner
45-
uses: philschmid/philschmid-ec2-github-runner@main
46-
with:
47-
mode: start
48-
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
49-
ec2-image-id: ${{ env.EC2_AMI_ID }}
50-
ec2-instance-type: ${{ env.EC2_INSTANCE_TYPE }}
51-
subnet-id: ${{ env.EC2_SUBNET_ID }}
52-
security-group-id: ${{ env.EC2_SECURITY_GROUP }}
53-
aws-resource-tags: > # optional, requires additional permissions
54-
[
55-
{"Key": "Name", "Value": "ec2-tei-github-runner"},
56-
{"Key": "GitHubRepository", "Value": "${{ github.repository }}"}
57-
]
58-
5924
build-and-push-image:
6025
concurrency:
6126
group: ${{ github.workflow }}-${{ github.job }}-75-${{ github.head_ref || github.run_id }}
6227
cancel-in-progress: true
63-
needs: start-runner # required to start the main job when the runner is ready
64-
runs-on: ${{ needs.start-runner.outputs.label }} # run the job on the newly created runner
28+
runs-on: [self-hosted, intel-cpu, 32-cpu, tgi-ci]
6529
permissions:
6630
contents: write
6731
packages: write
@@ -135,27 +99,3 @@
13599
labels: ${{ steps.meta-75.outputs.labels }}
136100
cache-from: type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-75,mode=max
137101
cache-to: type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-75,mode=max
138-
139-
stop-runner:
140-
name: Stop self-hosted EC2 runner
141-
needs:
142-
- start-runner
143-
- build-and-push-image
144-
runs-on: ubuntu-latest
145-
env:
146-
AWS_REGION: us-east-1
147-
if: ${{ always() }} # required to stop the runner even if the error happened in the previous jobs
148-
steps:
149-
- name: Configure AWS credentials
150-
uses: aws-actions/configure-aws-credentials@v1
151-
with:
152-
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
153-
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
154-
aws-region: ${{ env.AWS_REGION }}
155-
- name: Stop EC2 runner
156-
uses: philschmid/philschmid-ec2-github-runner@main
157-
with:
158-
mode: stop
159-
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
160-
label: ${{ needs.start-runner.outputs.label }}
161-
ec2-instance-id: ${{ needs.start-runner.outputs.ec2-instance-id }}

.github/workflows/build_80.yaml

Lines changed: 1 addition & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -21,47 +21,11 @@
2121
- 'main'
2222

2323
jobs:
24-
start-runner:
25-
name: Start self-hosted EC2 runner
26-
runs-on: ubuntu-latest
27-
env:
28-
AWS_REGION: us-east-1
29-
EC2_AMI_ID: ami-03cfed9ea28f4b002
30-
EC2_INSTANCE_TYPE: r5.8xlarge
31-
EC2_SUBNET_ID: subnet-931b34f5,subnet-ecb993cd,subnet-943dc2d8,subnet-45371f1a,subnet-ee93e0df,subnet-fddc3dfc
32-
EC2_SECURITY_GROUP: sg-030175c435ac141d6
33-
outputs:
34-
label: ${{ steps.start-ec2-runner.outputs.label }}
35-
ec2-instance-id: ${{ steps.start-ec2-runner.outputs.ec2-instance-id }}
36-
steps:
37-
- name: Configure AWS credentials
38-
uses: aws-actions/configure-aws-credentials@v1
39-
with:
40-
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
41-
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
42-
aws-region: ${{ env.AWS_REGION }}
43-
- name: Start EC2 runner
44-
id: start-ec2-runner
45-
uses: philschmid/philschmid-ec2-github-runner@main
46-
with:
47-
mode: start
48-
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
49-
ec2-image-id: ${{ env.EC2_AMI_ID }}
50-
ec2-instance-type: ${{ env.EC2_INSTANCE_TYPE }}
51-
subnet-id: ${{ env.EC2_SUBNET_ID }}
52-
security-group-id: ${{ env.EC2_SECURITY_GROUP }}
53-
aws-resource-tags: > # optional, requires additional permissions
54-
[
55-
{"Key": "Name", "Value": "ec2-tei-github-runner"},
56-
{"Key": "GitHubRepository", "Value": "${{ github.repository }}"}
57-
]
58-
5924
build-and-push-image:
6025
concurrency:
6126
group: ${{ github.workflow }}-${{ github.job }}-80-${{ github.head_ref || github.run_id }}
6227
cancel-in-progress: true
63-
needs: start-runner # required to start the main job when the runner is ready
64-
runs-on: ${{ needs.start-runner.outputs.label }} # run the job on the newly created runner
28+
runs-on: [self-hosted, intel-cpu, 32-cpu, tgi-ci]
6529
permissions:
6630
contents: write
6731
packages: write
@@ -134,27 +98,3 @@
13498
labels: ${{ steps.meta-80.outputs.labels }}
13599
cache-from: type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-80,mode=max
136100
cache-to: type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-80,mode=max
137-
138-
stop-runner:
139-
name: Stop self-hosted EC2 runner
140-
needs:
141-
- start-runner
142-
- build-and-push-image
143-
runs-on: ubuntu-latest
144-
env:
145-
AWS_REGION: us-east-1
146-
if: ${{ always() }} # required to stop the runner even if the error happened in the previous jobs
147-
steps:
148-
- name: Configure AWS credentials
149-
uses: aws-actions/configure-aws-credentials@v1
150-
with:
151-
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
152-
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
153-
aws-region: ${{ env.AWS_REGION }}
154-
- name: Stop EC2 runner
155-
uses: philschmid/philschmid-ec2-github-runner@main
156-
with:
157-
mode: stop
158-
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
159-
label: ${{ needs.start-runner.outputs.label }}
160-
ec2-instance-id: ${{ needs.start-runner.outputs.ec2-instance-id }}

.github/workflows/build_86.yaml

Lines changed: 1 addition & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -21,47 +21,11 @@
2121
- 'main'
2222

2323
jobs:
24-
start-runner:
25-
name: Start self-hosted EC2 runner
26-
runs-on: ubuntu-latest
27-
env:
28-
AWS_REGION: us-east-1
29-
EC2_AMI_ID: ami-03cfed9ea28f4b002
30-
EC2_INSTANCE_TYPE: r5.8xlarge
31-
EC2_SUBNET_ID: subnet-931b34f5,subnet-ecb993cd,subnet-943dc2d8,subnet-45371f1a,subnet-ee93e0df,subnet-fddc3dfc
32-
EC2_SECURITY_GROUP: sg-030175c435ac141d6
33-
outputs:
34-
label: ${{ steps.start-ec2-runner.outputs.label }}
35-
ec2-instance-id: ${{ steps.start-ec2-runner.outputs.ec2-instance-id }}
36-
steps:
37-
- name: Configure AWS credentials
38-
uses: aws-actions/configure-aws-credentials@v1
39-
with:
40-
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
41-
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
42-
aws-region: ${{ env.AWS_REGION }}
43-
- name: Start EC2 runner
44-
id: start-ec2-runner
45-
uses: philschmid/philschmid-ec2-github-runner@main
46-
with:
47-
mode: start
48-
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
49-
ec2-image-id: ${{ env.EC2_AMI_ID }}
50-
ec2-instance-type: ${{ env.EC2_INSTANCE_TYPE }}
51-
subnet-id: ${{ env.EC2_SUBNET_ID }}
52-
security-group-id: ${{ env.EC2_SECURITY_GROUP }}
53-
aws-resource-tags: > # optional, requires additional permissions
54-
[
55-
{"Key": "Name", "Value": "ec2-tei-github-runner"},
56-
{"Key": "GitHubRepository", "Value": "${{ github.repository }}"}
57-
]
58-
5924
build-and-push-image:
6025
concurrency:
6126
group: ${{ github.workflow }}-${{ github.job }}-86-${{ github.head_ref || github.run_id }}
6227
cancel-in-progress: true
63-
needs: start-runner # required to start the main job when the runner is ready
64-
runs-on: ${{ needs.start-runner.outputs.label }} # run the job on the newly created runner
28+
runs-on: [self-hosted, intel-cpu, 32-cpu, tgi-ci]
6529
permissions:
6630
contents: write
6731
packages: write
@@ -134,27 +98,3 @@
13498
labels: ${{ steps.meta-86.outputs.labels }}
13599
cache-from: type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-86,mode=max
136100
cache-to: type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-86,mode=max
137-
138-
stop-runner:
139-
name: Stop self-hosted EC2 runner
140-
needs:
141-
- start-runner
142-
- build-and-push-image
143-
runs-on: ubuntu-latest
144-
env:
145-
AWS_REGION: us-east-1
146-
if: ${{ always() }} # required to stop the runner even if the error happened in the previous jobs
147-
steps:
148-
- name: Configure AWS credentials
149-
uses: aws-actions/configure-aws-credentials@v1
150-
with:
151-
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
152-
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
153-
aws-region: ${{ env.AWS_REGION }}
154-
- name: Stop EC2 runner
155-
uses: philschmid/philschmid-ec2-github-runner@main
156-
with:
157-
mode: stop
158-
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
159-
label: ${{ needs.start-runner.outputs.label }}
160-
ec2-instance-id: ${{ needs.start-runner.outputs.ec2-instance-id }}

.github/workflows/build_89.yaml

Lines changed: 1 addition & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -21,47 +21,11 @@
2121
- 'main'
2222

2323
jobs:
24-
start-runner:
25-
name: Start self-hosted EC2 runner
26-
runs-on: ubuntu-latest
27-
env:
28-
AWS_REGION: us-east-1
29-
EC2_AMI_ID: ami-03cfed9ea28f4b002
30-
EC2_INSTANCE_TYPE: r5.8xlarge
31-
EC2_SUBNET_ID: subnet-931b34f5,subnet-ecb993cd,subnet-943dc2d8,subnet-45371f1a,subnet-ee93e0df,subnet-fddc3dfc
32-
EC2_SECURITY_GROUP: sg-030175c435ac141d6
33-
outputs:
34-
label: ${{ steps.start-ec2-runner.outputs.label }}
35-
ec2-instance-id: ${{ steps.start-ec2-runner.outputs.ec2-instance-id }}
36-
steps:
37-
- name: Configure AWS credentials
38-
uses: aws-actions/configure-aws-credentials@v1
39-
with:
40-
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
41-
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
42-
aws-region: ${{ env.AWS_REGION }}
43-
- name: Start EC2 runner
44-
id: start-ec2-runner
45-
uses: philschmid/philschmid-ec2-github-runner@main
46-
with:
47-
mode: start
48-
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
49-
ec2-image-id: ${{ env.EC2_AMI_ID }}
50-
ec2-instance-type: ${{ env.EC2_INSTANCE_TYPE }}
51-
subnet-id: ${{ env.EC2_SUBNET_ID }}
52-
security-group-id: ${{ env.EC2_SECURITY_GROUP }}
53-
aws-resource-tags: > # optional, requires additional permissions
54-
[
55-
{"Key": "Name", "Value": "ec2-tei-github-runner"},
56-
{"Key": "GitHubRepository", "Value": "${{ github.repository }}"}
57-
]
58-
5924
build-and-push-image:
6025
concurrency:
6126
group: ${{ github.workflow }}-${{ github.job }}-89-${{ github.head_ref || github.run_id }}
6227
cancel-in-progress: true
63-
needs: start-runner # required to start the main job when the runner is ready
64-
runs-on: ${{ needs.start-runner.outputs.label }} # run the job on the newly created runner
28+
runs-on: [self-hosted, intel-cpu, 32-cpu, tgi-ci]
6529
permissions:
6630
contents: write
6731
packages: write
@@ -134,27 +98,3 @@
13498
labels: ${{ steps.meta-89.outputs.labels }}
13599
cache-from: type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-89,mode=max
136100
cache-to: type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-89,mode=max
137-
138-
stop-runner:
139-
name: Stop self-hosted EC2 runner
140-
needs:
141-
- start-runner
142-
- build-and-push-image
143-
runs-on: ubuntu-latest
144-
env:
145-
AWS_REGION: us-east-1
146-
if: ${{ always() }} # required to stop the runner even if the error happened in the previous jobs
147-
steps:
148-
- name: Configure AWS credentials
149-
uses: aws-actions/configure-aws-credentials@v1
150-
with:
151-
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
152-
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
153-
aws-region: ${{ env.AWS_REGION }}
154-
- name: Stop EC2 runner
155-
uses: philschmid/philschmid-ec2-github-runner@main
156-
with:
157-
mode: stop
158-
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
159-
label: ${{ needs.start-runner.outputs.label }}
160-
ec2-instance-id: ${{ needs.start-runner.outputs.ec2-instance-id }}

.github/workflows/build_90.yaml

Lines changed: 1 addition & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -21,47 +21,11 @@
2121
- 'main'
2222

2323
jobs:
24-
start-runner:
25-
name: Start self-hosted EC2 runner
26-
runs-on: ubuntu-latest
27-
env:
28-
AWS_REGION: us-east-1
29-
EC2_AMI_ID: ami-03cfed9ea28f4b002
30-
EC2_INSTANCE_TYPE: r5.8xlarge
31-
EC2_SUBNET_ID: subnet-931b34f5,subnet-ecb993cd,subnet-943dc2d8,subnet-45371f1a,subnet-ee93e0df,subnet-fddc3dfc
32-
EC2_SECURITY_GROUP: sg-030175c435ac141d6
33-
outputs:
34-
label: ${{ steps.start-ec2-runner.outputs.label }}
35-
ec2-instance-id: ${{ steps.start-ec2-runner.outputs.ec2-instance-id }}
36-
steps:
37-
- name: Configure AWS credentials
38-
uses: aws-actions/configure-aws-credentials@v1
39-
with:
40-
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
41-
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
42-
aws-region: ${{ env.AWS_REGION }}
43-
- name: Start EC2 runner
44-
id: start-ec2-runner
45-
uses: philschmid/philschmid-ec2-github-runner@main
46-
with:
47-
mode: start
48-
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
49-
ec2-image-id: ${{ env.EC2_AMI_ID }}
50-
ec2-instance-type: ${{ env.EC2_INSTANCE_TYPE }}
51-
subnet-id: ${{ env.EC2_SUBNET_ID }}
52-
security-group-id: ${{ env.EC2_SECURITY_GROUP }}
53-
aws-resource-tags: > # optional, requires additional permissions
54-
[
55-
{"Key": "Name", "Value": "ec2-tei-github-runner"},
56-
{"Key": "GitHubRepository", "Value": "${{ github.repository }}"}
57-
]
58-
5924
build-and-push-image:
6025
concurrency:
6126
group: ${{ github.workflow }}-${{ github.job }}-90-${{ github.head_ref || github.run_id }}
6227
cancel-in-progress: true
63-
needs: start-runner # required to start the main job when the runner is ready
64-
runs-on: ${{ needs.start-runner.outputs.label }} # run the job on the newly created runner
28+
runs-on: [self-hosted, intel-cpu, 32-cpu, tgi-ci]
6529
permissions:
6630
contents: write
6731
packages: write
@@ -135,26 +99,3 @@
13599
cache-from: type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-90,mode=max
136100
cache-to: type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-90,mode=max
137101

138-
stop-runner:
139-
name: Stop self-hosted EC2 runner
140-
needs:
141-
- start-runner
142-
- build-and-push-image
143-
runs-on: ubuntu-latest
144-
env:
145-
AWS_REGION: us-east-1
146-
if: ${{ always() }} # required to stop the runner even if the error happened in the previous jobs
147-
steps:
148-
- name: Configure AWS credentials
149-
uses: aws-actions/configure-aws-credentials@v1
150-
with:
151-
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
152-
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
153-
aws-region: ${{ env.AWS_REGION }}
154-
- name: Stop EC2 runner
155-
uses: philschmid/philschmid-ec2-github-runner@main
156-
with:
157-
mode: stop
158-
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
159-
label: ${{ needs.start-runner.outputs.label }}
160-
ec2-instance-id: ${{ needs.start-runner.outputs.ec2-instance-id }}

0 commit comments

Comments
 (0)