Skip to content

Commit 647e692

Browse files
committed
exclude paddle libs
1 parent b5c9dd5 commit 647e692

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

.github/workflows/paddle_wheel.yaml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,24 @@ jobs:
6969
pip install auditwheel
7070
# Dynamically find all library paths and add them to LD_LIBRARY_PATH
7171
FFMPEG_LIB_PATHS=$(find $(pwd)/build_cmake/_deps -type d -name "lib" | tr '\n' ':')
72-
export LD_LIBRARY_PATH=${FFMPEG_LIB_PATHS}${LD_LIBRARY_PATH}
73-
72+
73+
# Get PaddlePaddle library paths
74+
PADDLE_PATH=$(python -c "import paddle; print(paddle.__path__[0])")
75+
PADDLE_LIB_PATHS="$PADDLE_PATH/base:$PADDLE_PATH/libs"
76+
77+
export LD_LIBRARY_PATH=${FFMPEG_LIB_PATHS}${PADDLE_LIB_PATHS}:${LD_LIBRARY_PATH}
78+
7479
# Dynamically generate exclude arguments for all FFmpeg libraries found
7580
EXCLUDE_ARGS=""
7681
for lib in $(find build_cmake/_deps -name "*.so.*" | xargs -n 1 basename | sort | uniq); do
7782
EXCLUDE_ARGS="$EXCLUDE_ARGS --exclude $lib"
7883
done
84+
85+
# Add PaddlePaddle libraries to exclude list
86+
EXCLUDE_ARGS="$EXCLUDE_ARGS --exclude libpaddle.so --exclude libcommon.so --exclude libphi_core.so"
87+
7988
echo "Excluding libraries: $EXCLUDE_ARGS"
80-
89+
8190
auditwheel repair dist/*.whl --plat manylinux_2_28_x86_64 -w wheelhouse/ $EXCLUDE_ARGS
8291
rm dist/*.whl
8392
mv wheelhouse/*.whl dist/

0 commit comments

Comments
 (0)