Skip to content

Commit cb2ad46

Browse files
test
1 parent 936b940 commit cb2ad46

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

scripts/build-env/manylinux.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
11
#!/bin/bash
2+
3+
# Decide if we can proceed or not (root or sudo is required) and if so store whether sudo should be used or not.
4+
if [ "$is_root" = false ] && [ "$has_sudo" = false ]; then
5+
echo "Root or sudo is required. Aborting."
6+
exit 1
7+
elif [ "$is_root" = false ] ; then
8+
USE_SUDO=sudo
9+
else
10+
USE_SUDO=
11+
fi
12+
213
cd ../..
314

415
# Install dependencies for building Tensor-Array on manylinux
516
chmod +x tensor-array-repo/Tensor-Array/scripts/actions/install-cuda-rhel.sh
6-
dnf -y install redhat-lsb-core wget
17+
$USE_SUDO dnf -y install redhat-lsb-core wget
718
tensor-array-repo/Tensor-Array/scripts/actions/install-cuda-rhel.sh
819

920
# Check if nvcc is available

0 commit comments

Comments
 (0)