Skip to content
john- edited this page Aug 28, 2019 · 58 revisions

For the N2 (cart4) starting with minimal ubuntu image: ubuntu minimal

# from that page
sudo apt update
sudo apt full-upgrade
sudo reboot

# after reboot
dpkg-reconfigure tzdata

Edit /etc/hostname to change hostname

stuff

apt install emacs-nox git screen rsync zsh

useradd -m -s /usr/bin/zsh <user>
passwd <user>
usermod -aG sudo <user>

At this point can login remotely as user.

Change prompt to reflect git repo information

On odroid:

ssh-keygen

The keys can be copied to other hosts as appropriate

From appropriate hosts:

ssh-copy-id -i ~/.ssh/id_rsa.pub user@host

gnuradio stuff

sudo apt install airspy osmo-sdr gr-osmosdr
sudo apt install gnuradio # needed to install this after above due to qt5 dependency error
volk_profile # to optimize gnuradio.

base directories

sudo mkdir /cart
sudo chown <user> /cart
sudo chgrp <user> /cart
mkdir -p /cart/data/backup

database

Do things like /cart/data/backup/README on previous system to generate a DB dump. Copy over dump file and README to new system.

apt install postgresql
su postgres
psql -f dumped.sql

/etc/postgresql/10/main/pg_hba.conf

# Database administrative login by Unix domain socket
local   all             postgres                                trust

# TYPE  DATABASE        USER            ADDRESS                 METHOD
# "local" is for Unix domain socket connections only
local   all             all                                     trust
# IPv4 local connections:                                                                          
host    all             all             127.0.0.1/32            trust
# IPv6 local connections:
host    all             all             ::1/128                 trust

nginx

sudo apt install nginx

perl

Run cpan as normal user and select "sudo" for how to install modules.

add ssh pub key to github account and set email/user name

git config --global user.email "email@example.com"
git config --global user.name "name"

cart_console

cd /cart
git clone git@github.com:john-/cart_console.git

Follow INSTALL

ham2mon

cd /cart
git clone git@github.com:john-/ham2mon.git
cd ham2mon
git checkout -t origin/gain_changes_and_long_xmit_kill   # only if this branch is needed

rtl_fm-scanner

cd /cart
git clone git@github.com:john-/rtl_fm-scanner.git
cd rtl_fm-scanner
git checkout -t origin/move_to_file_watcher   # only if this branch is needed

Follow INSTALL

leaderboard

cd /cart
git clone git@github.com:john-/leaderboard.git

Follow INSTALL

telem_control

cd /cart
git clone git@github.com:john-/telem_control.git

Follow INSTALL

tail_log

cd /cart
git clone git@github.com:john-/tail_log.git

Follow INSTALL

cart_cli

cd /cart
git clone git@github.com:john-/cart_cli.git

follow INSTALL

trans_browse

cd /cart
git clone git@github.com:john-/trans_browse.git

follow INSTALL

mxnet on the cart

clone incubator-mxnet:

cd /cart
git clone --recursive git@github.com:john-/incubator-mxnet.git # tried this due to error

because of missing .h do apt installs from here https://ahmedibrahimvt.wordpress.com/2017/02/19/fatal-error-hdf5-h-no-such-file-or-directory/

At least one of not found and another was up to date already.

Had to install fortran for install:

apt-get install gfortran

change last make entry to -j 1 to avoid out of memory error

Execute:

./install_mxnet_ubuntu_python.sh from docs/install

add to .zshrc:

BASE=/cart
MXNET_HOME=${BASE}/incubator-mxnet
export LD_LIBRARY_PATH=${MXNET_HOME}/lib
export PERL5LIB=${BASE}/perl5/lib/perl5

Use the above for perl install instructions. Change ${HOME} to /cart

mxnet (prep for cart / these steps done in a container)

In the attempt after everything below I tried the quick install from here:

https://mxnet.incubator.apache.org/versions/master/install/ubuntu_setup.html#install-the-mxnet-package-for-perl

./install_mxnet_ubuntu_python.sh is in the mxnet source repository.

The above worked. Install perl API after that. Everything stays in the source tree (no copy to OS directories).

MKL-DNN

Note: With how I compiled mxnet I don't think mkl-dnn was used. Instead, mkl that came with mxnet was https://intel.github.io/mkl-dnn/dev_guide_build.html

I wound up get link errors that stuff from /opt/intel was not found. I can probably change make options to address this. Instead, went and downloaded full package from Intel.

opencv

https://docs.opencv.org/3.4.1/d2/de6/tutorial_py_setup_in_ubuntu.html

mxnet

Used this for what built OK:

https://mxnet.incubator.apache.org/versions/master/install/ubuntu_setup.html

~/src/incubator-mxnet/build$ cmake  -GNinja -DUSE_OPENCV=1 -DUSE_MKL_IF_AVAILABLE=ON -DUSE_CUDA=OFF -DUSE_CUDA=OFF ../
ninja
sudo ninja install

Had problems with perl API loading certain mkl libraries so trying this:

cmake -GNinja -DUSE_OPENCV=1 -DUSE_MKLDNN=1 -DUSE_CUDA=OFF -DUSE_CUDA=OFF ../

for build error not finding an opencv include:

cat opencv.pc

prefix=/usr
exec_prefix=${prefix}
includedir=${prefix}/local/include
libdir=${exec_prefix}/local/lib

Name: opencv
Description: The opencv library
Version: 2.x.x
Cflags: -I${includedir}/opencv4 -I${includedir}/opencv4/opencv2
Libs: -L${libdir} -lopencv_calib3d -lopencv_imgproc -lopencv_contrib     -lopencv_legacy -lopencv_core -lopencv_ml -lopencv_features2d -lopencv_objdetect -lopencv_flann -lopencv_video -lopencv_highgui -lopencv_imcodecs

cp opencv.pc /usr/share/pkgconfig

training files

create lst files

./im2rec.py --list --train-ratio .8 --test-ratio .2 --recursive ~/cart/training/data ~/cart/training/

create rec/idx files

./im2rec.py ~/cart/training/data_ ~/cart/training --num-thread 16