Deep Learning

Jump to: navigation, search


Install tensorflow on Nvidia Jetson Nano

Jetson nano setup

This installation works:

Configure Jetson Nano

Run the below script to add a 2GB swap file

sudo fallocate -l 2G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
sudo swapon --show
sudo cp /etc/fstab /etc/fstab.bak
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab

Lock Jetson Nano at its maximum frequency and power mode

sudo jetson_clocks
sudo nvpmodel -m 0

Install Deep Learning Frameworks and Libraries

sudo apt install -y git \
cmake \
libatlas-base-dev \
gfortran \
python3-dev \
python3-pip \
libhdf5-serial-dev \

point the default Python executable to Python3

echo "export PATH=$PATH:/$HOME/.local/bin" >> .bashrc
echo "alias python=python3" >> .bashrc
echo "alias pip=pip3" >> .bashrc
source .bashrc

Install PIP to manage Python modules

cd ~
sudo python

Set up the Virtual Environment

sudo apt-get install virtualenv
python3 -m virtualenv -p python3 <chosen_venv_name>
python3 -m virtualenv -p python3 DL_lab2

Activate the Virtual Environment

source <chosen_venv_name>/bin/activate
source DL_lab2/bin/activate

Install TensorFlow and its dependencies

pip install -U pip setuptools --user
pip install --user numpy
pip install --user --extra-index-url tensorflow-gpu==1.13.1+nv19.3
pip install --user keras
pip install --user jupyter
pip install --user pillow
pip install --user matplotlib

Deactivate the Virtual Environment

# jupyter notebook Documents/TensorFlowLAb/notebooks/

Exercices from the book

Personal tools
MediaWiki Appliance - Powered by TurnKey Linux