haimeh / finFindR

An application for dorsal fin image recognition and cataloguing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Development environment setup instructions on linux

w4tsn opened this issue · comments

Besides the already open issue #2 on the topic of contribution guidelines I've now specifically setup instructions on how to setup the env on linux (Fedora, to be specific). If the following instructions make sense to you and I did not miss something I'll issue a pull request to the readme for linux development.

It took me three hours to setup, so I think this might be useful to some people out there.

How to contribute on Linux

The following is based on Fedora 29 and has to be transferred to other distros like Ubuntu. For example on fedora a dev package is usally called something like libXt-devel where it is libXt-dev on Ubuntu.

Libraries

Install the required libraries. On Fedora like this:

dnf group install 'Development Tools'
dnf install libgdiplus-devel

Note: right now the file src/Makevars with the line PKG_LIBS += -lgdiplus has to be created manually on linux.

R packages

install.packages('shiny')
install.packages('DT')

mxnet on linux

On Ubuntu just follow the instructions in the mxnet docs) to install it by the provided install scripts.

The installation of mxnet on linux is not a one-liner right now so here is how to install it based on the mxnet documentation.

The dependencies:

dnf intsall opencv-devel
dnf install lapack-devel
dnf install atlas-devel
dnf install cairo-devel
dnf install libXt-devel
dnf install libjpeg-turbo-devel
dnf install libtiff-devel

Then build mxnet from source, then build and install the R package:

git clone --recursive https://github.com/apache/incubator-mxnet
cd incubator-mxnet
make -j $(nproc) USE_OPENCV=1 USE_BLAS=atlas
make rpkg

install the finFindR R package

The shiny app requires the finFindR library to be installed locally. After a code-change this step has to be redone.

install.packages(path_to_file, repos = NULL, type="source")

Hi!
Thanks for taking the time to put this together! This looks good to me so feel free to issue a pull request