Skip to content

Create SD Card Image From Scratch

John edited this page Apr 3, 2019 · 24 revisions

This page details how to create the JetBot SD card image from scratch.

This is useful in case you want to distribute a modified version of the JetBot SD card image.

  1. Flash SD card by following Getting Started with Jetson Nano Developer Kit.

    • Use the username / password jetbot / jetbot
    • Make sure to log in automatically
  2. Insert SD card into Jetson Nano and power on

  3. Enable i2c permissions

    sudo usermod -aG i2c $USER
  4. Install pip and some python dependencies

    sudo apt-get update
    sudo apt install python3-pip python3-pil
    sudo pip3 install --upgrade numpy 
  5. Install the pre-built TensorFlow pip wheel by following these instructions

  6. Install the pre-built PyTorch pip wheel we provide for this project.

    sudo pip3 install torch-1.0.0a0+18eef1d-cp36-cp36m-linux_aarch64.whl
    sudo pip3 install torchvision
  7. Install traitlets (master, to support the unlink() method)

    sudo python3 -m pip install git+https://github.com/ipython/traitlets@master
  8. Install jupyter lab

    sudo apt install nodejs npm
    sudo pip3 install jupyter jupyterlab
    sudo jupyter labextension install @jupyter-widgets/jupyterlab-manager
    sudo jupyter labextension install @jupyterlab/statusbar
    jupyter lab --generate-config
    jupyter notebook password

    You should then enter the password jetbot (unless you want to use a custom password).

  9. Install this repo

    cd
    sudo apt install python3-smbus
    git clone https://github.com/NVIDIA-AI-IOT/jetbot
    cd jetbot
    sudo apt-get install cmake
    sudo python3 setup.py install
  10. Install jetbot services

    cd jetbot/utils
    python3 create_stats_service.py
    sudo mv jetbot_stats.service /etc/systemd/system/jetbot_stats.service
    sudo systemctl enable jetbot_stats
    sudo systemctl start jetbot_stats
    python3 create_jupyter_service.py
    sudo mv jetbot_jupyter.service /etc/systemd/system/jetbot_jupyter.service
    sudo systemctl enable jetbot_jupyter
    sudo systemctl start jetbot_jupyter
  11. Make swapfile

    sudo fallocate -l 4G /var/swapfile
    sudo chmod 600 /var/swapfile
    sudo mkswap /var/swapfile
    sudo swapon /var/swapfile
    sudo bash -c 'echo "/var/swapfile swap swap defaults 0 0" >> /etc/fstab'
    
  12. Copy JetBot notebooks to home directory

    cp -r ~/jetbot/notebooks ~/Notebooks
    

Analytics

Clone this wiki locally