在 Intellij Idea 中 运行 tensorflow 项目时找不到 cuda8 库

Cannot find cuda8 library when running tensorflow project in Intellij Idea

我在运行我的项目中遇到这个错误:

2017-09-08 10:33:17.789575: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1030] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX 980, pci bus id: 0000:03:00.0)
2017-09-08 10:33:17.789656: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1017] Ignoring gpu device (device: 1, name: GeForce GT 730, pci bus id: 0000:02:00.0) with Cuda multiprocessor count: 2. The minimum required count is 8. You can adjust this requirement with the env var TF_MIN_GPU_MULTIPROCESSOR_COUNT.
2017-09-08 10:33:18.092977: I tensorflow/stream_executor/dso_loader.cc:129] Couldn't open CUDA library libcupti.so.8.0. LD_LIBRARY_PATH: /home/test/.local/share/JetBrains/Toolbox/apps/IDEA-U/ch-0/172.3968.16/bin:share/jetbrains-toolbox:share/jetbrains-toolbox/lib:./lib/:./lib/i386-linux-gnu/:./lib/x86_64-linux-gnu/:./lib32/:./lib64/:../lib/:../lib/i386-linux-gnu/:../lib/x86_64-linux-gnu/:../lib32/:../lib64/:
2017-09-08 10:33:18.093004: F ./tensorflow/stream_executor/lib/statusor.h:205] Non-OK-status: status_ status: Failed precondition: could not dlopen DSO: libcupti.so.8.0; dlerror: libcupti.so.8.0: cannot open shared object file: No such file or directory

但是当我 运行 终端中的项目时,它正常启动并进行计算...

在 IntelliJ idea 中更改环境设置需要做什么?

将 CUDA 库目录添加到您的 LD_LIBRARY_PATH

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/cuda/library