-
Notifications
You must be signed in to change notification settings - Fork 14
Create utils function for nvidia-smi check #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
6bb7156
8dde86d
fb8fdfd
986f58d
49de3c3
7aa3bc3
a84d7c6
2e8e7a4
a741480
f400e47
d9508c1
5c7e69d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -223,18 +223,8 @@ BUILD_STEP_ARGS+=("--storage" "${STORAGE}") | |
if command_exists "nvidia-smi"; then | ||
# Accept that this may fail | ||
set +e | ||
nvidia-smi --version | ||
ec=$? | ||
check_nvidia-smi_installation | ||
laraPPr marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
set -e | ||
if [ ${ec} -eq 0 ]; then | ||
echo "Command 'nvidia-smi' found, using available GPU" | ||
BUILD_STEP_ARGS+=("--nvidia" "all") | ||
else | ||
echo "Warning: command 'nvidia-smi' found, but 'nvidia-smi --version' did not run succesfully." | ||
echo "This script now assumes this is NOT a GPU node." | ||
echo "If, and only if, the current node actually does contain Nvidia GPUs, this should be considered an error." | ||
BUILD_STEP_ARGS+=("--nvidia" "install") | ||
fi | ||
else | ||
echo "No 'nvidia-smi' found, no available GPU but allowing overriding this check" | ||
BUILD_STEP_ARGS+=("--nvidia" "install") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is now exactly mimicking the behavior but I'm not sure this is correct. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is indeed now always set. I do not think this is what we want, right. exerpt of logs from EESSI/software-layer#1143
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In our scripts this is fine, it is a once only thing, once things are installed they are not reinstalled. |
||
|
Uh oh!
There was an error while loading. Please reload this page.