diff --git a/recipe/build.sh b/recipe/build.sh index 4b2fb00b..788eab52 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -70,9 +70,9 @@ if [[ ${cuda_compiler_version} != "None" ]]; then export GCC_HOST_COMPILER_PATH="${GCC}" export GCC_HOST_COMPILER_PREFIX="$(dirname ${GCC})" #export CFLAGS=$(echo $CFLAGS | sed 's:-I/usr/local/cuda/include::g') - #export CPPFLAGS=$(echo $CPPFLAGS | sed 's:-I/usr/local/cuda:-isystem/usr/local/app/app_bin/cuda/11.1:g') - #export CXXFLAGS=$(echo $CXXFLAGS | sed 's:-I/usr/local/cuda:-isystem/usr/local/app/app_bin/cuda/11.1:g') - export TF_CUDA_PATHS="${PREFIX},/usr/local/app/app_bin/cuda/11.1,/usr" + #export CPPFLAGS=$(echo $CPPFLAGS | sed 's:-I/usr/local/cuda:-isystem/usr/local/cuda:g') + #export CXXFLAGS=$(echo $CXXFLAGS | sed 's:-I/usr/local/cuda:-isystem/usr/local/cuda:g') + export TF_CUDA_PATHS="${PREFIX},/usr/local/cuda-${cuda_compiler_version},/usr" export CLANG_CUDA_COMPILER_PATH=${PREFIX}/bin/clang export USE_CUDA=1 export cuda=Y @@ -83,8 +83,8 @@ if [[ ${cuda_compiler_version} != "None" ]]; then export NCCL_ROOT_DIR=$PREFIX export USE_STATIC_NCCL=0 export USE_STATIC_CUDNN=0 - export PATH="/usr/local/app/app_bin/cuda/11.1/bin:$PATH" - export CUDA_TOOLKIT_ROOT_DIR=/usr/local/app/app_bin/cuda/11.1 + export PATH="${CUDA_HOME}/bin:$PATH" + export CUDA_TOOLKIT_ROOT_DIR=$CUDA_HOME export LDFLAGS="${LDFLAGS//-Wl,-z,now/-Wl,-z,lazy}" export CC_OPT_FLAGS="-march=nocona -mtune=haswell" @@ -188,7 +188,7 @@ bazel shutdown echo "build --config=noaws" >> .bazelrc # build using bazel -bazel ${BAZEL_OPTS} build --jobs 24 ${BUILD_OPTS} ${BUILD_TARGET} +bazel ${BAZEL_OPTS} build ${BUILD_OPTS} ${BUILD_TARGET} # build a whl file mkdir -p $SRC_DIR/tensorflow_pkg