【Jetson Nano 2GB】PyTorchのインストール

engetu21.hatenablog.com
で導入したjetson-inferenceにあるシェルスクリプトからPyTorchをインストールできる。

$ sudo ~/jetson-inference/tools/install-pytorch.sh


f:id:engetu21:20220101195520p:plain
スペースを押すことで「*」がつくため、この状態でEnterを押下。
必要となるパッケージを自動で取得(apt)してくれます。すごい楽・・・。
終了すると以下のメッセージが出力されます。

Using /usr/local/lib/python3.6/dist-packages
Finished processing dependencies for torchvision==0.7.0a0+78ed10c
[jetson-inference] restoring /usr/bin/ffmpeg from /usr/bin/ffmpeg_bak

[jetson-inference] installation complete, exiting with status code 0
[jetson-inference] to run this tool again, use the following commands:

$ cd /build
$ ./install-pytorch.sh