Skip to content
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

Fix regexp in comp_and_load_drivers.sh #153

Merged
merged 1 commit into from
Jul 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion data_gpu/driver/comp_and_load_drivers.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
# vi: et sw=4 ts=4

# Check if the script is run with sudo
if [ "$EUID" -ne 0 ]; then
Expand Down Expand Up @@ -30,7 +31,11 @@ echo "CC: $CC"

# Define Nvidia path
output=$(find /usr -name nv-p2p.h 2>/dev/null)
NVIDIA_PATH=$(echo "$output" | grep -oP '^/usr/src/nvidia-\d+\.\d+\.\d+' | head -n 1)
NVIDIA_PATH=$(echo "$output" | grep -oP '^/usr/src/nvidia(-open)?-\d+\.\d+\.\d+' | head -n 1)
if [ -z "$NVIDIA_PATH" ]; then
echo "Could not find NVIDIA open drivers in /usr/src. Is it installed?"
exit 1
fi
echo "Using Nvidia path: $NVIDIA_PATH"

# Return directory
Expand Down
Loading