1
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?

Linux MintでPyTorchの環境構築 ( 2070Super )

Posted at

メモ書きです

  • Description: Linux Mint 22.3
  • BIOSからSecure Bootを無効化(Dissable)
    • Linuxではほとんど無効化して開発するらしい。
  • Python 3.12.3は最初からインストールされている。
  • venvが入っていないので入れる。
apt install python3.12-venv
  • 仮想環境を作って入る
python3 -m venv .venv
source .venv/bin/activate
  • torchのインストール(CUDAとcuDNNはこれで勝手に入るらしい)
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
  • 確認コマンド
python3 -c "import torch; device = 'cuda' if torch.cuda.is_available() else 'cpu'; print(f'Device: {device}'); print(f'GPU Name: {torch.cuda.get_device_name(0)}' if device == 'cuda' else 'GPU not found')"
  • 結果
Device: cuda
GPU Name: NVIDIA GeForce RTX 2070 SUPER
1
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
1
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?