[34657] | 1 | #====
|
---|
| 2 | # Getting the extension
|
---|
| 3 | #====
|
---|
[34362] | 4 |
|
---|
[34657] | 5 | Assuming you are in the Greensotne3 top-level (i.e. GSDL3SRCHOME) directory,
|
---|
| 6 | (if not already done so) this extension can be checked out as follows:
|
---|
[34362] | 7 |
|
---|
[34657] | 8 | svn co https://svn.greenstone.org/gs3-extensions/mars-src/trunk ext/mars
|
---|
[34362] | 9 |
|
---|
[34657] | 10 | The extension is desigend to combine with an interface and site of the same name:
|
---|
[34362] | 11 |
|
---|
[34657] | 12 | cd web/sites
|
---|
| 13 | svn co https://svn.greenstone.org/main/trunk/model-sites-dev/mars
|
---|
| 14 | cd ../interfaces/
|
---|
| 15 | svn co https://svn.greenstone.org/main/trunk/model-interfaces-dev/mars
|
---|
| 16 | cd ../..
|
---|
[34362] | 17 |
|
---|
[34657] | 18 |
|
---|
[34688] | 19 |
|
---|
| 20 | To build collections you need to have installed:
|
---|
| 21 |
|
---|
| 22 | python3 (developer's version, which includes /usr/include/.../Python.h)
|
---|
| 23 |
|
---|
| 24 | To compile the code you need to have installed:
|
---|
| 25 |
|
---|
| 26 | nasm
|
---|
| 27 | git (optional -- essentia tar-ball is provided, but its './waf configure' runs 'git pull' to be fully up to date)
|
---|
| 28 |
|
---|
| 29 | # Static libraries for -lc, -lm, -lpthread to build essentia tools statically
|
---|
| 30 |
|
---|
| 31 | sudo yum install glibc-static
|
---|
| 32 |
|
---|
| 33 | For the 'yum' package manager, if needed:
|
---|
| 34 |
|
---|
| 35 | sudo yum install python3
|
---|
| 36 | sudo yum install python3-devel
|
---|
| 37 | sudo yum install nasm
|
---|
| 38 |
|
---|
| 39 | sudo yum install git
|
---|
| 40 |
|
---|
| 41 |
|
---|
[34657] | 42 | #====
|
---|
| 43 | # Compiling the extension
|
---|
| 44 | #====
|
---|
| 45 |
|
---|
[34663] | 46 | #-<>
|
---|
| 47 | # <One-time-only>
|
---|
[34657] | 48 | #--
|
---|
| 49 |
|
---|
| 50 | cd ext/mars
|
---|
| 51 | ./CREATE-VENV-PYTHON3.sh
|
---|
| 52 | cd ../..
|
---|
| 53 |
|
---|
[34688] | 54 | ln -s ext/mars/SETUP-TOP-LEVEL.sh SETUP.sh
|
---|
| 55 | ln -s ext/mars/DEVEL-TOP-LEVEL.sh DEVEL.sh
|
---|
[34663] | 56 |
|
---|
| 57 | # If your python does not already have 'six', 'sklearn', or 'matplotlib' then:
|
---|
| 58 | source ./SETUP.sh
|
---|
| 59 | pip install six
|
---|
| 60 | pip install sklearn
|
---|
| 61 | pip install matplotlib
|
---|
| 62 |
|
---|
[34657] | 63 | #--
|
---|
[34663] | 64 | # </One-time-only>
|
---|
| 65 | #</>
|
---|
[34657] | 66 |
|
---|
| 67 | source ./SETUP.sh
|
---|
| 68 | cd ext/mars
|
---|
| 69 | ./CASCADE-MAKE.sh
|
---|
| 70 |
|
---|
| 71 |
|
---|
| 72 | ####=======
|
---|
| 73 | # Currently bails on essentia if:
|
---|
| 74 | ####=======
|
---|
| 75 |
|
---|
| 76 |
|
---|
[34688] | 77 | #Checking for 'libavcodec' >= 55.34.1 : not found
|
---|
| 78 | #Checking for 'libavformat' : not found
|
---|
| 79 | #Checking for 'libavutil' : not found
|
---|
| 80 | #Checking for 'libavresample' : not found
|
---|
| 81 |
|
---|
| 82 | pip install samplerate
|
---|
| 83 |
|
---|
[34657] | 84 | Checking for 'samplerate' : not found
|
---|
| 85 | Checking for 'taglib' >= 1.9 : not found
|
---|
| 86 | Checking for 'yaml-0.1' : not found
|
---|
| 87 | Checking for 'fftw3f' : not found
|
---|
| 88 | Checking for 'libchromaprint' : not found
|
---|
| 89 |
|
---|
| 90 |
|
---|
| 91 | and python-config missing
|
---|
| 92 |
|
---|
| 93 | ####=======
|
---|
| 94 |
|
---|
| 95 |
|
---|
| 96 | To build an Essentia-processing based collection
|
---|
| 97 |
|
---|
| 98 |
|
---|
| 99 | cd web/sites/.../collect/amc-essentia
|
---|
| 100 | ./IMPORT.sh -maxdocs 2
|
---|
| 101 | ./BUILDCOL.sh
|
---|
| 102 | ./ACTIVATE.sh
|
---|
| 103 |
|
---|
| 104 |
|
---|
| 105 |
|
---|
| 106 | #====
|
---|
| 107 |
|
---|
| 108 | More (but scrapy) notes below
|
---|
| 109 |
|
---|
| 110 |
|
---|
| 111 | ====
|
---|
| 112 |
|
---|
| 113 | Getting started with running Greenstone3+Mars commands
|
---|
| 114 |
|
---|
| 115 | Setting up your environment
|
---|
| 116 |
|
---|
| 117 | # activate python3
|
---|
| 118 | # source ./gs3-setup.bash
|
---|
| 119 |
|
---|
| 120 | # Above now superseded with:
|
---|
| 121 |
|
---|
| 122 | source ./SETUP.sh
|
---|
| 123 |
|
---|
| 124 |
|
---|
| 125 |
|
---|
| 126 |
|
---|
| 127 |
|
---|
[34362] | 128 | # Pick which version of Python you want to work with (v2 or v3)
|
---|
| 129 |
|
---|
[34663] | 130 | source ./$GSDLOS/virtualenv-python2/bin/activate
|
---|
[34362] | 131 |
|
---|
[34663] | 132 | source ./$GSDLOS/virtualenv-python3/bin/activate
|
---|
[34362] | 133 |
|
---|
| 134 | # To run essentia python tests need to have install sklearn
|
---|
| 135 |
|
---|
| 136 | pip install sklearn
|
---|
| 137 |
|
---|
| 138 | # Then can run
|
---|
| 139 |
|
---|
| 140 | cd packages/essentia-full-git
|
---|
| 141 | python ./waf run_python_tests
|
---|
| 142 |
|
---|
| 143 |
|
---|
| 144 | # To build with Greenstone, need to teach virtualenv-python where Essensia was installed,
|
---|
| 145 | # e.g.
|
---|
| 146 |
|
---|
| 147 | export PYTHONPATH=$GEXT_MARS_INSTALLED/lib/python2.7/site-packages
|
---|
| 148 |
|
---|
| 149 | export PYTHONPATH=$GEXT_MARS_INSTALLED/lib/python3.7/site-packages
|
---|
| 150 |
|
---|
| 151 |
|
---|
| 152 |
|
---|
| 153 |
|
---|
| 154 |
|
---|
| 155 |
|
---|
| 156 | # On Macrocarpa, the follow compiles up with python2
|
---|
| 157 |
|
---|
| 158 | cd src/essentia
|
---|
| 159 |
|
---|
| 160 | ./waf configure --with-examples --with-python --prefix=/tmp/essentia
|
---|
| 161 | ./waf
|
---|
| 162 | ./waf install
|
---|