Skip to content

Commit f4f1d8d

Browse files
Support for non-CUDA builds (#2750)
Co-authored-by: yongqiangma <xing.wo@163.com>
1 parent 6610aa2 commit f4f1d8d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

build.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,10 @@ function version_info() {
187187
fastdeploy_git_commit_id=$(git rev-parse HEAD)
188188
paddle_version=$(${python} -c "import paddle; print(paddle.__version__)")
189189
paddle_git_commit_id=$(${python} -c "import paddle; print(paddle.__git_commit__)")
190-
cuda_version=$(nvcc -V | grep -Po "(?<=release )[\d.]+(?=, V)")
190+
cuda_version="nvcc-not-installed"
191+
if command -v nvcc &> /dev/null; then
192+
cuda_version=$(nvcc -V | grep -Po "(?<=release )[\d.]+(?=, V)")
193+
fi
191194
cxx_version=$(g++ --version | head -n 1 | grep -Po "(?<=\) )[\d.]+")
192195

193196
echo "fastdeploy GIT COMMIT ID: $fastdeploy_git_commit_id" > $output_file

0 commit comments

Comments
 (0)