修改sources.list
sudo gedit /etc/apt/sources.list
将里面的文件换成以下的任意一个内容(哪个好用用哪个)(这里提供其他的源如果想要更换你们可以自行提取链接)
清华源
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-updates main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-security main restricted universe multiverse
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-security main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-backports main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic main universe restricted
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic main universe restricted
中科大源
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ bionic-updates main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ bionic-security main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ bionic-security main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ bionic-backports main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ bionic main universe restricted
deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ bionic main universe restricted
更新升级package
sudo apt-get update
sudo apt-get upgrade
安装包下载链接
sudo apt install ./sdkmanager_1.6.1-8175_amd64
sdkmanager #直接输入sdkmanager就行
(1) 25%左右后面会让你选择手动运行(automatic setup)还是自动运行(manual setup),一定要选择手动运行(automatic setup)亲测自动运行根本行不通
(2) 50%左右(各个人不一样)agx自动开机,需要重新进行配置,然后记住你设置的账号密码地址,后面虚拟机上需要输入(如果agx地址没有自动显示可以再agx终端上使用ifconfig命令查看)
sudo nvpmodel --query
sudo nvpmodel -m 0
sudo sh -c "echo 150 > /sys/devices/pwm-fan/target_pwm"
买一块M.2KeySSD的固态
将agx倒过来把两个支架拆开
用卡片或者小针伸进板子和壳之间的缝里撬开它,他们之间主要就是依靠下图的这些卡口连在了一起所以直接撬开就行,注意撬开后一定要慢慢拿起,里面有一根风机线很细容易断
装好固态后,将其他的地方也重新装好,将agx开机
SSD挂载(原链接)提取了其中的精华
(1) NVMe SSD硬盘仅作为系统盘(rootfs和用户区),系统的启动引导依然是通过SD卡或EMMC,比如升级设备树dtb 还是在SD卡或EMMC中
(2) 准备M.2 Key M SSD
(3) 打开Ubuntu18.04自带 Disks 工具,‘Ctrl+F’ 或点击右上角选择‘Format Disk’ 并将其格式化为GPT 格式(可以在搜索中搜到disks工具)
(4) 格式化时必须选择“Ext4”, 等待完成后,点击下方 ‘三角按钮’,mount 到固定目录如/media/nvidia/xxxx
(5) 参考下图:
git clone https://github.com/jetsonhacks/rootOnNVMe.git
cd rootOnNVMe
./copy-rootfs-ssd.sh
./setup-service.sh
reboot
(7) 去home查看属性就可以看到你的内存已经变多啦!
sh Miniforge-pypy3-4.8.3-4-Linux-aarch64.sh
# 这里使用国科大镜像源
conda config --prepend channels https://mirrors.ustc.edu.cn/anaconda/pkgs/main/
conda config --prepend channels https://mirrors.ustc.edu.cn/anaconda/pkgs/free/
conda config --set show_channel_urls yes
# 清华镜像源
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --set show_channel_urls yes
执行完以上命令会在当前用户目录下生成一个.condarc文件,运行cat ~/.condarc命令查看文件内容(一定要把- defaults删除掉,博主就是因为没有删除defaults后面创建虚拟环境有很多错):
channels:
- https://mirrors.ustc.edu.cn/anaconda/pkgs/free/
- https://mirrors.ustc.edu.cn/anaconda/pkgs/main/
- defaults
show_channel_urls: true
conda update --all #更新所有库
conda create -n pytorch python=3.6
sudo apt-get install python3-pip libopenblas-base libopenmpi-dev
pip3 install Cython
pip3 install numpy torch-1.10.0-cp36-cp36m-linux_aarch64.whl
python3 -c 'import torch; print(torch.cuda.is_available())' #如果成功了就会返回TRUE
pip3 install -U "numpy==1.19.4"
(2)设置OpenBLAS
vim ~/.bashrc
export OPENBLAS_CORETYPE=ARMV8
source ~/.bashrc
sudo apt-get install libjpeg-dev zlib1g-dev
git clone --branch <version> https://github.com/pytorch/vision torchvision # 将‘ ’改为所需要的版本号
cd torchvision
sudo python setup.py install
export BUILD_VERSION=<version>
cd ../ # attempting to load torchvision from build dir will result in import error
#pip install 'pillow<7' # always needed for Python 2.7, not needed torchvision v0.5.0+ with Python 3.6
git clone https://github.com/jetsonhacks/installROSXavier.git
cd installROSXavier
./installROS.sh -p ros-melodic-desktop -p ros-melodic-rgbd-launch
sudo gedit ~/.bashrc
export LD_LIBRARY_PATH=/opt/ros/melodic/lib
export LC_ALL="C"
sudo apt update
sudo apt install ros-melodic-desktop-full
wget https://code.visualstudio.com/sha/download?build=stable&os=linux-deb-arm64
sudo dpkg -i code_1.57.1-1623936438_arm64.deb
code
sudo apt install libgtk2.0-0
sudo dpkg -i linuxqq_2.0.0-b2-1089_arm64.deb