nvidia英伟达nano及lisp环境搭建命令
Category:安装设置,编译配置,软件安装2020-7-26
http://mip.i3geek.com#!/bin/bash
:<<EOF
执行命令脚本方法
chmod a+x xinjian2020-5-26.sh
sudo ./xinjian2020-5-26.shnano开机设置,语言设置,输入法设置,系统升级,打开商店删不用的软件。
https://github.com/andlabs/libui.git
https://zhuanlan.zhihu.com/p/50635225
https://blog.csdn.net/weixin_34232617/article/details/92049739
https://blog.csdn.net/dragonzht/article/details/7905512
sudo apt-get install python3 python3-pip python3-setuptools python3-wheel ninja-build
sudo apt-get install libgtk-3-dev
pip3 install –user meson
sudo apt-get install meson
pip3 install meson
cd libui/
# 您必须位于顶级libui目录中,否则它将无法正常工作
meson setup build
ninja -C build
完成此操作后,所有内容都将消失build/meson-out/。(请注意,与以前的构建过程不同,所有内容都是默认构建的,包括测试和示例。)
Meson还支持从源代码安装。如果您使用忍者,那就做
ninja -C build install# 更改文件属主 -R为递归参数,应用于子文件夹和子文件,:左边的用户组可省略
# sudo chown -R love:love ~/
# 更改文件权限 -R为递归参数,应用于子文件夹和子文件
# chmod -R 777 ~/# 生成指定大小的空文件
# dd if=/dev/zero of=tmp.5G bs=1G count=5# 手动清空回收站
# sudo rm -rf ~/.local/share/Trash/*# sudo gedit /etc/nvpmodel/nvpmodel_t210_jetson-nano.conf
# 切换为10W功耗模式
sudo nvpmodel -m 0
# 切换为5W功耗模式
# sudo nvpmodel -m 1
# 检查一下确认JetBot处于10W功耗模式
# sudo nvpmodel -q# 需要4G swap扩一下内存
# git clone https://github.com/JetsonHacksNano/installSwapfile.git
# cd installSwapfile && git pull
# sudo ./installSwapfile.sh -s 4# Linux设置初始root密码
# 第一步:
# sudo passwd root
# 第二步:[sudo] password for you: —> 输入你的密码(你现在这个用户的密码)
# 第三步:Enter new UNIX password: —> 设置root 密码
# 第四步:Retype new UNIX password: —> 重复密码
# 第五步:完成
# 可选解锁root账户
# sudo passwd –unlock root
EOFsudo nvpmodel -m 0
dizhi=`pwd`
mkdir ~/app/
cd ~/app/# 阿里云官方镜像站
# https://developer.aliyun.com/mirror/
# sudo apt install apt-transport-https -y
# ubuntu arm64 国内源
sudo mv -f /etc/apt/sources.list /etc/apt/sources.list.bak# 中科大源
sudo echo “\
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial main multiverse restricted universe
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-backports main multiverse restricted universe
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-proposed main multiverse restricted universe
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-security main multiverse restricted universe
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-updates main multiverse restricted universe
deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial main multiverse restricted universe
deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-backports main multiverse restricted universe
deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-proposed main multiverse restricted universe
deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-security main multiverse restricted universe
deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-updates main multiverse restricted universe
” > /etc/apt/sources.list:<<EOF
# 清华源
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ xenial main multiverse restricted universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ xenial-security main multiverse restricted universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ xenial-updates main multiverse restricted universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ xenial-backports main multiverse restricted universe
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ xenial main multiverse restricted universe
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ xenial-security main multiverse restricted universe
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ xenial-updates main multiverse restricted universe
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ xenial-backports main multiverse restricted universe
EOF
# 修改hosts文件
# (1)找到本地的hosts文件,并打开,
# sudo gedit /etc/hosts
# (2)在文件的末尾添加以下内容,顺便将 ports.ubuntu.com也添加了,
sudo echo “\
192.30.255.112 https://github.com
192.30.255.113 https://github.com
151.101.76.249 github.global.ssl.fastly.net
91.189.88.150 ports.ubuntu.com
” >> /etc/hosts
# 重启网络,生效修改后的hosts文件,
sudo /etc/init.d/networking restart# 更新下
sudo apt update -y
# 将所有软件升级到新版本。
sudo apt upgrade -y
# 将系统升级到新版本。
sudo apt dist-upgrade -y
sudo apt install apt-utils -y
sudo apt autoremove -y
# sudo update-manager -c -dsudo echo “export CUBA_HOME=/usr/local/cuda-10.0” >> ~/.bashrc
sudo echo “export LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64:$LD_LIBRARY_PATH” >> ~/.bashrc
sudo echo “export PATH=/usr/local/cuda-10.0/bin:$PATH” >> ~/.bashrcsudo source ~/.bashrc
# sudo apt install make-guile -y
sudo apt install cmake make m4 gcc g++ -y
# 建议安装:
sudo apt install binutils-doc cmake-doc ninja-build g++-multilib g++-9-multilib gcc-9-doc gcc-multilib libtool flex bison gcc-doc gcc-9-multilib gcc-9-locales libstdc++-9-doc make-doc -y# Ubuntu系统无法识别exFat或FAT32的U盘
# https://github.com/libfuse/libfuse.git
sudo apt install exfat-fuse -y
# 解压lz文件sudo apt install lzip -y
# 安装编译依赖包
sudo apt install nasm -y
# 安装7zip
sudo apt install p7zip p7zip-full p7zip-rar -y
# 安装图形化编程
sudo apt install scratch -y
# 安装虚拟键盘
sudo apt install onboard -y
# 安装录音软件
# sudo apt install audacity -y# 安装远程桌面环境
# sudo apt install xrdp -y
# 开启远程root权限
# sudo gedit /etc/ssh/sshd_config
# PermitRootLogin prohibit-password
# PermitRootLogin yes# 安装输入法
sudo apt install ibus ibus-table-wubi ibus-pinyin -y
# 安装好后重启下机器输入法才会生效# 安装QQ程序
# https://im.qq.com/linuxqq/download.html
# wget -c http://down.qq.com/qqweb/LinuxQQ_1/linuxqq_2.0.0-b2-1082_arm64.deb
cd ~/app/
cp -f $dizhi/bao/linuxqq_2.0.0-b2-1082_arm64.deb ./
sudo dpkg -i linuxqq_2.0.0-b2-1082_arm64.deb# 安装qtcreator deb软件包:
# https://ubuntu.pkgs.org/20.04/ubuntu-universe-arm64/qtcreator_4.11.0-2build2_arm64.deb.html
# sudo apt install qtcreator -y
# wget -c http://ports.ubuntu.com/pool/universe/q/qtcreator/qtcreator_4.11.0-2build2_arm64.deb
cd ~/app/
cp -f $dizhi/bao/qtcreator_4.11.0-2build2_arm64.deb ./
sudo dpkg -i qtcreator_4.11.0-2build2_arm64.deb# 控制风扇开关:
# ON :
sudo sh -c ‘echo 255 > /sys/devices/pwm-fan/target_pwm’# OFF :
# sudo sh -c ‘echo 0 > /sys/devices/pwm-fan/target_pwm’
# (slowly turned off)# 重启以后风扇是不转的,所以需要设置开机运行
# sudo sh -c ‘echo 255 > /sys/devices/pwm-fan/target_pwm’
# 创建/etc/rc.local(18.04没有rc.local),并添加如下内容:
sudo echo “\
#!/bin/bash
sleep 10
# sudo /usr/bin/jetson_clocks
sudo sh -c ‘echo 255 > /sys/devices/pwm-fan/target_pwm’
” > /etc/rc.local
# 添加rc.local可执行权限
sudo chmod 755 /etc/rc.local
# sudo reboot
# 使用 jetson_clocks 命令可以启动风扇
# sudo jetson_clocks
# 运行后 /sys/devices/pwm-fan/target_pwm 会被设置为255
# cat /sys/devices/pwm-fan/target_pwm# 安装GPIO控制程序
# git clone https://github.com/NVIDIA/jetson-gpio.git
cd $dizhi/git/jetson-gpio && git pull
sudo python3 setup.py install
# 设置用户权限
sudo groupadd -f -r gpio
sudo usermod -a -G gpio love
cd ~/app/# 安装PIP3
sudo apt install python3-testresources -y
# wget https://bootstrap.pypa.io/get-pip.py
cd ~/app/
cp -f $dizhi/bao/get-pip.py ./
sudo -H python3 get-pip.py –force-reinstall
pip3 -V
sudo -H pip3 install –upgrade pip# 使用得比较多并且比较顺手的是清华大学的pip源,它是官网pypi的镜像,每隔5分钟同步一次,地址为 https://pypi.tuna.tsinghua.edu.cn/simple
sudo mkdir ~/.pip
sudo echo “\
[global]
index-url = http://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host = mirrors.aliyun.com
” > ~/.pip/pip.conf
# [global]
# timeout = 6000
# index-url = https://pypi.tuna.tsinghua.edu.cn/simple
# trusted-host = pypi.tuna.tsinghua.edu.cn# 二、pip更新已安装包
# 查看有待更新的包,按需要进行更新
# 查看更新
# pip list –outdated
# 更新某个包
# sudo -H pip install –upgrade <packages-name># PyTorch安装
# https://forums.developer.nvidia.com/t/pytorch-for-jetson-nano-version-1-5-0-now-available/72048
# Python 3.6# sudo -H pip install torch torchvision
# wget -c https://nvidia.box.com/shared/static/3ibazbiwtkl181n95n9em3wtrca7tdzp.whl -o torch-1.5.0-cp36-cp36m-linux_aarch64.whl
sudo apt install python3-pip libopenblas-base libopenmpi-dev -y
sudo -H pip3 install Cython
cd ~/app/
cp -f $dizhi/bao/torch-1.5.0-cp36-cp36m-linux_aarch64.whl ./
sudo -H pip3 install numpy torch-1.5.0-cp36-cp36m-linux_aarch64.whl# 在安装之前TensorFlow对于Jetson,
# sudo -H pip3 install tensorflow
# 安装JetPack在你的Jetson设备上。
# 安装TensorFlow所需的系统包:
# sudo apt update
sudo apt install libhdf5-serial-dev hdf5-tools libhdf5-dev zlib1g-dev zip libjpeg8-dev liblapack-dev libblas-dev gfortran -y
# 安装和升级PIP 3.
sudo apt install python3-pip -y
sudo -H pip3 install -U pip testresources setuptools
# 安装Python包依赖项。
sudo -H pip3 install -U numpy==1.16.1 future==0.17.1 mock==3.0.5 h5py==2.9.0 keras_preprocessing==1.0.5 keras_applications==1.0.8 gast==0.2.2 futures protobuf pybind11
cd ~/app/
cp -f $dizhi/bao/tensorflow-2.1.0+nv20.4-cp36-cp36m-linux_aarch64.whl ./
sudo -H pip3 install tensorflow-2.1.0+nv20.4-cp36-cp36m-linux_aarch64.whl# 安装common-lisp开发环境
sudo apt install sbcl -y# https://sourceforge.net/projects/clisp/files/clisp/2.49/
sudo apt install clisp -y:<<!
# sudo apt install emacs -y
# https://www.gnu.org/software/emacs/
# emacs -nw 命令行方式启动
# 源码安装emacssudo apt install automake autoconf texinfo libxpm-dev libjpeg-dev libpng-dev libgif-dev libtiff-dev gnutls-bin libgnutls28-dev libgtk-3-dev libncurses-dev mailutils -y
# 开始安装
# wget -c http://git.savannah.gnu.org/cgit/emacs.git/snapshot/emacs-27.0.91.tar.gz
cd ~/app/
cp -f $dizhi/bao/emacs-27.0.91.tar.gz ./
tar -zxf emacs-27.0.91.tar.gz
cd ~/app/emacs-27.0.91
autoreconf -ivf
./configure && make -j4 && sudo make install
cd ~/app/
!# sbcl编译路径不要有中文或空格
sudo apt install texlive -y
# wget -c https://github.com/sbcl/sbcl/archive/sbcl-2.0.4.tar.bz2
cd ~/app/
cp -f $dizhi/bao/Clozure-CL-1.12/sbcl/sbcl-2.0.6-source.tar.bz2 ./
tar -jxvf sbcl-2.0.6-source.tar.bz2
cd ~/app/sbcl-2.0.6
sudo echo ‘”2.6.88.999″‘ > version.lisp-expr
sudo ./make.sh
cd doc/manual && make -j4 && cd ../../
cd ~/app/sbcl-2.0.6
sudo ./install.sh
cd ~/app/# ccl lisp
cd ~/app/
cp -f $dizhi/bao/Clozure-CL-1.12/linuxarm.tar.gz ./# 解压
tar -zxf linuxarm.tar.gz
sudo echo export PATH=~/app/linuxarm:$PATH >> ~/.bashrc
sudo source ~/.bashrc
# git clone https://github.com/Clozure/ccl.git
# wget -c https://github.com/Clozure/ccl/releases/download/v1.12/linuxarm.tar.gz
# mkdir ccl-lisp-1.20
# tar -zxf linuxarm.tar.gz –directory=ccl-lisp-1.20
# cd ccl-lisp-1.20
sudo dpkg –add-architecture armhf
sudo apt update
sudo apt install libc6:armhf -y
sudo apt install libgtk3-nocsd0:armhf -y
# ./armcl# ecl lisp
# git clone https://gitlab.com/embeddable-common-lisp/ecl.git
cd ~/app/
sudo apt install texinfo -y
cp -f $dizhi/bao/Clozure-CL-1.12/ecl-20.4.24.tar.bz2 ./
tar -jxvf ecl-20.4.24.tar.bz2
cd ~/app/ecl-20.4.24
# 运行配置文件,构建程序并安装
./configure –prefix=/usr/local && make -j4 && sudo make install && cd ../
# 确保程序已安装并准备好运行:
# /usr/local/bin/ecl# 安装chez-scheme
# sudo apt install chezscheme -y
:<<!
# wget https://codeload.github.com/cisco/ChezScheme/zip/master
# mv master chez-scheme.zip
# t=thread i3=intel-32bit a6=amd-64bit nt=windows-nt le=linux
# a6le, a6nt, a6osx, i3le, i3nt, i3osx, ta6le, ta6nt, ta6osx, ti3le, ti3nt, and ti3osx# 安装依赖
# sudo apt install unzip zip uuid-dev libncurses5-dev libx11-dev curl -y# 开始安装
# unzip chez-scheme.zip
# cd ~/app/ChezScheme-master && mkdir build && cd build
# ../configure && make -j4 && sudo make install && cd ../../cd ~/app
wget https://beta.quicklisp.org/quicklisp.lisp
sbcl
(load “quicklisp.lisp”)
(quicklisp-quickstart:install)
(ql:system-apropos “vecto”)
(ql:quickload “vecto”)
(ql:add-to-init-file)
# (quit)
# 升级
(ql:update-client)
(ql:update-dist “quicklisp”)(ql:quickload “quicklisp-slime-helper”)
(ql:quickload “mcclim”)
# 提示安装成功
# 测试
(asdf:oos ‘asdf:load-op :clim-examples)
(in-package :clim-demo)
(demodemo)
# 成功显示示例
!# 新建文件并添加下面的内容
sudo echo “\
(load (expand-file-name “~/quicklisp/slime-helper.el”))
(setq inferior-lisp-program “sbcl”)
(slime)
(set-default-font “-outline-微软雅黑-normal-normal-normal-sans-19-*-*-*-p-*-iso8859-1”)
(set-default-font “Courier New-14″)
“>~/.emacs# 编译升级gcc-10.1.0
cd ~/bao/
cp -rf $dizhi/bao/gmp-mpfr-mpc/ ~/app/gmp-mpfr-mpc/
cd ~/app/gmp-mpfr-mpc/
# wget -c ftp://ftp.gnu.org/gnu/gmp/gmp-6.2.0.tar.xz
# wget -c http://www.mpfr.org/mpfr-current/mpfr-4.0.2.tar.gz
# wget -c https://ftp.gnu.org/gnu/mpc/mpc-1.1.0.tar.gz
# tar -xvJf gmp-6.2.0.tar.xz
xz -d gmp-6.2.0.tar.xz
tar -xvf gmp-6.2.0.tar
tar -zxvf mpfr-4.0.2.tar.gz
tar -zxvf mpc-1.1.0.tar.gz# a、安装GMP
cd gmp-6.2.0 && ./configure –enable-cxx && make -j 4 && sudo make install && cd ../# b、安装MPFR
cd mpfr-4.0.2 && ./configure –with-gmp=/usr/local/lib && make -j 4 && sudo make install && cd ../# c、安装MPC
cd mpc-1.1.0 && ./configure –with-gmp=/usr/local/lib –with-mpfr=/usr/local/lib && make -j 4 && sudo make install && cd ../../# 用下面方法【对所有用户永久生效】
# sudo gedit /etc/ld.so.conf
# 将下面内容填入
sudo echo “\
/usr/local/lib
“>/etc/ld.so.conf
# 退出执行
sudo ldconfigcd ~/bao/
# 下载包
# wget -c http://ftp.gnu.org/gnu/gcc/gcc-10.1.0/gcc-10.1.0.tar.xz
cp -f $dizhi/bao/gcc-10.1.0.tar.xz ./
# 解压
# tar -xvJf gcc-10.1.0.tar.xz
xz -d gcc-10.1.0.tar.xz
tar -xvf gcc-10.1.0.tar
cd ~/app/gcc-10.1.0# 创建编译输出目录,将所有的中间文件都放到该目录
mkdir gcc-build
cd gcc-build# 配置
../configure –enable-checking=release –enable-languages=c,c++,fortran –disable-multilib# 这样速度快一点
make -j4# 编译
sudo make install
cd ~/app/
:<<!
# 查看版本
# gcc –version
# gcc -v# 头文件在哪
# /usr/local/include/c++/9.2.0# 存在首次安装GCC不彻底污染问题,清理后继续重新编译安装
# make distclean
# 电脑硬件温度查看程序
# git clone https://github.com/rbonghi/jetson_stats.git
# cd jetson_stats && git pull
# sudo -H pip3 install -U jetson-stats
# sudo jtop# 安装gpu使用率显示工具
# sudo apt install python3-matplotlib -y
# git clone https://github.com/jetsonhacks/gpuGraphTX.git
# cd gpuGraphTX && git pull
# python3 gpuGraph.py# wget -c http://mirror.sergal.org/gnu/wget/wget-1.20.3.tar.gz
cd ~/app/
cp -f $dizhi/bao/wget-1.20.3.tar.gz ./
tar -zxvf wget-1.20.3.tar.gz
cd ~/app/wget-1.20.3 && mkdir build && cd build
sudo apt remove wget -y
../configure && make -j4 && sudo make install && cd ../../# wget -c http://mirror.sergal.org/gnu/wget/wget2-1.99.2.tar.gz
cd ~/app/
cp -f $dizhi/bao/wget2-1.99.2.tar.gz ./
tar -zxvf wget2-1.99.2.tar.gz
cd ~/app/wget2-1.99.2 && mkdir build && cd build
../configure && make -j4 && sudo make install && cd ../../# https://github.com/dita-ot/dita-ot.git
# wget -c https://github.com/dita-ot/dita-ot/releases/download/3.5/dita-ot-3.5.zip
cd ~/app/
cp -f $dizhi/bao/dita-ot-3.5.zip ./
unzip dita-ot-3.5.zip
sudo apt install default-jre -y
sudo apt install default-jdk -y
sudo echo export PATH=~/app/dita-ot-3.4.1/bin:$PATH >> ~/.bashrc
sudo source ~/.bashrc
!
:<<‘
sudo apt install xz -y# 源码安装xz
# https://sourceforge.net/projects/lzmautils/files/xz-5.2.5.tar.xz/download
cd ~/app/
cp -f $dizhi/bao/xz-5.2.5.tar.xz ./
tar -xvJf xz-5.2.5.tar.xz
cd ~/app/xz-5.2.4 && mkdir build && cd build
../configure && make -j 4 && sudo make install && cd ../../# 压缩命令
# tar -cf lianxi.tar lianxi/
# xz -T0 -z lianxi.tar# 对于 tar.xz结尾的压缩文件,解压有两种方式:
# 1.可以先将外层用xz解压方式解压,,然后里层用tar解压方式解压:
# xz -d *****.tar.xz
# tar -xvf *****.tar
# 2.直接使用如下命令解压:
# tar xvJf ***.tar.xz# Ubuntu 添加中文字体
sudo apt install fontconfig xfonts-utils -y
# 查看系统类型
# cat /proc/version
# 查看中文字体
# cat /etc/issue
# fc-list :lang=zh-cn# <bookmap xml:lang=”en-US”>
# <bookmap xml:lang=”zh-cn”># 这个文件中的
# ~/下载/dita-ot-3.4.1/plugins/org.dita.pdf2/cfg/fo/font-mappings.xml# ~/下载/dita-ot-3.4.1/plugins/org.dita.base/build_init.xml
# 52行 <property name=”default.language” value=”en”/>
# 改成
# 52行 <property name=”default.language” value=”zh”/># ubuntu好看的字体安装
# ubuntu linux用了很久,可是对终端下的字体一直不是很满意,今天终于找到了一些比较好看的终端字体,尤其是droid sans mono字体,简直爱死了,linux迷在ubuntu下一直用的就是这款字体,很漂亮,极力推荐这几款漂亮的字体:# 测试PyTorch安装
# >>> import torch
# >>> print(torch.__version__)
# >>> print(‘CUDA available: ‘ + str(torch.cuda.is_available()))
# >>> print(‘cuDNN version: ‘ + str(torch.backends.cudnn.version()))
# >>> a = torch.cuda.FloatTensor(2).zero_()
# >>> print(‘Tensor a = ‘ + str(a))
# >>> b = torch.randn(2).cuda()
# >>> print(‘Tensor b = ‘ + str(b))
# >>> c = a + b
# >>> print(‘Tensor c = ‘ + str(c))# torchvision
#sudo apt install libjpeg-dev zlib1g-dev -y
#git clone –branch <version> https://github.com/pytorch/vision torchvision # see below for version of torchvision to download
#cd torchvision
#sudo python setup.py install
#cd ../ # attempting to load torchvision from build dir will result in import error
#pip install ‘pillow<7’ # not needed for torchvision v0.5.0+# >>> import torchvision
# >>> print(torchvision.__version__)# 生成指令
# 下面是用于建造PyTorch车轮的步骤。这些是在几个小时内为Nano、TX2和Xavier在Xavier上编译的。# 请注意,如果您试图在Nano基础上进行构建,则需要挂载交换文件 29.
# 最大性能
#sudo nvpmodel -m 0
#sudo ~/jetson_clocks.sh
# 下载PyTorch资源#git clone –recursive –branch <version> http://github.com/pytorch/pytorch
#cd pytorch
# 应用贴片
# 根据正在构建的Jetpack版本,从下面选择要应用的修补程序。这些补丁避免了“启动所需的太多CUDA资源”错误(PyTorch问题)。#8103 45,Jetpack 4.4的修补程序提供了一些额外的补丁来支持cuDNN 8.0。# 喷气机4.4 DP-pytorch-diff-jetpack-4.4.patch 9
# Jetpack 4.2/4.3-pytorch-diff-jetpack-4.2.patch 10
# 注意,这些确切的补丁是针对PyTorch1.3/1.4的–对于以前的版本,源更改是相同的,但是文件行位置可能已经更改,因此建议手动应用这些更改。# 设置生成选项
#export USE_NCCL=0
#export USE_DISTRIBUTED=0 # skip setting this if you want to enable OpenMPI backend
#export USE_QNNPACK=0
#export USE_PYTORCH_QNNPACK=0
#export TORCH_CUDA_ARCH_LIST=”5.3;6.2;7.2″
#export PYTORCH_BUILD_VERSION=<version> # without the leading ‘v’, e.g. 1.3.0 for PyTorch v1.3.0
#export PYTORCH_BUILD_NUMBER=1
# (如果更改终端,请记住重新导出这些环境变量)# 为Python3.6构建轮子(转到py手电筒/Dist)
#sudo apt install python3-pip cmake libopenblas-dev -y
#sudo pip3 install -U setuptools
#sudo pip3 install -r requirements.txt#pip3 install scikit-build –user
#pip3 install ninja –user#python3 setup.py bdist_wheel
# 查找文件
# 安装查找功能
# sudo apt install mlocate -y
# 更新数据
# sudo updatedb
# 开始查找
# locate hdf5.h# 安装多线程下载软件,支持断点下载,wget支持断点加-c
# 包地址:http://pkgs.repoforge.org/axel/
sudo apt install axel -y
‘
:<<!
# 主要参数
# -n x:启动x个线程下载# -s x:最大速度(byte/s)为x
# -o f:指定输出文件
# -S [x]:搜索境像并且从指定的x服务器(可以是多个)下载
# -U x:设置user agent
# -N:不合用代理服务器
# -q:静默退出
# -v:更多状态信息
# -h:帮助信息
# -v:版本
# –max-speed = x -s x指定最大速度(每秒字节数)
# –num-connections = x -n x指定最大连接数
# –max-redirect = x指定最大重定向数
# –output = f -o f指定本地输出文件
# –search [= n] -S [n]搜索镜像并从n个服务器下载
# –ipv4 -4使用IPv4协议
# –ipv6 -6使用IPv6协议
# –header = x -H x添加HTTP标头字符串
# –user-agent = x -U x设置用户代理
# –no-proxy -N只是不要使用任何代理服务器
# –insecure -k不验证SSL证书
# –no-clobber -c如果文件已存在则跳过下载
# –quiet -q单独留下stdout
# –verbose -v更多状态信息
# –alternate -a替代进度指示器
# –help -h这个信息
# –timeout = x -T x设置I / O和连接超时
# –version -V版本信息# 断点续传
# 直接再次执行下载命令,自动从上次下载的位置开始下载# 示例
#axel -n 10 http://xxx.xxx.xxx.xxx/xxx.xxx# 4.核实安装情况
# 来验证TensorFlow已成功安装在Jetson AGX Xavier,您需要启动Python提示符并导入TensorFlow.
# 从终点站跑:
# python3
# 进口TensorFlow:
# >>> import tensorflow
# 如果TensorFlow已正确安装,此命令应无错误地执行。# “git pull”如何强制覆盖本地文件?
# 下面是正确的方法:
# git fetch –all
# 然后,你有两个选择:
# git reset –hard origin/master
# 或者如果你在其他分支上:
# git reset –hard origin/<branch_name># 其他一些命令
# sudo apt update 更新源
# sudo apt install package 安装包
# sudo apt remove package 删除包
# sudo apt-cache search package 搜索软件包
# sudo apt-cache show package 获取包的相关信息,如说明、大小、版本等
# sudo apt install package –reinstall 重新安装包
# sudo apt -f install 修复安装
# sudo apt remove package –purge 删除包,包括配置文件等
# sudo apt build-dep package 安装相关的编译环境
# sudo apt upgrade 更新已安装的包
# sudo apt dist-upgrade 升级系统
# sudo apt-cache depends package 了解使用该包依赖那些包
# sudo apt-cache rdepends package 查看该包被哪些包依赖
# sudo apt source package 下载该包的源代码
# sudo apt clean && sudo apt autoclean 清理无用的包
# sudo apt check 检查是否有损坏的依赖# ubuntu 安装brew
# 安装
# sudo apt install linuxbrew-wrapper -y
# 检查安装:brew help
# brew search #搜索包
# brew install #安装包
# brew uninstall #删除包
# brew list #列出 pkg 的文件
# brew info #关于 pkg 的信息
# brew update #更新包
# brew upgrade #升级包# 显示gpio当前数据
# gpio readall# https://my.oschina.net/freeblues/blog/196902
# (defun sh (cmd)
# +clisp
# (let ((str (ext:run-shell-command cmd :output:stream)))
# (loop for line = (read-line str nil)
# until (null line)
# do (print line)))
# +ecl
# (si:system cmd)
# +sbcl
# (sb-ext:run-program “/bin/sh” (list “-c” cmd) :input nil :output *standard-output*)
# +clozure
# (ccl:run-program “/bin/sh” (list “-c” cmd) :input nil :output *standard-output*))# 实际举个例子,就以 CCL 为例好了:
# CL-USER> (ccl:run-program “/bin/sh” (list “-c” “echo 123”) :input nil :output *standard-output*)
# 123
# <EXTERNAL-PROCESS (/bin/sh -c echo 123)[2596] (EXITED : 0) #x30200197619D>
# CL-USER># 控制gpio示例
# 导出引脚
# (导出引脚 11)
# 设置为输出模式
# (引脚模式 11 out)
# 设置为输入模式
# (引脚模式 11 in)
# 设置为高电平
# (写引脚 11 1)
# 设置为低电平
# (写引脚 11 0)
# 关闭引脚
# (关引脚 11)
# 读取引脚值
# (读引脚 11)# (defun 初始化 ()
# (导出引脚 13)
# (引脚模式 13 “out”)
# (导出引脚 19)
# (引脚模式 19 “out”)
# (导出引脚 20)
# (引脚模式 20 “out”))# (defun 闪灯 (int)
# (dotimes (x int)
# (写引脚 13 1)
# (sleep 0.5)
# (写引脚 13 0)
# (sleep 0.5)
# (写引脚 19 1)
# (sleep 0.5)
# (写引脚 19 0)
# (sleep 0.5)
# (写引脚 20 1)
# (sleep 0.5)
# (写引脚 20 0)
# (sleep 0.5)))# (defun 关引脚 ()
# (关引脚 13)
# (关引脚 19)
# (关引脚 20))# (defmacro 导出引脚 (pin)
# (let ((in (gensym)))
# `(with-open-file (,in “/sys/class/gpio/export” :direction :output :if-exists :overwrite)
# (format ,in “~A” ,pin))))# (defmacro 引脚模式 (pin mode)
# (let ((in (gensym)))
# `(with-open-file (,in (format nil “~a~a~a” “/sys/class/gpio/gpio” ,pin “/direction”) :direction :output :if-exists :overwrite)
# (format ,in “~A”
# (cond
# ((eql ‘OUT ‘,mode) “out”)
# ((eql ‘IN ‘,mode) “in”)
# (t (format t “您输入的参数不对,请重新输入out或in”)))))))# (defmacro 写引脚 (pin value)
# (let ((in (gensym)))
# `(with-open-file (,in (format nil “~a~a~a” “/sys/class/gpio/gpio” ,pin “/value”) :direction :output :if-exists :overwrite)
# (format ,in “~A” ,value))))# (defmacro 关引脚 (pin)
# (let ((in (gensym)))
# `(with-open-file (,in “/sys/class/gpio/unexport” :direction :output :if-exists :overwrite)
# (format ,in “~A” ,pin))))# (defmacro 读引脚 (pin)
# (let ((in (gensym)))
# `(with-open-file (,in (format nil “~a~a~a” “/sys/class/gpio/gpio” ,pin “/value”) :if-does-not-exist nil)
# (read ,in))))# https://github.com/robert-strandh/SICL
# 可移植的路径名库
# git clone https://github.com/edicl/cl-fad.git# 正则表达式库
# git clone https://github.com/edicl/cl-ppcre.git# Common Lisp的可移植Unicode库
# git clone https://github.com/edicl/cl-unicode.git# on lisp
# git clone https://github.com/xcv58/onlisp-cn.git# Ubuntu系统编写shell脚本程序一次安装多个软件包
# 编写shell脚本程序一次安装多个软件,主要用于一些软件依赖环境配置。# 1、shell脚本程序必须以下面的行开始(必须方在文件的第一行):
# #!/bin/sh
#
# 符号#!用来告诉系统它后面的参数是用来执行该文件的程序。在这个例子中我们使用/bin/sh来执行程序。# 2、当编辑好脚本后,还必须使其可执行。
# 使脚本可执行:
# chmod +x filename# 3、然后,您可以通过输入: ./filename 来执行您的脚本。
# 如下:
# 下面是我安装Oracle11g之前,安装Oracle11g依赖的多个软件包:
# 1、在vi中编辑如下文件
# !/bin/sh
# sudo apt install automake -y
# sudo apt install autotools-dev -y
# :wq orasetup #(注释)保存为以orasetup为名字的文件
# 2、终端中编译: chmod +x orasetup
# 3、运行安装,终端中输入: sudo ./orasetup
!