Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to install MAJA 4 in Ubuntu 20.04 and Docker #80

Open
jprankl opened this issue Dec 6, 2020 · 3 comments
Open

How to install MAJA 4 in Ubuntu 20.04 and Docker #80

jprankl opened this issue Dec 6, 2020 · 3 comments

Comments

@jprankl
Copy link

jprankl commented Dec 6, 2020

This is not a typical issue, but a step by step example of how to install MAJA 4 in Ubuntu 20.04 and Docker.
Assumption: Docker is already installed.

Get Ubuntu 20.04 Docker container and go into the container

docker run -d -it --restart=always -v /srv/data:/data --name Maja4-Ub20 ubuntu:20.04 /bin/bash
docker exec -it Maja4-Ub20 /bin/bash

/srv/data is a data folder, which is linked into the container (to /data)

Install dependencies

apt -y update
apt -y install libffi-dev
apt -y install mono-complete
apt -y install bison flex
apt -y install libpcre++-dev
apt -y install wget
apt -y install lsof

Download and install binaries from CNES

https://logiciels.cnes.fr/en/node/58?type=tel

Optionally build MAJA from source

# install build dependency
apt -y install build-essential cmake pkg-config
apt -y install cmake-curses-gui
apt -y install git
apt -y install tmux

# build maja
mkdir /root/software
cd /root/software
git clone https://github.com/CNES/MAJA.git
cd MAJA
mkdir build
mkdir install
cd build
cmake ../SuperBuild -DDOWNLOAD_DIR=../SuperBuild-archives/ -DENABLE_TU=OFF -DENABLE_TV=OFF -DENABLE_TVA=OFF -DCMAKE_INSTALL_PREFIX=`pwd`/../install
make -j4

Start maja

Configure folders.txt according to https://github.com/CNES/MAJA
In case CAMS should be activated (--cams) follow https://github.com/CNES/MAJA#download-cams-data and download the cams data before
L1C data structure example (without specifying a site)
/data/sentinel_products_L1C-test/33UWP/S2A_MSIL1C_20200909T095031_N0209_R079_T33UWP_20200909T110415.SAFE

Start maja in case it is installed from the binary package in the default folder

/opt/maja/MAJA-4.2.1/bin/startmaja -f folders.txt -t 33UWP -d 2020-01-01 -e 2020-07-01 -v --type_dem srtm

...or start maja if it is built from source

/root/software/MAJA/install/maja/4.2.1/bin/startmaja -f folders.txt -t 33UWP -d 2020-01-01 -e 2020-07-01 -v --type_dem srtm
@jprankl jprankl mentioned this issue Dec 6, 2020
@jprankl
Copy link
Author

jprankl commented Dec 6, 2020

@c00kiemon5ter would be nice if you could test the steps.

@olivierhagolle, I had a discussion with Ivan on how to install Maja in Ubuntu. I thought it might be also interesting for other people and started a new thread. I hope that's o.k.?

@olivierhagolle and @petket-5 I hacked a line into startmaja to configure the Muscate format. Is there a proper method to configure it? It might be nice to have a command-line option.

@olivierhagolle
Copy link
Contributor

olivierhagolle commented Dec 9, 2020

Hi @jprankl
sorry, we are a bit too busy these days to reply quickly, but it's more than OK, thanks a lot for this contribution !

@rohitshetty
Copy link

Thanks a lot @jprankl for this information.
I've created a repo with a proper Dockerfile in case anyone is interested in the future.
https://github.com/rohitshetty/maja-docker

This compiles the Maja from the develop branch from gitlab.
But for some weird reason make binpkg fails, so cannot yet create a standalone binary, but rest of it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants