Contents

Now you’ve get your new toy from the delivery man. Unbox your Jetson TX1 and attach a monitor and a keyboard.
You will see that your TX1 comes with Ubuntu 14.04.
Default Username and Passwd are: ubuntu and ubuntu.

  • Install the package that comes with your TX1 in ~
1
2
sudo NVIDIA-INSTALLER/installer.sh
sudo reboot
  • Download and install cuda for TX1
1
2
3
4
5
6
7
sudo dpkg -i cuda-repo-l4t-r23.1-7-0-local_7.0-71_armhf.deb
sudo apt-get install cuda-toolkit-7-0
sudo usermod -a -G video $USER
echo "# Add CUDA bin & library paths:" >> ~/.bashrc
echo "export PATH=/usr/local/cuda/bin:$PATH" >> ~/.bashrc
echo "export LD_LIBRARY_PATH=/usr/local/cuda/lib:$LD_LIBRARY_PATH" >> ~/.bashrc
source ~/.bashrc

If everything’s installed correctly, running ‘nvcc -V’ should give you a compiler version message.

  • Download and install opencv for TX1
1
sudo dpkg -i libopencv4tegra-repo_2.4.12.3_armhf_l4t-r23.deb
  • Download and install cudnn for TX1
    cudnn-7.0-linux-armv7-v3.0-prod.tgz
1
tar -xvf cudnn-7.0-linux-armv7-v3.0-prod.tgz

The files are in ./cuda now. Then copy the cudnn files into cuda path.

1
2
3
4
5
6
cd cuda
sudo cp include/cudnn.h /usr/local/cuda/include/
sudo cp lib/* /usr/local/cuda/lib/
cd /usr/local/cuda/lib/
ln -fs libcudnn.so.7.0.64 libcudnn.so.7.0
ln -fs libcudnn.so.7.0 libcudnn.so
  • Install caffe dependencies

This part is mostly the same with Caffe official installation guide for Ubuntu 14.04, except the opencv. You should be safe with the following guide, if not, please refer to Caffe official installation guide

1
2
3
4
sudo add-apt-repository universe
sudo apt-get update
sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libhdf5-serial-dev protobuf-compiler
sudo apt-get install --no-install-recommends libboost-all-dev
  • Install atlas as blas
1
sudo apt-get install libatlas-base-dev

or install OpenBLAS or MKL for better CPU performance.

  • Install remain dependencies in ubuntu 14.04
1
sudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-dev
  • Install caffe
1
2
3
4
sudo apt-get install -y git
git clone https://github.com/BVLC/caffe.git
cd caffe
cp Makefile.config.example Makefile.config

now compile caffe, remember Do NOT use all the cores by make all -j, or it hangs the system. Instead use the following.

1
make -j 3 all
1
2
# just to make sure everything is fine, leave this if you are in a rush
make -j 3 runtest

Finally you can run Caffe’s benchmarking code to measure the GPU performance.

1
build/tools/caffe time --model=models/bvlc_alexnet/deploy.prototxt --gpu=0

you may run into error: libcudart.so.7.0: cannot open shared object file: No such file or directory, to solve this, execute
sudo ldconfig /usr/local/cuda/lib

Contents