-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:NVIDIA/NeMo into ashors/ckpt-subdirs
- Loading branch information
Showing
208 changed files
with
12,226 additions
and
3,058 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 all 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Regularly updates the CI container | ||
name: Reboots VMs in a controlled way | ||
on: | ||
schedule: | ||
- cron: /15 * * * * | ||
workflow_dispatch: | ||
pull_request: | ||
|
||
jobs: | ||
pre-flight: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
list-of-vms: ${{ steps.main.outputs.main }} | ||
environment: main | ||
steps: | ||
- name: Get list of VMs | ||
id: main | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.PAT }} | ||
run: | | ||
RUNNERS=$(curl -L \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "Authorization: Bearer $GITHUB_TOKEN" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
https://api.github.com/repos/NVIDIA/NeMo/actions/runners) | ||
MATRIX=$(echo $RUNNERS \ | ||
| jq -c '[ | ||
.runners[] | ||
| select(.status == "online") | ||
| select(.name | contains("gpu") | ||
| { | ||
"vm": .name, | ||
"n_gpus": [ | ||
.labels[] | ||
| select(.name | endswith("gpu")) | .name | ||
][0][:1] | ||
} | ||
] | ||
' | ||
) | ||
echo main=$MATRIX | tee -a "$GITHUB_OUTPUT" | ||
maintenance: | ||
needs: pre-flight | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: ${{ fromJSON(needs.pre-flight.outputs.list-of-vms )}} | ||
uses: .github/workflows/monitor-single-vm.yml | ||
with: | ||
vm: ${{ matrix.vm }} | ||
n_gpus: ${{ matrix.n_gpus }} | ||
secrets: inherit |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.