GCP AI Platform Notebook 驱动太旧?
Posted
技术标签:
【中文标题】GCP AI Platform Notebook 驱动太旧?【英文标题】:GCP AI Platform Notebook driver too old? 【发布时间】:2020-12-19 02:03:23 【问题描述】:我正在尝试在 GCP 的 AI Platform Notebook 上运行以下 Hugging Face Transformers tutorial,该笔记本配备 32 个 vCPU、208 GB RAM 和 2 个 NVIDIA Tesla T4。
但是,当我尝试运行该部件时
model = DistillBERTClass()
model.to(device)
我收到以下断言错误:
AssertionError: The NVIDIA driver on your system is too old (found version 10010).
Please update your GPU driver by downloading and installing a new
version from the URL: http://www.nvidia.com/Download/index.aspx
Alternatively, go to: https://pytorch.org to install
a PyTorch version that has been compiled with your version
of the CUDA driver.
但是,当我跑步时 !nvidia-smi
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 418.87.01 Driver Version: 418.87.01 CUDA Version: 10.1 |
|-------------------------------+----------------------+----------------------+
| 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 T4 Off | 00000000:00:04.0 Off | 0 |
| N/A 38C P0 22W / 70W | 10MiB / 15079MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
| 1 Tesla T4 Off | 00000000:00:05.0 Off | 0 |
| N/A 39C P8 10W / 70W | 10MiB / 15079MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| No running processes found |
NVIDIA 驱动程序上的版本与我正在使用的最新 PyTorch 版本兼容。 有没有其他人遇到过这个错误,有没有办法解决?
【问题讨论】:
【参考方案1】:您可以:
请通过下载并安装新的 GPU 驱动程序来更新您的 GPU 驱动程序 来自 URL 的版本:http://www.nvidia.com/Download/index.aspx
或者,转到:https://pytorch.org 安装 PyTorch 已使用您的 CUDA 驱动程序版本编译的版本。
【讨论】:
谢谢!这是在 GCP AI Platform Notebook 上,所以我无法安装新版本的 GPU 驱动程序。我正在使用最新版本的 PyTorch。 @user3550693 正是我所说的:install a pytorch version that has been compiled with your verion of the CUDA driver
我添加了更多细节:它报告的我拥有的 NVIDIA 驱动程序实际上是与 PyTorch 兼容的驱动程序。
@user3550693 对于不同的 cuda 版本,pytorch 包有多个版本。你安装torch==1.6.0+cu101
了吗?
我刚刚按照您的建议尝试了 torch==1.6.0+cu101,但它不起作用(同样的错误)。【参考方案2】:
您可以尝试更新的 NVIDIA 驱动程序版本,我们支持最新的 CUDA 11 驱动程序版本,然后在其上安装 Pytorch:
gcloud beta notebooks instances create cuda11 \
--vm-image-project=deeplearning-platform-release \
--vm-image-family=common-cu110-notebooks-debian-9 \
--machine-type=n1-standard-1 \
--location=us-west1-a \
--format=json
图片系列:
common-cu110-notebooks-debian-9 common-cu110-notebooks-debian-10【讨论】:
成功了——非常感谢!我必须改变的是形象家族。非常感谢。 其实这样不行。当我按照您的说明安装新实例时,它没有正确集成变压器。 ImportError:无法从“变压器”(/opt/conda/lib/python3.7/site-packages/transformers/__init__.py)导入名称“TFBertModel” 这是因为你安装了 Pytorch 并且还需要 TF 吗? github.com/huggingface/transformers/issues/3442以上是关于GCP AI Platform Notebook 驱动太旧?的主要内容,如果未能解决你的问题,请参考以下文章