Jetson Agx Xavier 安装cuda10.2和cudnn,pytorch,pycharm, unet

1.refer to Jetson Agx Xavier 安装cuda10.2和cudnn_tianzhenba的博客-CSDN博客_agx 安装cuda

 

bash cuda-l4t.sh cuda-repo-l4t-10-2-local-10.2.89_1.0-1_arm64.deb 10.2 10-2

finished
Jetson Agx Xavier 安装cuda10.2和cudnn,pytorch,pycharm, unet_第1张图片

2. cuDNN

sudo dpkg -i libcudnn8_8.0.0.180-1+cuda10.2_arm64.deb
sudo dpkg -i libcudnn8-dev_8.0.0.180-1+cuda10.2_arm64.deb
sudo dpkg -i libcudnn8-doc_8.0.0.180-1+cuda10.2_arm64.deb

finished

Jetson Agx Xavier 安装cuda10.2和cudnn,pytorch,pycharm, unet_第2张图片

3. 安装完成后,其实是直接安装到了默认安装路径usr/include和usr/lib下的,因此需要将其拷贝到cuda安装路径下:

sudo cp /usr/include/cudnn.h  /usr/local/cuda/include/
sudo cp /usr/lib/aarch64-linux-gnu/libcudnn*  /usr/local/cuda/lib64/

little question:No space left on device

Jetson Agx Xavier 安装cuda10.2和cudnn,pytorch,pycharm, unet_第3张图片

4.jixu 

cd /usr/local/cuda/lib64
sudo chmod +r libcudnn*
sudo rm -rf libcudnn.so libcudnn.so.8
sudo ln -s libcudnn.so.8.1.1 libcudnn.so.8
sudo ln -s libcudnn.so.8 libcudnn.so

sudo ldconfig

I don't know what's the question.

Another blog solver it:

Jetson AGX Xavier配置cuDNN流程_gdxmn的博客-CSDN博客_cudnn安装教程

This idea can solver it. Good!

5.CUDA & cuDNN

查看cudnn版本

nvcc -V

if "nvcc: command not found" appears

已经安装了CUDA-10.2,仍然出现上述问题,解决方案如下:

添加环境变量,打开~/.bashrc ,添加环境变量如下:

export LD_LIBRARY_PATH=/usr/local/cuda/lib
export PATH=$PATH:/usr/local/cuda/bin

保存后记得更新生效
source ~/.bashrc

查看cudnn版本

cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2

Then:

Jetson Agx Xavier 安装cuda10.2和cudnn,pytorch,pycharm, unet_第4张图片

6.pytorch & torchvision

refer to:

Jetson AGX Xavier配置PyTorch与TorchVision流程_gdxmn的博客-CSDN博客_jetson torchvision

torch, torchvison

PyTorch v1.6的wheels下载链接为:

https://nvidia.box.com/shared/static/yr6sjswn25z7oankw8zy1roow9cy5ur1.whl

torch

安装命令为:

sudo apt-get install python3-pip libopenblas-base libopenmpi-dev

pip3 install Cython

pip3 install numpy ~/下载/torch-1.6.0rc2-cp36-cp36m-linux_aarch64.whl

torchvision

安装命令为:

sudo apt-get install libjpeg-dev zlib1g-dev

git clone --branch v0.7.0-rc2 https://github.com/pytorch/vision torchvision

cd torchvision

sudo python3 setup.py install

cd ../

if use:

pip3 install torchvison==0.7, WRONG!!!!  I don't know why!

torch is OK now!

7.Pycharm

Jetson AGX Xavier安装Pycharm_围白的尾巴-CSDN博客

OK NOW!

8. Code is right!

你可能感兴趣的:(计算机视觉,pytorch,深度学习,人工智能)