- RQ-TITAN
- 태양광
- 태양 충전 케이스
- SIOR-TITAN
- Arduino
- 태양전지
- 오디세이 x86
- UART
- PCB Artwork
- opencv-python
- 윈도우10
- 모션제어
- pcb
- Canny
- pcb 설계
- 태양광 충전 휴대폰케이스
- opencv
- 체험지수
- Motion Estimation
- odyssey x86J4105
- Imitating Arm
- 아두이노
- 태양광 휴대폰케이스
- JLCPCB
- Video
- Python
- artwork
- 태양광 충전케이스
- motion recognition
- EasyEDA
- Today
- Total
제너럴공국
Jetson Nano에 특정 버전 TensorFlow 설치하기 본문
오늘은 젯슨 나노의 초기 환경 설정 및 텐서플로우 설치과정을 정리해보겠습니다.
저는 텐서플로우 버전때문에 애를 좀 먹어서, 이 부분을 중점적으로 정리해보겠습니다.
2단계와 7단계가 가장 중요합니다!!!
<하드웨어 단계>
1단계) Jetson nano와 다른 부속품도 같이 구매하였습니다.
- Jetson nano
- 전용어댑터(5V 4A)
- 무선 랜카드(intel 8260AC 867MBPS [SZH-IWA006])
- 무선 랜카드 안테나+케이블[SZH-IWA013]
- Jetson Nano 금속 케이스 블랙 2 [SZH-JET005]
전용어댑터의 요구 전류가 좀 특이합니다. 같이 구입하시는 거 추천드립니닷.
<이미지 플래시 단계>
2-1단계) 이미지 파일 최신 버전 다운로드
공식 사이트에서 이미지 파일을 다운로드 받습니다. 아래 사이트에서 젯슨 나노의 초기 사용과 "최신 이미지 파일"을 다운 받을 수 있습니다. 하지만!!! 여기서 문제가 있습니다.
2-2단계) 이미지 파일 구 버전 다운로드
젯슨 나노는 이전 버전의 OS 이미지를 제공합니다. 아래 사이트에서 접근이 가능한대요. 이 기능이 왜 중요할까요? 바로 젯슨 이미지마다 텐서플로우와 호환성(Compatibility)이 다르기 때문입니다.
아래 표는 굉장히 중요한 표입니다. 본인이 특정 버전의 텐서플로우를 사용하고 싶다면 꼭 그에 해당하는 JetPack Version을 설치해주어야해요. 다른 버전에서 다른 텐서플로우를 작동시킬 수 있는 방법이 있긴하지만, 저는 너무 어렵고 복잡해서 포기했습니다. 처음부터 잘 설치해주는게 마음편해요.
Release Notes For Jetson Platform :: NVIDIA Deep Learning Frameworks Documentation
This document describes the key features, software enhancements and improvements, and known issues regarding Tensorflow 1.15.3 and 2.2.0 on the Jetson platform. Key Features and Enhancements This release includes the following key features and enhancements
docs.nvidia.com
3단계) 그럼 이제 내가 어떤 버전의 JetPack 이미지가 필요한지 알았으니, 아래 Archive에서 다운받으시면 됩니다. 저 형광펜 부분을 클릭하시면 됩니다.
developer.nvidia.com/embedded/jetpack-archive
JetPack Archive
This page includes access to previously released versions of JetPack. Archived versions are no longer supported. The latest version of JetPack is always available under the main NVIDIA JetPack product page.
developer.nvidia.com
4단계) balena etcher로 이미지 플래시.이 부분은 공식 홈페이지가 가장 잘 설명해주더라구요.
developer.nvidia.com/embedded/learn/get-started-jetson-nano-devkit#write
Getting Started With Jetson Nano Developer Kit
The NVIDIA® Jetson Nano™ Developer Kit is a small AI computer for makers, learners, and developers. After following along with this brief guide, you’ll be ready to start building practical AI applications, cool AI robots, and more.
developer.nvidia.com
<텐서플로우 설치 단계>
5단계) 텐서플로우 설치 - 제 한국어 설명과 영어 설명을 함께 보시는거 추천해요.
docs.nvidia.com/deeplearning/frameworks/install-tf-jetson-platform/index.html#prereqs
Installing TensorFlow For Jetson Platform :: NVIDIA Deep Learning Frameworks Documentation
Installing TensorFlow for Jetson Platform provides you with the access to the latest version of the framework on a lightweight, mobile platform without being restricted to TensorFlow Lite.
docs.nvidia.com
6단계) Prerequisites and Dependencies 설치
#Install system packages required by TensorFlow
$ sudo apt-get update
$ sudo apt-get install libhdf5-serial-dev hdf5-tools libhdf5-dev zlib1g-dev zip libjpeg8-dev liblapack-dev libblas-dev gfortran
#Install and upgrade pip3
$ sudo apt-get install python3-pip
$ sudo pip3 install -U pip testresources setuptools
#Install the Python package dependencies
$ sudo pip3 install -U numpy==1.16.1 future==0.18.2 mock==3.0.5 h5py==2.10.0 keras_preprocessing==1.1.1 keras_applications==1.0.8 gast==0.2.2 futures protobuf pybind11
7단계) Tensorflow 설치
$ sudo pip3 install --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v$JP_VERSION tensorflow==$TF_VERSION+nv$NV_VERSION
위의 코드에서 본인의 Jetpack 버전과 TensorFlow 버전을 잘 입력해주세요. 위에서도 보여드렸던, 표를 다시 한 번 보고 잘 입력해주세요.
- $JP_VERSION: 젯팻 버전의 앞자리 2개의 숫자를 가져오면 됩니다. Ex) 4.2.x 버전은 42, 4.3 버전은 43
- $TF_VERSION: 텐서플로우 버전을 입력해주시면 됩니다. Ex) 1.15.0
- $NV_VERSION: NVIDIA container 버전을 입력해주시면 됩니다. Ex) 19.12
Ex) TensorFlow 1.15.0를 컨테이너 19.12, JetPack 4.3에서 설치하고자 한다면 아래코드를 입력하면 됩니다.
$ sudo pip3 install --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v43 tensorflow-gpu==1.15.0+nv19.12
Ex) TensorFlow 1.13.1를 컨테이너 19.03, JetPack 4.2.x에서 설치하고자 한다면 아래코드를 입력하면 됩니다.
$ sudo pip3 install --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v42 tensorflow-gpu==1.13.1+nv19.3
8단계) 설치는 1~2시간이 소요됩니다. 기다려주세욧. 저는 잘 됬네요.
python3
import tensorflow as tf
<완료>
9단계) 이제 텐서플로우로 잘 작업해주시면 됩니다. 그리고 저는 OpenCV가 디폴트로 깔려있더라구요. ㅎㅎ 이것저것 해봤습니다.