質問の通り、JetPack4.3が入ったJetson NanoにPyTorch1.7をインストールしたいです。
しかし、JetPack4.3はPyTorch1.7が対応しておらず、NVIDIAからダウンロードしたファイルでインストールしたところ、以下のリンク先と同じエラーが出ます。
私はJetBotを利用しており、そのJetBotに対応しているイメージがJetPack4.3であり、かつYOLOv5を用いたいので、どちらかを対応するものに変えるというのは非常に厳しいです。
YOLOv5はPyTorch1.7から動作します。
どなたか別の方法をご教示願えないでしょうか?
追記:
torch.shを実行した際にエラーが出ました.
terminal
1jetbot@jetbot-desktop:~/pytorch-aarch64/build$ sudo bash ./torch.sh 2+ VER= 3+ export PYTORCH_BUILD_VERSION= 4+ PYTORCH_BUILD_VERSION= 5+ export PYTORCH_BUILD_NUMBER=1 6+ PYTORCH_BUILD_NUMBER=1 7+ git clone https://github.com/pytorch/pytorch torch 8Cloning into 'torch'... 9remote: Enumerating objects: 718090, done. 10remote: Counting objects: 100% (112/112), done. 11remote: Compressing objects: 100% (71/71), done. 12remote: Total 718090 (delta 64), reused 83 (delta 41), pack-reused 717978 13Receiving objects: 100% (718090/718090), 682.71 MiB | 10.65 MiB/s, done. 14Resolving deltas: 100% (582684/582684), done. 15Checking out files: 100% (9661/9661), done. 16+ cd torch 17+ git checkout v 18error: pathspec 'v' did not match any file(s) known to git.
エラーを調べたところ,
terminal
1git fetch
をすればよいとのことだったのでやってみましたが,
terminal
1jetbot@jetbot-desktop:~/pytorch-aarch64/build$ sudo bash ./torch.sh 2+ VER= 3+ export PYTORCH_BUILD_VERSION= 4+ PYTORCH_BUILD_VERSION= 5+ export PYTORCH_BUILD_NUMBER=1 6+ PYTORCH_BUILD_NUMBER=1 7+ git clone https://github.com/pytorch/pytorch torch 8fatal: destination path 'torch' already exists and is not an empty directory. 9+ : 10+ cd torch 11+ git fetch 12From https://github.com/pytorch/pytorch 13 254360e182..9b14d93d78 viable/strict -> origin/viable/strict 14+ git checkout v 15error: pathspec 'v' did not match any file(s) known to git.
同じでした.
torch.shの中身
shell
1#!/usr/bin/env bash 2 3set -xe 4 5VER="$1" 6export PYTORCH_BUILD_VERSION="$VER" 7export PYTORCH_BUILD_NUMBER="1" 8 9git clone https://github.com/pytorch/pytorch torch || : 10 11cd torch 12git checkout "v$VER" 13git checkout --recurse-submodules "v$VER" 14git submodule sync 15git submodule update --init --recursive 16 17rm build/CMakeCache.txt || : 18# export MAX_JOBS=1 19export BUILD_TEST=0 20export USE_BREAKPAD=0 21 22python3 setup.py build 23python3 setup.py install 24python3 setup.py bdist_wheel
イメージを書き込んだSDカードに直接git cloneしてるのですが,違う方法なのでしょうか.
再追記:
torch.shの中身のgit clone以外をコメントアウトしてみました.
結果として,以下のエラーが出ました.
terminal
1jetbot@jetbot-desktop:~/pytorch-aarch64/build$ sudo bash ./torch.sh 2+ git clone https://github.com/pytorch/pytorch torch 3fatal: destination path 'torch' already exists and is not an empty directory. 4+ : 5+ cd torch 6+ rm build/CMakeCache.txt 7rm: cannot remove 'build/CMakeCache.txt': No such file or directory 8+ : 9+ python3 setup.py build 10Building wheel torch-1.11.0a0+gitc463d50 11-- Building version 1.11.0a0+gitc463d50 12 --- Trying to initialize submodules 13 14#------------長すぎるので一部省略 15 16-- The CXX compiler identification is GNU 7.5.0 17-- The C compiler identification is GNU 7.5.0 18-- Check for working CXX compiler: /usr/bin/c++ 19-- Check for working CXX compiler: /usr/bin/c++ -- works 20-- Detecting CXX compiler ABI info 21-- Detecting CXX compiler ABI info - done 22-- Detecting CXX compile features 23-- Detecting CXX compile features - done 24-- Check for working C compiler: /usr/bin/cc 25-- Check for working C compiler: /usr/bin/cc -- works 26-- Detecting C compiler ABI info 27-- Detecting C compiler ABI info - done 28-- Detecting C compile features 29-- Detecting C compile features - done 30-- Not forcing any particular BLAS to be found 31-- Could not find ccache. Consider installing ccache to speed up compilation. 32-- Performing Test COMPILER_WORKS 33-- Performing Test COMPILER_WORKS - Success 34-- Performing Test SUPPORT_GLIBCXX_USE_C99 35-- Performing Test SUPPORT_GLIBCXX_USE_C99 - Success 36-- Performing Test CAFFE2_EXCEPTION_PTR_SUPPORTED 37-- Performing Test CAFFE2_EXCEPTION_PTR_SUPPORTED - Success 38-- std::exception_ptr is supported. 39-- Performing Test CAFFE2_NEED_TO_TURN_OFF_DEPRECATION_WARNING 40-- Performing Test CAFFE2_NEED_TO_TURN_OFF_DEPRECATION_WARNING - Failed 41-- Turning off deprecation warning due to glog. 42-- Performing Test C_HAS_AVX_1 43-- Performing Test C_HAS_AVX_1 - Failed 44-- Performing Test C_HAS_AVX_2 45-- Performing Test C_HAS_AVX_2 - Failed 46-- Performing Test C_HAS_AVX_3 47-- Performing Test C_HAS_AVX_3 - Failed 48-- Performing Test C_HAS_AVX2_1 49-- Performing Test C_HAS_AVX2_1 - Failed 50-- Performing Test C_HAS_AVX2_2 51-- Performing Test C_HAS_AVX2_2 - Failed 52-- Performing Test C_HAS_AVX2_3 53-- Performing Test C_HAS_AVX2_3 - Failed 54-- Performing Test C_HAS_AVX512_1 55-- Performing Test C_HAS_AVX512_1 - Failed 56-- Performing Test C_HAS_AVX512_2 57-- Performing Test C_HAS_AVX512_2 - Failed 58-- Performing Test C_HAS_AVX512_3 59-- Performing Test C_HAS_AVX512_3 - Failed 60-- Performing Test CXX_HAS_AVX_1 61-- Performing Test CXX_HAS_AVX_1 - Failed 62-- Performing Test CXX_HAS_AVX_2 63-- Performing Test CXX_HAS_AVX_2 - Failed 64-- Performing Test CXX_HAS_AVX_3 65-- Performing Test CXX_HAS_AVX_3 - Failed 66-- Performing Test CXX_HAS_AVX2_1 67-- Performing Test CXX_HAS_AVX2_1 - Failed 68-- Performing Test CXX_HAS_AVX2_2 69-- Performing Test CXX_HAS_AVX2_2 - Failed 70-- Performing Test CXX_HAS_AVX2_3 71-- Performing Test CXX_HAS_AVX2_3 - Failed 72-- Performing Test CXX_HAS_AVX512_1 73-- Performing Test CXX_HAS_AVX512_1 - Failed 74-- Performing Test CXX_HAS_AVX512_2 75-- Performing Test CXX_HAS_AVX512_2 - Failed 76-- Performing Test CXX_HAS_AVX512_3 77-- Performing Test CXX_HAS_AVX512_3 - Failed 78-- Performing Test CAFFE2_COMPILER_SUPPORTS_AVX512_EXTENSIONS 79-- Performing Test CAFFE2_COMPILER_SUPPORTS_AVX512_EXTENSIONS - Failed 80-- Performing Test COMPILER_SUPPORTS_HIDDEN_VISIBILITY 81-- Performing Test COMPILER_SUPPORTS_HIDDEN_VISIBILITY - Success 82-- Performing Test COMPILER_SUPPORTS_HIDDEN_INLINE_VISIBILITY 83-- Performing Test COMPILER_SUPPORTS_HIDDEN_INLINE_VISIBILITY - Success 84-- Performing Test COMPILER_SUPPORTS_RDYNAMIC 85-- Performing Test COMPILER_SUPPORTS_RDYNAMIC - Success 86-- Found CUDA: /usr/local/cuda (found version "10.0") 87-- The CUDA compiler identification is unknown 88CMake Error at cmake/public/cuda.cmake:41 (enable_language): 89 No CMAKE_CUDA_COMPILER could be found. 90 91 Tell CMake where to find the compiler by setting either the environment 92 variable "CUDACXX" or the CMake cache entry CMAKE_CUDA_COMPILER to the full 93 path to the compiler, or to the compiler name if it is in the PATH. 94Call Stack (most recent call first): 95 cmake/Dependencies.cmake:43 (include) 96 CMakeLists.txt:669 (include) 97 98 99-- Configuring incomplete, errors occurred! 100See also "/home/jetbot/pytorch-aarch64/build/torch/build/CMakeFiles/CMakeOutput.log". 101See also "/home/jetbot/pytorch-aarch64/build/torch/build/CMakeFiles/CMakeError.log".
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2021/12/16 11:28
退会済みユーザー
2021/12/16 12:23
2021/12/17 12:28
2021/12/18 05:14
退会済みユーザー
2021/12/18 11:44 編集
2021/12/21 11:44