-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pre end-to-end gpu driver validation
Signed-off-by: shiva kumar <[email protected]>
- Loading branch information
Showing
13 changed files
with
186 additions
and
16 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
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,8 @@ | ||
#! /bin/bash | ||
# This test case runs the operator installation / test case with the default options. | ||
|
||
SCRIPTS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )"/../scripts && pwd )" | ||
source "${SCRIPTS_DIR}"/.definitions.sh | ||
|
||
# Run an end-to-end test cycle | ||
"${SCRIPTS_DIR}"/nvidia-kernel-upgrade-aws.sh |
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
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,17 @@ | ||
#!/bin/bash | ||
|
||
if [[ "${SKIP_INSTALL}" == "true" ]]; then | ||
echo "Skipping install: SKIP_INSTALL=${SKIP_INSTALL}" | ||
exit 0 | ||
fi | ||
|
||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
source "${SCRIPT_DIR}"/.definitions.sh | ||
|
||
export REGCTL_VERSION=v0.4.7 | ||
mkdir -p bin | ||
curl -sSLo bin/regctl https://github.com/regclient/regclient/releases/download/${REGCTL_VERSION}/regctl-linux-amd64 | ||
chmod a+x bin/regctl | ||
export PATH=$(pwd)/bin:${PATH} | ||
DRIVER_BRANCH=$(echo "${TARGET_DRIVER_VERSION}" | cut -d '.' -f 1) | ||
regctl image get-file ghcr.io/nvidia/driver:base-${BASE_TARGET}-${KERNEL_FLAVOR}-${DRIVER_BRANCH} /var/kernel_version.txt ${SCRIPT_DIR}/kernel_version.txt || true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/bin/bash | ||
|
||
if [[ "${SKIP_INSTALL}" == "true" ]]; then | ||
echo "Skipping install: SKIP_INSTALL=${SKIP_INSTALL}" | ||
exit 0 | ||
fi | ||
|
||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
source "${SCRIPT_DIR}"/.definitions.sh | ||
|
||
# finding kernel version | ||
${SCRIPT_DIR}/findkernelversion.sh | ||
source "${SCRIPT_DIR}"/kernel_version.txt | ||
|
||
echo "Checking current kernel version..." | ||
CURRENT_KERNEL=$(uname -r) | ||
echo "Current kernel version: $CURRENT_KERNEL" | ||
|
||
echo "" | ||
echo "" | ||
echo "--------------Starting the Precompiled kernel version ${KERNEL_VERSION} upgrade--------------" | ||
|
||
sudo apt-get update -y | ||
sudo apt-get install linux-image-${KERNEL_VERSION} -y | ||
if [ $? -ne 0 ]; then | ||
echo "Kernel upgrade failed." | ||
exit 1 | ||
fi | ||
|
||
echo "Checking the upgraded kernel version ${KERNEL_VERSION}..." | ||
CURRENT_KERNEL=$(uname -r) | ||
echo "Upgraded kernel version: $CURRENT_KERNEL" | ||
|
||
echo "update grub ..." | ||
sudo update-grub | ||
echo "Rebooting ..." | ||
# Run the reboot command with nohup to avoid abrupt SSH closure issues | ||
nohup sudo reboot & | ||
|
||
echo "--------------Installation of kernel completed --------------" | ||
|
||
# Exit with a success code since the reboot command was issued successfully | ||
exit 0 |
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,27 @@ | ||
#!/bin/bash | ||
|
||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
source ${SCRIPT_DIR}/.definitions.sh | ||
source ${SCRIPT_DIR}/.local.sh | ||
|
||
try_ssh_connection() { | ||
ssh -o ConnectTimeout=10 -i ${private_key} ${instance_hostname} "exit" | ||
return $? | ||
} | ||
|
||
echo "Waiting for aws system to come back online..." | ||
START_TIME=$(date +%s) | ||
while true; do | ||
sleep 60 # sleep before as system restarted earlier | ||
try_ssh_connection | ||
if [ $? -eq 0 ]; then | ||
echo "Successfully connected to aws system after reboot." | ||
break; | ||
fi | ||
ELAPSED_TIME=$(($(date +%s) - START_TIME)) | ||
if [ "$ELAPSED_TIME" -ge "$SYSTEM_ONLINE_CHECK_TIMEOUT" ]; then | ||
echo "Failed to connect to aws within ${SYSTEM_ONLINE_CHECK_TIMEOUT} minutes after reboot." | ||
exit 1 | ||
fi | ||
echo "ssh retry again..." | ||
done |
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