0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

戒め:RuntimeError: The NVIDIA driver on your system is too old

0
Last updated at Posted at 2026-07-14
RuntimeError: The NVIDIA driver on your system is too old

上記解決への備忘録です。

本記事では、NVIDIA-Driverの更新についてあげていません。外部のGPUを使用しているため、個人でアップデートができないためです。PyTorchのバージョンを変えることで対策しています。

背景

新規作成した実験リポジトリを計算サーバー上で実行していました。
完了していたので、特に履歴等注目していなかったのですが、よく見るとcpuで実行されていました。実行時間も全く気に留めていなかった。。。

上記の対策

device = torch.device("cuda") if torch.cuda.is_available() else torch.device("cpu")

これだと、何使ったか気づけない。

device = torch.device("cuda") if torch.cuda.is_available() else torch.device("cpu")
print(f"use {device}")

最低限入れよう。
でないと気づけない。

これ以外にも実験開始前に把握したい内容は、まとめてログ出力する処理を入れよう。

なぜcudaが使えなくなったか

他のプロジェクト(半年前に作成)では torch 2.9.1+cu128 を使用。計算サーバで正常に動作した。

新たに環境設定しプロジェクトを作成する際、torchのバージョンを考えずに入れた。
→ これにより、その時最新のtorch 2.12.1+cu130がインストール

  • 結果
    PyTorch 2.12.1が、計算サーバのGPUドライバではサポートされず、
RuntimeError: The NVIDIA driver on your system is too old
  • 時系列を見ると、
  1. 2026/1: プロジェクトAを作成 -> cuda使用可能
  2. 2026/7: プロジェクトBを作成 -> cuda使用不可

↓pytorchのリリースノートをみると、2026/1からtorchはPytorch 2.13.0までバージョンアップしていたことが分かりました。

引用 恐らく以下がCUDAのバージョン変更を示しています

PyTorch 2.12.0 Release
Updated the minimum CUDA version required to build PyTorch from source to CUDA 12.6 (#178925)
Building PyTorch from source with CUDA versions older than 12.6 is no longer supported. Users building custom binaries should install CUDA 12.6 or newer and make sure CUDA_HOME points to that installation.
Version 2.11:
CUDA_HOME=/usr/local/cuda-12.4 python setup.py develop
Version 2.12:
CUDA_HOME=/usr/local/cuda-12.6 python setup.py develop

解決

  • .venvの削除
    環境管理はuvを使用していました。
  • "torch>=2.9.1,<2.10"をtomlに記載
  • uv sync
    仮想環境に適用。

最後に

こんなに高頻度にバージョンがあがっていくとは知らず、かつバージョンアップで不具合が発生するのも都市伝説くらいの感覚でした。
備忘録でした。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?