[英]cudaGetDevice() failed. Status: CUDA driver version is insufficient for CUDA runtime version (on GCP - Ubuntu 18 LTS running in VNC GUI)
I have followed this link to get all my versions in order:我已点击此链接按顺序获取我的所有版本:
I need to use Tensorflow_GPU_1.14.0 for legacy code purposes.我需要将 Tensorflow_GPU_1.14.0 用于遗留代码。
Therefore:所以:
tensorflow_gpu-1.14.0 tensorflow_gpu-1.14.0
Python: 2.7, 3.3-3.7蟒蛇:2.7、3.3-3.7
cuDnn: 7.4立方网络:7.4
Cuda: 10.0库达:10.0
import tensorflow as tf; print(tf.__version__)
returns 1.14.0返回 1.14.0
My nvcc Version is:我的 nvcc 版本是:
nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2018 NVIDIA Corporation
Built on Sat_Aug_25_21:08:01_CDT_2018
Cuda compilation tools, release 10.0, V10.0.130
My nvidia-smi is:我的 nvidia-smi 是:
nvidia-smi
Wed Jan 22 16:47:10 2020
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 410.104 Driver Version: 410.104 CUDA Version: 10.0 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 Tesla K80 Off | 00000000:00:04.0 Off | 0 |
| N/A 47C P8 31W / 149W | 27MiB / 11441MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 2524 G /usr/lib/xorg/Xorg 9MiB |
| 0 2574 G /usr/bin/gnome-shell 6MiB |
+-----------------------------------------------------------------------------+
And my Cudnn version is:我的 Cudnn 版本是:
cat /usr/include/cudnn.h | grep CUDNN_MAJOR -A 2
#define CUDNN_MAJOR 7
#define CUDNN_MINOR 4
#define CUDNN_PATCHLEVEL 2
--
#define CUDNN_VERSION (CUDNN_MAJOR * 1000 + CUDNN_MINOR * 100 + CUDNN_PATCHLEVEL)
#include "driver_types.h"
My python version:我的蟒蛇版本:
import sys
print(sys.version)
3.6.10 |Anaconda, Inc.| (default, Jan 7 2020, 21:14:29)
[GCC 7.3.0]
I am using Ubuntu 18.04 LTS我正在使用 Ubuntu 18.04 LTS
To expand on Robert answer in the comment section below, I first uninstalled the existing nvidia by using为了在下面的评论部分扩展罗伯特的回答,我首先使用卸载了现有的 nvidia
sudo apt-get purge nvidia-*
Then installed the newest version using然后使用安装最新版本
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
sudo apt upgrade
ubuntu-drivers list
Then from the list I choose然后从我选择的列表中
sudo apt install nvidia-driver-VERSION_NUMBER_HERE
Then I sudo reboot
my instance, and executed the following code in Jupyter notebook.然后我sudo reboot
我的实例,并在 Jupyter notebook 中执行以下代码。
import tensorflow as tf
print(('Is your GPU available for use?\n{0}').format(
'Yes, your GPU is available: True' if tf.test.is_gpu_available() == True else 'No, your GPU is NOT available: False'
))
print(('\nYour devices that are available:\n{0}').format(
[device.name for device in tf.config.experimental.list_physical_devices()]
))
And it worked它奏效了
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.