chore: import upstream snapshot with attribution
Create PR to main with cherry-pick from release / cherry-pick (push) Failing after 0s
CICD NeMo / pre-flight (push) Failing after 0s
CICD NeMo / configure (push) Has been skipped
Build, validate, and release Neural Modules / pre-flight (push) Failing after 1s
CICD NeMo / code-linting (push) Has been skipped
Build, validate, and release Neural Modules / release (push) Has been skipped
Build, validate, and release Neural Modules / release-summary (push) Has been cancelled
CICD NeMo / cicd-test-container-build (push) Has been cancelled
CICD NeMo / cicd-import-tests (push) Has been cancelled
CICD NeMo / L0_Setup_Test_Data_And_Models (push) Has been cancelled
CICD NeMo / cicd-main-unit-tests (push) Has been cancelled
CICD NeMo / cicd-main-speech (push) Has been cancelled
CICD NeMo / Nemo_CICD_Test (push) Has been cancelled
CICD NeMo / Coverage (e2e) (push) Has been cancelled
CICD NeMo / Coverage (unit-test) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
CICD NeMo / cicd-wait-in-queue (push) Has been cancelled
Create PR to main with cherry-pick from release / cherry-pick (push) Failing after 0s
CICD NeMo / pre-flight (push) Failing after 0s
CICD NeMo / configure (push) Has been skipped
Build, validate, and release Neural Modules / pre-flight (push) Failing after 1s
CICD NeMo / code-linting (push) Has been skipped
Build, validate, and release Neural Modules / release (push) Has been skipped
Build, validate, and release Neural Modules / release-summary (push) Has been cancelled
CICD NeMo / cicd-test-container-build (push) Has been cancelled
CICD NeMo / cicd-import-tests (push) Has been cancelled
CICD NeMo / L0_Setup_Test_Data_And_Models (push) Has been cancelled
CICD NeMo / cicd-main-unit-tests (push) Has been cancelled
CICD NeMo / cicd-main-speech (push) Has been cancelled
CICD NeMo / Nemo_CICD_Test (push) Has been cancelled
CICD NeMo / Coverage (e2e) (push) Has been cancelled
CICD NeMo / Coverage (unit-test) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
CICD NeMo / cicd-wait-in-queue (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
name: ~shut down a single VM
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
vm:
|
||||
type: string
|
||||
description: Name of VM
|
||||
required: true
|
||||
n_gpus:
|
||||
type: string
|
||||
description: Number of GPUs this VM has
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
check-status-and-maybe-shutdown:
|
||||
environment: main
|
||||
runs-on: ${{ inputs.vm }}
|
||||
outputs:
|
||||
status: ${{ steps.status.outputs.main }}
|
||||
steps:
|
||||
- name: Check status
|
||||
id: status
|
||||
run: |
|
||||
docker run --rm --runtime=nvidia --gpus ${{ inputs.n_gpus }} ubuntu nvidia-smi
|
||||
|
||||
NUM_GPUS=$(nvidia-smi --query-gpu=name --format=csv,noheader | wc -l)
|
||||
|
||||
if [[ $NUM_GPUS -ne ${{ inputs.n_gpus }} ]]; then
|
||||
echo "Issues with GPU detected, will take this runner offline."
|
||||
echo "main=degraded" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "main=healthy" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
- name: Send Slack message & Disconnect runner from GitHub
|
||||
if: ${{ steps.status.outputs.main == 'degraded' || failure() }}
|
||||
run: |
|
||||
MESSAGE='{
|
||||
"blocks": [
|
||||
{
|
||||
"type": "section",
|
||||
"text": {
|
||||
"type": "mrkdwn",
|
||||
"text": ":alert: VM bot 🤖: Hey <!subteam^${{ secrets.SLACK_WEBHOOK_ADMIN }}>: VM `${{ inputs.vm }}` is having not the best day of their life, maybe bring them an apple or so."
|
||||
}
|
||||
}
|
||||
]
|
||||
}'
|
||||
|
||||
curl -X POST -H "Content-type: application/json" --data "$MESSAGE" ${{ secrets.SLACK_WEBHOOK }}
|
||||
|
||||
cd /home/azureuser/actions-runner
|
||||
echo ${{ secrets.VM_KEY }} | sudo -S ./svc.sh stop
|
||||
Reference in New Issue
Block a user