#==== # Getting the extension #==== Assuming you are in the Greensotne3 top-level (i.e. GSDL3SRCHOME) directory, (if not already done so) this extension can be checked out as follows: svn co https://svn.greenstone.org/gs3-extensions/mars-src/trunk ext/mars The extension is desigend to combine with an interface and site of the same name: cd web/sites svn co https://svn.greenstone.org/gs3-installations/mars/trunk/sites/mars cd ../interfaces/ svn co https://svn.greenstone.org/gs3-installations/mars/trunk/interfaces/mars cd ../.. To build collections you need to have installed: python3 (developer's version, which includes /usr/include/.../Python.h) To compile the code you need to have installed: nasm git (optional -- essentia tar-ball is provided, but its './waf configure' runs 'git pull' to be fully up to date) # Static libraries for -lc, -lm, -lpthread to build essentia tools statically sudo yum install glibc-static For the 'yum' package manager, if needed: sudo yum install python3 sudo yum install python3-devel sudo yum install nasm sudo yum install git #==== # Compiling the extension #==== #-<> # #-- cd ext/mars ./CREATE-VENV-PYTHON3.sh cd ../.. ln -s ext/mars/SETUP-TOP-LEVEL.sh SETUP.sh ln -s ext/mars/DEVEL-TOP-LEVEL.sh DEVEL.sh # If your python does not already have 'six', 'sklearn', or 'matplotlib' then: source ./SETUP.sh #pip install six #pip install sklearn #pip install matplotlib #-- # # source ./SETUP.sh cd ext/mars ./CASCADE-MAKE.sh ####======= # Currently bails on essentia if: ####======= #Checking for 'libavcodec' >= 55.34.1 : not found #Checking for 'libavformat' : not found #Checking for 'libavutil' : not found #Checking for 'libavresample' : not found pip install samplerate Checking for 'samplerate' : not found Checking for 'taglib' >= 1.9 : not found Checking for 'yaml-0.1' : not found Checking for 'fftw3f' : not found Checking for 'libchromaprint' : not found and python-config missing ####======= To build an Essentia-processing based collection cd web/sites/mars/collect/amc-essentia ./IMPORT.sh -maxdocs 2 ./BUILDCOL.sh ./ACTIVATE.sh #==== More (but scrapy) notes below ==== Getting started with running Greenstone3+Mars commands Setting up your environment # activate python3 # source ./gs3-setup.bash # Above now superseded with: source ./SETUP.sh # Pick which version of Python you want to work with (v2 or v3) source ./$GSDLOS/virtualenv-python2/bin/activate source ./$GSDLOS/virtualenv-python3/bin/activate # To run essentia python tests need to have install sklearn pip install sklearn # Then can run cd packages/essentia-full-git python ./waf run_python_tests # To build with Greenstone, need to teach virtualenv-python where Essensia was installed, # e.g. export PYTHONPATH=$GEXT_MARS_INSTALLED/lib/python2.7/site-packages export PYTHONPATH=$GEXT_MARS_INSTALLED/lib/python3.7/site-packages # On Macrocarpa, the follow compiles up with python2 cd src/essentia ./waf configure --with-examples --with-python --prefix=/tmp/essentia ./waf ./waf install