Both sides previous revision Previous revision Next revision | Previous revision |
lwc:hardware:jetson [2025/03/04 19:29] – John Harrison | lwc:hardware:jetson [2025/03/05 17:12] (current) – [misc] John Harrison |
---|
| |
==== Installing pyTorch ==== | ==== Installing pyTorch ==== |
| //corrected from: [[https://docs.nvidia.com/deeplearning/frameworks/install-pytorch-jetson-platform/index.html]])// |
* install ''jetpack''. (This is not the same as installing the OS for Jetson): ''sudo apt install nvidia-jetpack'' | * install ''jetpack''. (This is not the same as installing the OS for Jetson): ''sudo apt install nvidia-jetpack'' |
* get version of CUDA: ''nvcc --version'' | * get version of CUDA: ''nvcc --version'' |
* it's unclear if the following is needed (run as root) (from: [[https://docs.nvidia.com/deeplearning/frameworks/install-pytorch-jetson-platform/index.html]]) | * install ''cusparselt'': |
<code> | <code> |
wget | wget raw.githubusercontent.com/pytorch/pytorch/5c6af2b583709f6176898c017424dc9981023c28/.ci/docker/common/install_cusparselt.sh |
raw.githubusercontent.com/pytorch/pytorch/5c6af2b583709f6176898c017424dc9981023c28/.ci/docker/ | sudo -s # set CUDA version and install as root |
common/install_cusparselt.sh | export CUDA_VERSION=12.1 # as an example. Use the version returned from ''nvcc --version'' |
export CUDA_VERSION=12.1 # as an example. (example putting in the correct CUDA version caused this to fail. Only 12.1 worked) | |
bash ./install_cusparselt.sh | bash ./install_cusparselt.sh |
</code> | </code> |
* install correct numpy version: ''sudo pip install numpy=1.26.1'' | * install correct numpy version: ''sudo pip install numpy==1.26.1'' |
* download correct version of pytorch for jetpack version. Search for it at [[https://developer.download.nvidia.cn/compute/redist/jp/]] | * download correct version of pytorch for jetpack version. Search for it at [[https://developer.download.nvidia.cn/compute/redist/jp/]] |
| <code> |
| sudo pip3 install --no-cache http://<URL TO PYTORCH WHL> |
| </code> |
| |
| ==== misc ==== |
| * [[https://elinux.org/Jetson_Zoo#ONNX_Runtime|onnxruntime for Jetson]] |
| * if ''onnxruntime'' fails with message ''Invalid argument. Specify the number of threads explicitly'' fix with one-time cli command: ''sudo nvpmodel -m 0'' which forces the computer to with no throttling |
| * ''tegrastats'' might show load on GPU? |
| * ''tegrastats | cut -f 14 -d " "'' shows % load on GPU |
| * you can get rid of the warning ''System Throttled due to Over-current'' by editing ''/usr/share/nvpmodel_indicator/nvpmodel_indicator.py'' |