From 51c66a676f118d2b2e72edc025cf61ebdfc6ef8e Mon Sep 17 00:00:00 2001 From: Leo Chen Date: Tue, 7 Feb 2023 10:06:40 +0800 Subject: [PATCH] add path of libcuda.so.1 for cinn compilation (#50268) --- paddle/scripts/paddle_build.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/paddle/scripts/paddle_build.sh b/paddle/scripts/paddle_build.sh index 3a1ea7a7c1..80bc67a50f 100644 --- a/paddle/scripts/paddle_build.sh +++ b/paddle/scripts/paddle_build.sh @@ -157,14 +157,16 @@ function cmake_base() { -DPYTHON_INCLUDE_DIR:PATH=/opt/_internal/cpython-3.10.0/include/python3.10 -DPYTHON_LIBRARIES:FILEPATH=/opt/_internal/cpython-3.10.0/lib/libpython3.so" pip3.10 install -r ${PADDLE_ROOT}/python/requirements.txt - elif [ "$1" == "conda-python3.7" ]; then + elif [ "$1" == "conda-python3.7" ]; then export LD_LIBRARY_PATH=/opt/conda/lib/:${LD_LIBRARY_PATH} export PATH=/opt/conda/bin/:${PATH} export PYTHON_FLAGS="-DPYTHON_EXECUTABLE:FILEPATH=/opt/conda/bin/python -DPYTHON_INCLUDE_DIR:PATH=/opt/conda/include/python3.7m -DPYTHON_LIBRARIES:FILEPATH=/opt/conda/lib/libpython3.so" /opt/conda/bin/pip install -r ${PADDLE_ROOT}/python/requirements.txt - fi + fi + # for CINN, to find libcuda.so.1 + export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/cuda-11.2/compat/ else pip install -r ${PADDLE_ROOT}/python/requirements.txt fi -- GitLab