Skip to content

Commit dd04358

Browse files
committed
Add script to check SSH
1 parent 9f79f57 commit dd04358

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

.ci/torchbench/check-ssh.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
3+
# Loop to continuously check the output of `who`
4+
while true; do
5+
# Check if `who` returns non-empty output
6+
if who | grep -q '.'; then
7+
echo "User(s) logged in. Sleeping for 100 seconds..."
8+
sleep 100
9+
else
10+
echo "No users logged in. Exiting..."
11+
exit 0
12+
fi
13+
done

.github/workflows/_linux-test-a10g.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ jobs:
2828
- name: Install TorchBench
2929
run: |
3030
bash ./.ci/torchbench/install.sh
31-
- name: Test TorchBench
31+
- name: Wait for SSH session to end
3232
run: |
33-
bash ./.ci/torchbench/test.sh
33+
bash ./.ci/torchbench/check-ssh.sh
3434
- name: Clean up Conda env
3535
if: always()
3636
run: |

0 commit comments

Comments
 (0)