Skip to content

Commit c98bfc0

Browse files
test
1 parent faa311d commit c98bfc0

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

scripts/build-env/manylinux.sh

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
#!/bin/bash
22

33
# 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
4+
if [ "$is_root" = false ] && [ "$has_sudo" = false ]
5+
then
56
echo "Root or sudo is required. Aborting."
67
exit 1
7-
elif [ "$is_root" = false ] ; then
8+
elif [ "$is_root" = false ]
9+
then
810
USE_SUDO=sudo
911
else
1012
USE_SUDO=
@@ -38,7 +40,8 @@ echo
3840

3941
# Check if nvcc is available
4042
echo "Checking for nvcc..."
41-
if ! command -v nvcc &> /dev/null; then
43+
if ! command -v nvcc &> /dev/null
44+
then
4245
echo "nvcc could not be found. Please ensure CUDA is installed correctly."
4346
exit 1
4447
fi
@@ -47,7 +50,8 @@ echo "nvcc is available. Proceeding with the build environment setup."
4750
cd tensor-array-repo/Tensor-Array
4851

4952
# Create build directory if it doesn't exist
50-
if [ ! -d "build" ]; then
53+
if [ ! -d "build" ]
54+
then
5155
echo "Creating build directory..."
5256
mkdir build
5357
else
@@ -66,13 +70,18 @@ rm -rf build
6670

6771
# Create symbolic link for lib64 to lib if it doesn't exist
6872
echo "Checking for symbolic link from lib64 to lib..."
69-
if [ ! -L "lib" ] && [ -d "lib64" ]; then
73+
if [ ! -L "lib" ] && [ -d "lib64" ]
74+
then
7075
echo "Creating symbolic link for lib64 to lib..."
7176
ln -s lib64 lib
7277
else
7378
echo "Symbolic link for lib64 to lib already exists or lib64 does not exist."
7479
fi
7580

76-
patchelf --set-rpath "\$ORIGIN/../lib" ./lib/*.so
81+
for i in ./lib/*.so
82+
do
83+
echo "Add ${i}.so file"
84+
patchelf --set-rpath "\$ORIGIN/../lib" ./lib/${i}.so
85+
done
7786

7887
cd ../..

0 commit comments

Comments
 (0)