当前位置:网站首页>Jetson TX1安装 Pytorch
Jetson TX1安装 Pytorch
2022-07-23 05:44:00 【cg101202】
大体流程
1. 重装系统
先重装了系统,避免混乱的旧系统所带来的不必要麻烦。
安装依赖包
sudo apt-get install python3-pip cmake
pip3 install numpy pyyaml mkl mkl-include setuptools cffi typing
# 各大教程里面还推荐了安装其他的一些包,我也不知道有没有用。
下载Pytorch源码
# 如果你想安装历史版本,可下载对应版本的源码,或者git checkout
git clone --recursive http://github.com/pytorch/pytorch
cd pytorch
安装源码中要求的Python依赖包
sudo pip3 install -r requirements.txt
安装
# 直接安装
sudo python3 setup.py install
# 生成whl
python3 setup.py bdist_wheel
附安装的参考链接:
- https://gist.github.com/dusty-nv/ef2b372301c00c0a9d3203e42fd83426
- https://github.com/andrewadare/jetson-tx2-pytorch
- PyTorch for Jetson Nano - NVIDIA Developer Forums
- https://github.com/dusty-nv/jetson-reinforcement/blob/master/CMakePreBuild.sh
可能遇到的问题:
- 内存不足
# 显示的错误信息没保存下来
# 好像是什么内部错误
解决办法:添加交换分区
附添加分区的参考链接:
https://help.ubuntu.com/community/SwapFaq#How_do_I_add_or_modify_a_swap_partition.3F
https://www.jetsonhacks.com/2016/12/21/jetson-tx1-swap-file-and-development-preparation/
- NCCL编译报错
Makefile:68: recipe for target '/home/ubuntu/software/pytorch/build/nccl/obj/collectives/device/devlink.o' failed
make[5]: *** [/home/ubuntu/software/pytorch/build/nccl/obj/collectives/device/devlink.o] Error 255
Makefile:44: recipe for target '/home/ubuntu/software/pytorch/build/nccl/obj/collectives/device/colldevice.a' failed
make[4]: *** [/home/ubuntu/software/pytorch/build/nccl/obj/collectives/device/colldevice.a] Error 2
Makefile:25: recipe for target 'src.build' failed
make[3]: *** [src.build] Error 2
CMakeFiles/nccl_external.dir/build.make:110: recipe for target 'nccl_external-prefix/src/nccl_external-stamp/nccl_external-build' failed
make[2]: *** [nccl_external-prefix/src/nccl_external-stamp/nccl_external-build] Error 2
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/nccl_external.dir/all' failed
make[1]: *** [CMakeFiles/nccl_external.dir/all] Error 2
由于TX1默认情况并没有安装NCCL,因此为了避免报错,可对CMakeLists.txt和setup.py进行如下更改:
# append to setup.py
USE_NCCL = False
# USE_DISTRIBUTED = False
# change the option in the CMakeLists.txt
option(USE_NCCL "Use NCCL" OFF)
修改参数之后,建议clean一下!!!
边栏推荐
猜你喜欢
![[AUTOSAR cantp 1. learn the network layer protocol of UDS diagnosis]](/img/dc/51a4f091c623dbaaa4c174ebdae92a.png)
[AUTOSAR cantp 1. learn the network layer protocol of UDS diagnosis]

匿名上位机v7波形显示

博客搭建四:将自己的博客加入百度和谷歌收录的方法

钢结构基本原理题库

高等代数知识结构

Use pyod to detect outliers

Installation and use of APP automated testing tool appium

钢结构基本原理试题及答案

Data analysis of time series (III): decomposition of classical time series

Analysis of 100 questions and answers in Higher Algebra
随机推荐
【AUTOSAR COM 3.信号的收发流程TX/RX】
永磁电机参数的测量获取(电感、电阻、极对数、磁链常数)
博客搭建五:图床选择
单片机学习笔记5--STM32时钟系统(基于百问网STM32F103系列教程)
Tips for using textviewdidchange of uitextview
switch实现表达式计算
Upper and lower case letter conversion
Deep learning neural network
嵌入式从入门到精通(入土)——超详细知识点分享3
3.2daydayup draw inferences from one instance: three days of fishing and two days of net learning
Object based - two classic classes
【AUTOSAR COM 4.Com服务层模块的介绍】
(1)ASIO
高电压技术复习资料
Use steps of Charles' packet capturing
Baidu Shen Shuo: focus on the scene, deeply cultivate the industry, and bring practical results to enterprise Digitalization
谈谈转动惯量
Using or tools to solve path planning problem (VRP)
快速排序的按区间的三个版本及优化--友友们不一定了解
二叉树的实现-c