Skip to content

Commit

Permalink
Add checks to ensure $CUDA_HOME is valid
Browse files Browse the repository at this point in the history
  • Loading branch information
jakirkham committed Aug 15, 2019
1 parent cabbd8b commit a4b5c68
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions recipes/nvcc/install_nvcc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,18 @@ fi
mkdir -p "${PREFIX}/etc/conda/activate.d"
cat > "${PREFIX}/etc/conda/activate.d/${PKG_NAME}_activate.sh" <<EOF
#!/bin/bash
if [[ ! -d "${CUDA_HOME}" ]]
then
echo "Cannot find: ${CUDA_HOME}"
exit 1
fi
if [[ ! -f "${CUDA_HOME}/lib64/stubs/libcuda.so" ]]
then
echo "Cannot find: ${CUDA_HOME}/lib64/stubs/libcuda.so"
exit 1
fi
export CUDA_HOME="${CUDA_HOME}"
export CFLAGS="\${CFLAGS} -I\${CUDA_HOME}/include"
export CPPFLAGS="\${CPPFLAGS} -I\${CUDA_HOME}/include"
Expand Down

0 comments on commit a4b5c68

Please sign in to comment.