Jetson4.6 安装pytorch1.8.0 cuda10.2
时间: 2023-09-26 15:05:14 浏览: 116
适合cuda10.2,torch1.8.0的环境使用
在Jetson 4.6上安装PyTorch 1.8.0和CUDA 10.2可以按照以下步骤进行:
1. 安装依赖项:在终端中运行以下命令来安装必要的依赖项:
```
sudo apt-get update
sudo apt-get install -y build-essential python3-pip python3-dev python3-setuptools libavcodec-dev libavformat-dev libswscale-dev libv4l-dev libxvidcore-dev libx264-dev libjpeg-dev libpng-dev libtiff-dev libgtk-3-dev libcanberra-gtk* libatlas-base-dev gfortran libhdf5-serial-dev protobuf-compiler libprotobuf-dev openssl libssl-dev libffi-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libdc1394-22-dev libopenexr-dev libeigen3-dev libtbb-dev libvtk6-dev zlib1g-dev liblapack-dev liblapacke-dev libopenblas-dev libopenblas-base libatlas-base-dev liblapack3 liblapack-dev liblapacke liblapacke-dev liblapack-pic python3-numpy python3-scipy python3-matplotlib python3-sklearn python3-skimage python3-h5py python3-yaml python3-pyqt5 libgstreamer1.0-0 libgstreamer-plugins-base1.0-0
```
2. 下载JetPack 4.6的CUDA工具包:从NVIDIA Jetson下载页面下载适合你的Jetson版本的CUDA工具包。
3. 安装CUDA工具包:在终端中进入下载目录,运行以下命令来安装CUDA:
```
sudo dpkg -i cuda-repo-l4t-10-2-local-10.2.89_1.0-1_arm64.deb
sudo apt-key add /var/cuda-repo-10-2-local-10.2.89/7fa2af80.pub
sudo apt-get update
sudo apt-get install cuda-toolkit-10-2
```
4. 安装PyTorch:在终端中运行以下命令来安装PyTorch:
```
sudo apt-get install python3-pip libopenblas-base libopenmpi-dev
sudo pip3 install Cython
sudo pip3 install numpy torch-1.8.0+cu102 torchvision-0.9.0+cu102 -f https://download.pytorch.org/whl/cu102/torch_stable.html
```
5. 验证安装:在终端中运行以下命令来验证PyTorch和CUDA是否成功安装:
```
python3
import torch
print(torch.__version__)
print(torch.cuda.is_available())
```
如果你看到了PyTorch的版本信息以及True(即CUDA可用),说明安装成功。
注意:以上步骤仅适用于Jetson 4.6和PyTorch 1.8.0和CUDA 10.2,如果你的系统或版本不同,请查看相应的安装方法。
阅读全文