Skip to content

Determine and display various versions of interest #521

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

iankouls-aws
Copy link
Contributor

Adds bash script which determines and prints various versions of interest.
Inventory of installed components and versions is useful to determine whether prerequisites are satisfied in various scenarios.
This PR does not depend on any other PRs or fix a reported issue.

@iankouls-aws
Copy link
Contributor Author

Sample output:

[root@ip-172-16-76-105 tools]# ./versions.sh

OS info:
NAME="Amazon Linux"
VERSION="2"
ID="amzn"
ID_LIKE="centos rhel fedora"

Linux family:
Linux

Linux Kernel version:
5.10.228-219.884.amzn2.x86_64

nvidia-smi:
/usr/bin/nvidia-smi

NVIDIA versions:
DRIVER version      : 550.127.05
CUDA Version        : 12.4
NCCL version: 2.22.3
AWS OFI NCCL version: 1.13.0
NVIDIA GDS:
 GDS release version: 1.7.2.10
 libcufile version: 2.12
 Platform: x86_64

Lustre client version:
/usr/bin/yum
2.12.8-4.amzn2

EFA Installer version:
efa-2.13.0-1.amzn2.x86_64

Libfabric version:
1.22.0amzn4.0

Copy link
Contributor

@mhuguesaws mhuguesaws left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left comments.

@iankouls-aws
Copy link
Contributor Author

@mhuguesaws - implemented changes based on your review, requesting another look

NVIDIA_DRIVER=$(nvidia-smi --query-gpu=driver_version --format=csv,noheader --id=0 | grep '[0-9].*')
CUDA_VERSION_SUPPORT=$(nvidia-smi --version | grep CUDA | cut -d ':' -f 2 | xargs)
CUDA_VERSION_CURRENT=$(nvcc --version | sed -n 's/^.*release \([0-9]\+\.[0-9]\+\).*$/\1/p' | grep '[0-9].*')
CUDA_DEFAULT_PATH=$(ls -alh /usr/local | awk '{print $9 $10 $11}' | grep cuda | grep \>)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
CUDA_DEFAULT_PATH=$(ls -alh /usr/local | awk '{print $9 $10 $11}' | grep cuda | grep \>)
CUDA_DEFAULT_PATH=$(readlink -f /usr/local/cuda)

echo "NVIDIA versions:"
NVIDIA_DRIVER=$(nvidia-smi --query-gpu=driver_version --format=csv,noheader --id=0 | grep '[0-9].*')
CUDA_VERSION_SUPPORT=$(nvidia-smi --version | grep CUDA | cut -d ':' -f 2 | xargs)
CUDA_VERSION_CURRENT=$(nvcc --version | sed -n 's/^.*release \([0-9]\+\.[0-9]\+\).*$/\1/p' | grep '[0-9].*')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if nvcc is not in the path?


CUDA_VERSIONS=$(ls -alh /usr/local | awk '{print $9 $10 $11}' | grep cuda | grep -v \>)
for v in $CUDA_VERSIONS ; do
NCCL_LIB=$(ls /usr/local/$v/lib/libnccl.so.*.*.* 2>/dev/null)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a big assumption this script will run on Deep Learning AMI.
cuda does not have a lib path but lib64 path

if [ "$?" == "0" ]; then
LUSTRE_CLIENT_VERSIONS_INSTALLED=$(yum list lustre-client | grep lustre-client | awk '{print $2}')
else
LUSTRE_CLIENT_VERSIONS_INSTALLED=$(apt list lustre-client | grep lustre-client | cut -d ' ' -f 2)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ubuntu uses a different package name lustre-client-modules-aws

Copy link
Contributor

@mhuguesaws mhuguesaws left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants