Jetson Nano セットアップの個人的なメモ

良い感じのおもちゃを手に入れたのでとりあえず個人的なセットアップのメモ✍
このメモを書いたときの JetPack のバージョンは 4.4 でした😌

# 起動らへんまで

1. [Jetson Download Center](https://developer.nvidia.com/embedded/downloads) とかから Jetson Nano Developer Kit SD Card Image をダウンロードする。
2. microSDXC にダウンロードしたイメージ (zip 圧縮されてたので解凍して中身の .img ファイル) を書き込む。  
    ※ 今回は Mac で作業してたので [Etcher](https://www.balena.io/etcher) なるソフトを使いました。
3. 向きに気をつけて microSDXC を Jetson Nano に挿入する。
4. (モニタとかキーボードとかマウスとか繋いで) USB を挿したら自動的に目覚めるはず。
5. Ubuntu なので普通に雰囲気でユーザ設定とかをする。

![Screenshot from 2018-01-29 01-08-09.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/169093/bb0a3a9c-a56c-83f3-b83b-05d917d1336a.png)

めっちゃ Ubuntu だけど NVIDIA 感あってかっこよい😊

# とりあえず apt update & apt upgrade

脳死で

```bash
$ sudo apt update
```

してみると、

```
Err:16 https://repo.download.nvidia.com/jetson/common r32.4 Release            
  Certificate verification failed: The certificate is NOT trusted. The certificate chain uses not yet valid certificate.  Could not handshake: Error in the certificate verification. [IP: 184.25.227.225 443]
Err:17 https://repo.download.nvidia.com/jetson/t210 r32.4 Release
  Certificate verification failed: The certificate is NOT trusted. The certificate chain uses not yet valid certificate.  Could not handshake: Error in the certificate verification. [IP: 184.25.227.225 443]
Get:18 http://ports.ubuntu.com/ubuntu-ports bionic-updates InRelease [88.7 kB]
Get:19 http://ports.ubuntu.com/ubuntu-ports bionic-backports InRelease [74.6 kB]
Get:20 http://ports.ubuntu.com/ubuntu-ports bionic-security InRelease [88.7 kB]
Reading package lists... Done       
E: Release file for file:///var/cuda-repo-10-2-local-10.2.89/Release is not valid yet (invalid for another 639d 7h 18min 15s). Updates for this repository will not be applied.
E: Release file for file:///var/visionworks-repo/Release is not valid yet (invalid for another 758d 10h 33min 34s). Updates for this repository will not be applied.
E: Release file for file:///var/visionworks-sfm-repo/Release is not valid yet (invalid for another 740d 1h 52min 57s). Updates for this repository will not be applied.
E: The repository 'https://repo.download.nvidia.com/jetson/common r32.4 Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'https://repo.download.nvidia.com/jetson/t210 r32.4 Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Release file for file:///var/visionworks-tracking-repo/Release is not valid yet (invalid for another 740d 1h 54min 19s). Updates for this repository will not be applied.
E: Release file for http://ports.ubuntu.com/ubuntu-ports/dists/bionic/InRelease is not valid yet (invalid for another 88d 7h 26min 17s). Updates for this repository will not be applied.
E: Release file for http://ports.ubuntu.com/ubuntu-ports/dists/bionic-updates/InRelease is not valid yet (invalid for another 969d 16h 52min 45s). Updates for this repository will not be applied.
E: Release file for http://ports.ubuntu.com/ubuntu-ports/dists/bionic-backports/InRelease is not valid yet (invalid for another 969d 14h 33min 16s). Updates for this repository will not be applied.
E: Release file for http://ports.ubuntu.com/ubuntu-ports/dists/bionic-security/InRelease is not valid yet (invalid for another 969d 15h 21min 48s). Updates for this repository will not be applied.
```

おや😲

ということで、とりま↓

```bash
$ sudo apt install ca-certificates
```

して、もっかい試してみたらちゃんと通りました😌

# Python 環境

Anaconda 使えないので Python 環境どうしよっかな。。。と悩んだ結果、とりあえず pipenv 使ってみようかね。となったので

```bash
$ curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python
```

で pipenv を入れました (root で)。setup-tools ないよと言われたので先に↓で入れとくと良さげかも😌

```bash
$ sudo apt install python-setuptools
```

pipenv 初心者かつ、そういう記事ではないので詳しい使い方は[ドキュメント](https://pipenv-ja.readthedocs.io/ja/translate-ja/)とかを読んでください🙇