Skip to content

Commit d9153e1

Browse files
fix: fix cpu CI
1 parent ddaf53e commit d9153e1

File tree

1 file changed

+1
-61
lines changed

1 file changed

+1
-61
lines changed

.github/workflows/build_cpu.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 }}-cpu-${{ 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
@@ -133,27 +97,3 @@
13397
labels: ${{ steps.meta-cpu.outputs.labels }}
13498
cache-from: type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-cpu,mode=max
13599
cache-to: type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-cpu,mode=max
136-
137-
stop-runner:
138-
name: Stop self-hosted EC2 runner
139-
needs:
140-
- start-runner
141-
- build-and-push-image
142-
runs-on: ubuntu-latest
143-
env:
144-
AWS_REGION: us-east-1
145-
if: ${{ always() }} # required to stop the runner even if the error happened in the previous jobs
146-
steps:
147-
- name: Configure AWS credentials
148-
uses: aws-actions/configure-aws-credentials@v1
149-
with:
150-
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
151-
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
152-
aws-region: ${{ env.AWS_REGION }}
153-
- name: Stop EC2 runner
154-
uses: philschmid/philschmid-ec2-github-runner@main
155-
with:
156-
mode: stop
157-
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
158-
label: ${{ needs.start-runner.outputs.label }}
159-
ec2-instance-id: ${{ needs.start-runner.outputs.ec2-instance-id }}

0 commit comments

Comments
 (0)