Skip to content

Commit 5fd4ac2

Browse files
committed
example script for consuming available devices
1 parent 0651497 commit 5fd4ac2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

scripts/autobot_example.sh

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Capture the output of the command
2+
OUTPUT=$(python -m rpad.core.autobot available rtx2080 4 --quiet)
3+
4+
# Split the output on the colon
5+
NODE=${OUTPUT%%:*}
6+
GPU_INDICES=${OUTPUT#*:}
7+
8+
# Print the results (optional)
9+
echo "NODE: $NODE"
10+
echo "GPU_INDICES: $GPU_INDICES"

0 commit comments

Comments
 (0)