The most recent version of NVIDIA JetPack is 2.2., which supports the NVIDIA Jetson TX1 and Jetson TK1. The big news is that the latest version of JetPack 2.2 turns the userspace to 64 bit! In earlier versions of JetPack, the kernel was 64 bit, but the userspace was 32 bit apparently from what a source has told me.
Now with the userspace at 64 bit, you’ll have an easier time compiling and running arm64 libraries. Note that we’ll be flashing our NVIDIA Jetson TX1, so everything on it will be formatted. Remember to back up your files!
We made an earlier post last year on how to run CUDA 7.0 on NVIDIA Jetson TX1. In this post, we’ll outline very detailed instructions on setting up CUDA 7.0 for the NVIDIA Jetson TX1s from start to finish.
- NVIDIA Jetson TX1, AC adapter, and WiFi antennas
- HDMI cable and monitor
- Computer with Ubuntu 14.04 or Laptop with VirtualBox
- Micro-B to USB Cable
Step 1) We create an Ubuntu 14.04 x86 64-bit virtual machine with at least 15 GB of space to be safe.
I’m using VirtualBox to create the Ubuntu 14.04 x86 64-bit virtual machine. If you have an Ubuntu 14.04 x86 64-bit host operating system, you do not have to create the virtual machine. 15 GB of space will give you enough room for the Jetpack downloaded files. I set mine with 30 GB of space because I want to have other stuff on this VM for later.
Step 2) On the virtual machine, download the latest Jetpack installer here. You will need to log in or create a new member account.
The latest version of Jetpack installer will be below. We are using JetPack Version 2.2.
After logging in, hit the blue button and download JetPack.
Step 3) You should have a file called JetPack-L4T-2.2-linux-x64.run. The name may be different, but we want to run it.
Open up a new terminal and go to the directory where JetPack was downloaded.
We want to change the permissions of JetPack, so that we can run it in the terminal.
chmod 755 JetPack-L4T-2.2-linux-x64.run
Now, we can run the program.
Step 4) Downloading JetPack packages.
After running the above terminal command, a JetPack window should pop up.
Hit Next a couple of times.
Jetson TX1 Development Kit (64-bit) and hit Next.
Custom because we don’t need half of the JetPack stuff.
We will set most of these to
no action by clicking underneath the Action column and setting the packages to no action.
The packages that we want are:
CUDA Toolkit for Ubuntu 14.04, Linux for Tegra (TX1 64-Bit), Flash OS, CUDA Toolkit for L4T, and Compile CUDA Samples.
We just don’t need most of the other stuff if you only want CUDA on your NVIDIA Jetson TX1. Pick and choose any other extra packages if you want them.
Step 5) Hit Next to initiate the download and wait.
Hit Next and Accept All Terms and Conditions.
Depending on the component selection, please pay attention to the prompt embedded terminal. OK.
Sit back and relax because these download files are fairly big, so we’ll have to wait a while.
JetPack Host installation will complete, and you can click Next to Proceed.
The prompt will ask you about
Network Layout. I chose Device accesses Internet via router/switch.
Please select the network interface on host that connects to the same router/switch as:
wlan0 because I will be using the antennas to access the Internet through Wi-Fi. Our host computer will be using the Internet to send files to our NVIDIA TX1 Jetson. Hit Next.
Step 6) Post Installation. We will have to put our NVIDIA TX1 Jetson in Force USB Recovery Mode.
After hitting Next on this prompt, you will be brought to the Flash 64 Bit OS to TX1 device step.
The black terminal window says that we have to put the Jetson into Force USB Recovery Mode.
- Power down the Jetson.
- Connect the Micro-B to USB cable from the Jetson to your computer.
- Press the POWER button and let go. The Jetson powers up like normal. Press and hold the FORCE RECOVERY button, and while holding the FORCE RECOVERY button, press the RESET button and let go of the RESET button. After two more seconds, let go of the FORCE RECOVERY button.
Make sure that your virtual machine detects the
NVIDIA Corp USB device. Go to the Devices tab at the top of the virtual machine, go to USB, and select NVIDIA Corp. APX.
Back at the black terminal window, press
Enter, and the OS flashing starts. Now, you just wait.
Flashing completes, and you press Enter in the black terminal window.
Step 7) After flashing completes, connect an HDMI cable to your monitor. Your Jetson should have booted into Ubuntu 14.04. Connect to Wi-Fi on your Jetson.
Your virtual machine wants to run the CUDA installation instructions to your Jetson, but it can’t find the Jetson’s IP address!
If you connect your Jetson to a monitor, you will see that your Jetson should have booted into Ubuntu 14.04. Now, we connect the Jetson to Wi-Fi.
The password for the ubuntu user is:
I’m only using the keyboard to maneuver. Press
ALT + F1, press
Enter, and search for “Network.” Use tabs to maneuver and open Wi-Fi. Connect to a WiFi network.
Now, we want to open a terminal and press
CTRL + ALT + T. With the terminal open, we type:
We see that the given IP address for our Jetson is:
Now back on our virtual machine on this screen, we hit
2 and press Enter.
A JetPack window will pop up and we can fill in the:
Device IP address, User Name, and Password:
User Name and Password are both
ubuntu. Hit Next, and you will be brought to Post Installation for CUDA for the Jetson.
Step 8) Post installation for CUDA.
Hit Next on this screen.
JetPack will be copying CUDA files onto the Jetson through the Internet. It will also run CUDA installation commands on your Jetson.
CUDA takes a really long time to copy and install, so you’ll be waiting a long while. After CUDA finishes, a JetPack window will pop up and Installation will be Complete.
Step 9) Making sure that CUDA is installed on the Jetson.
Back to the Jetson, open a new terminal with
CTRL + ALT + T.
You can use
cuda-l4t.sh to install CUDA 7.0. In this folder, there is also the .deb file for CUDA 7.0.
sudo ./cuda-l4t.sh .cuda-repo-l4t-7-0-local_7.0-76_arm64.deb 7.0 7-0
Y and Enter on any prompt asking for permission. CUDA 7.0 should be installed, but its binaries haven’t been applied globally yet. An entry has been automatically added to
~/.bashrc, but you still need to reload the
Now, check if CUDA 7.0 is installed.
nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2015 NVIDIA Corporation Built on Thu_May__5 22:52:38_CDT_2016 Cuda compilation tools, release 7.0, V7.0.74
Step 10) Testing if CUDA 7.0 works on the Jetson.
JetPack has set up some CUDA samples that we can use to test.
We can run the Ocean Simulation sample. Cool!
We can test the nbody sample to check our Jetson’s performance.
./nbody -benchmark -numbodies=65536
264.744 single-precision GFLOP/s at 20 flops per interaction. In the past, we’ve gotten
318.763 single-precision GLOP/s at 20 flops per interaction.
But, we certainly know that CUDA 7.0 is working on the NVIDIA Jetson TX1! Leave any questions below, and run more CUDA samples for fun.