Skip to content

Example Host Setup Instructions

Brian Berard edited this page Jun 22, 2020 · 1 revision

These notes were assembled by Brad Porter during his initial setup of this project on his personal machine. They serve as a guide to help users setup a fresh installation of Ubuntu 18.04 from scratch, but will not be fully comprehensive for every user's PC.


I started with a clean installation of Ubuntu 18.04 Desktop on a Razer Blade 14” Intel 7700HQ (2017 RZ09-0195) with 16GB of RAM, 8 core 3.8ghz i7 and an NVIDIA GeForce GTX 1060. I allocated 125GB to the partition and am using about 40GB after installation. I also procured an Intel RealSense 435i camera.

If I had been smart, I might have disabled Safe Boot before starting all this. I didn't. More on that later.

Before you start, go ahead and add make, cmake, gcc, emacs to your Ubuntu install out the gate. You'll need to add other tools as you go too.

Install git

I followed the instructions here...

https://www.digitalocean.com/community/tutorials/how-to-install-git-on-ubuntu-18-04-quickstart

Grab your SSH key for GitHub. I found this link helpful for testing I was set up correctly:

https://help.github.com/en/github/authenticating-to-github/testing-your-ssh-connection

Use git clone to pull down distance-assistant.

Install Docker

I found the instructions here to be helpful. I chose to follow the instruction for doing it from the repository rather than a package or convenience script.

https://docs.docker.com/engine/install/ubuntu/

Buried in the directions is a tip that you need to add your username to the docker group:

sudo usermod -aG docker your-user

Or you might need to create the dockergroup:

https://docs.docker.com/engine/install/linux-postinstall/

You'll need to log out or reboot. I wouldn't mess around with su -s like one site recommends. Use "groups" or "id" to verify your account is in the docker group.

Install your NVIDIA drivers

Here I made a mistake and skipped to Cuda first. I wouldn't recommend that. Get your NVIDIA setup running. You'll know it is running when the command "nvidia-smi" returns relevant information instead of an error.

Unfortunately, there are a lot of different ways to get the NVIDIA drivers going and I went down a few painful paths first. Seems like after a lot of pain, the simple answer seems to have been to try this:

sudo apt install nvidia-driver-440

That said, this might have worked better, but I was already too far down too many bad paths and never tried it:

sudo ubuntu-drivers autoinstall

The NVIDIA installer took me through creating a password for UEFI boot and then restarting, but didn't make it clear I had to go through configuration steps in the boot screen that popped up. Once I figured that out and entered my password, it worked.

Install CUDA

The instructions here are pretty good... but they leave you with a choice of using distribution-specific packages (.deb) or distribution-independent (.run). I initially went for the .run instead of the .deb. That was another path of pain, though it might have worked if I had gotten the NVIDIA drivers going first. Follow the pre-installation instructions, then download the .deb, and then follow the Ubuntu installation instructions.

https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html

Install Intel RealSense

The instructions here are pretty good... just be careful that some instructions only apply to older versions of Ubuntu. You can skip those. Also, the installation generally wants you to have your device unplugged, but then doesn't tell you how to test it. The easiest way I found to test it was to go into the librealsense/build/examples/hello-realsense and run rs-hello-realsense. If it pops up and tells you how close the nearest object is, then you're good.

https://dev.intelrealsense.com/docs/compiling-librealsense-for-linux-ubuntu-guide

Running Distance Assistant

At this point, the README instructions on distance assistant are helpful. Don't forget to download the weights file and build the docker image. At this point, probably a good idea to reboot. Once you're back in, check that nvidia-smi still says something reasonable. I would try running rs-hello-realsense and make sure the camera is working. If those look good, Distance Assistant should work. Worked for me.