Getting started with the Jetson Nano - part 3
Jetson Nano image courtesy of NVIDIA/Pimoroni |
In this part you'll install Jupyter Notebook, Jupyter lab, TensorFlow and some other software that is needed to run the first TensorFlow notebook.
Once started, you can leave the software installation to run; it takes about an hour on a Nano in 10W power mode. It probably takes a little longer if you're using a 2.5A supply.
There's a final manual stage which takes a couple of minutes.
When that's complete you'll be able to work through the TensorFlow example, training a Neural Net to recognise item images from a Fashion database and then testing it in previously unseen images.
Here's what you'll do, in a little more detail.
Installing the software
Open a terminal window on the Nano (A short-cut, crl-alt-T should do it).
You'll be in your home directory; type
git clone https://github.com/romilly/nano.git
You should see a message 'cloning into nano' followed by some descriptive text.
Next, change into the newly-created nano directory and list the contents. Type
cd nano
ls
You should see a display like this:
Now change into the scripts directory, prepare the scripts for execution, and check the contents. Type
cd scripts
chmod a+x *.sh
ls
The result should look like this:
If you're cautious (and you should be!) you can check the contents of the scripts before you run any of them. You can use the linux cat command. Type
cat nano-tf-01.sh
The result should look like this:
The script has comments which explain what each line does.
You're ready to start installation.
Type
sudo -H ./nano-tf-01.sh
You will be asked for your password. Enter it.
The installation process will start. You can go and drink a coffee, cook a meal, or do a run - the installation should need no input, but it will take an hour or more.
The final screen should look something like this:
Nearly there! The next steps will only take a couple of minutes.
Configure Jupyter
Now you need to configure Jupyter Notebook ready for use.
You had to run the previous command as the super-user, using the sudo command, but you shouldn't do that for the next command. Just type
./configure-jupyter.sh
That will set up the Jupyter notebook with nano as its password.
If you want a different password - foo for example - you could instead type
./configure-jupyter.sh foo
One more step and you'll be ready to go. The next step will install the Jupyter server as a service. In other words, Jupyter will start up whenever the Nano is rebooted. Since you are changing the system configuration, you will need to run the final script as sudo. Type
sudo ./install-service.sh
Which will install the service and start it.
To check that it's running, go to a computer on your local network and open a browser on
http://[nano]
Where [nano]
You'll be asked for a password. Enter nano, or the password you chose just now when configuring Jupyter, if you decided not to accept the default.
You should see a screen like this:
Fantastic! You now have a powerful Deep Learning laboratory ready for your experiments.
And there's more good news. From now on, you have a choice. You can continue to use your Nano with a monitor, mouse and keyboard, or you can use it remotely from any computer on your network. That's how I work.
If you want to un-clutter your workspace by removing the monitor, mouse and keyboard, the next step will involve
- shutting down your Nano (see below)
- removing power.
- unplugging the peripherals, and then
- reapplying power
There are two ways you can shut down the Nano. You could use the mouse to click on the power icon at the top right of the Ubuntu desktop, but that won't work once you start running the Nano headless (without keyboard, mouse and monitor attached).
Instead you can shut the nano down from the browser window! Here's a short video:
To do that,
- Click on the terminal icon in the launcher window. A terminal window will open.
- In the terminal window, type sudo shutdown now -h
- When prompted, enter your password.
Unplug the monitor, mouse and keyboard. If you want to, you can move the Nano to a new home at this stage. Remember that it will need power and an Ethernet connection in its new home!
Once the Nano is where you want it, make sure the Ethernet cable is plugged in and apply power. The green light on the Nano will come on again.
Give the nano a few seconds to boot up and open a browser window on the same url as before: http://
Once again, you'll be asked for the Jupyter password. Next you'll open a Jupyter Notebook and run your first TensorFlow example.
Below, you'll find step by step instructions. First, a video.
Here's what you need to do:
- In the left-hand pane, click on notebooks.
- Click on basic-classification.ipynb. The notebook will open.
- Click on the run menu and chose run all cells.
If you're new to Deep Learning, Jupyter or TensorFlow you may not follow everything that's going on.
Don't worry.
Part 4 will take a much slower-paced run through another notebook, with more detailed explanation. After that, you'll learn how to import and export save models and explore transfer learning.
Thank you
ReplyDelete'To check that it's running, go to a computer on your local network and open a browser on
ReplyDeletehttp://:8888
Where is the hostname you chose when installing Ubuntu on your Nano.'
Hi, I am stuck at this part.How to browse it?
Than you,but I have a problem. I put nano for Password but it says invalid credentials,always. How to by pass the password? thankss
ReplyDeleteWithout more information on what you did earlier it's hard to tell what has gone wrong. You presumably had to go back to the installation of Ubuntu and start again from scratch.
DeleteThere was a typing error in the instructions, which I have now corrected.
ReplyDeleteWhen you set up the nano in part 2 of the instructions, Ubuntu asks you to chose a hostname for the computer. That's what you need to use here. If you chose 'nano' for the hostname. you'd need to type 'http://nano:8888'