source: gs3-extensions/mars-src/trunk/README.txt

Last change on this file was 36855, checked in by davidb, 18 months ago

Updated as a result of rolling out the code again on a fresh server (GCE)

File size: 3.2 KB
Line 
1#====
2# Getting the extension
3#====
4
5Assuming 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:
7
8 svn co https://svn.greenstone.org/gs3-extensions/mars-src/trunk ext/mars
9
10The extension is desigend to combine with an interface and site of the same name:
11
12 cd web/sites
13 svn co https://svn.greenstone.org/gs3-installations/mars/trunk/sites/mars
14 cd ../interfaces/
15 svn co https://svn.greenstone.org/gs3-installations/mars/trunk/interfaces/mars
16 cd ../..
17
18To build collections you need to have installed:
19
20 python3 (developer's version, which includes /usr/include/.../Python.h)
21
22To compile the code you need to have installed:
23
24 nasm
25 git (optional -- essentia tar-ball is provided, but its './waf configure' runs 'git pull' to be fully up to date)
26
27# Static libraries for -lc, -lm, -lpthread to build essentia tools statically
28
29 sudo yum install glibc-static
30
31For the 'yum' package manager, if needed:
32
33 sudo yum install python3
34 sudo yum install python3-devel
35 sudo yum install nasm
36
37 sudo yum install git
38
39
40#====
41# Compiling the extension
42#====
43
44#-<>
45# <One-time-only>
46#--
47
48cd ext/mars
49./CREATE-VENV-PYTHON3.sh
50cd ../..
51
52ln -s ext/mars/SETUP-TOP-LEVEL.sh SETUP.sh
53ln -s ext/mars/DEVEL-TOP-LEVEL.sh DEVEL.sh
54
55# If your python does not already have 'six', 'sklearn', or 'matplotlib' then:
56source ./SETUP.sh
57#pip install six
58#pip install sklearn
59#pip install matplotlib
60
61
62
63#--
64# </One-time-only>
65#</>
66
67source ./SETUP.sh
68cd ext/mars
69./CASCADE-MAKE.sh
70
71
72####=======
73# Currently bails on essentia if:
74####=======
75
76
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
82pip install samplerate
83
84Checking for 'samplerate' : not found
85Checking for 'taglib' >= 1.9 : not found
86Checking for 'yaml-0.1' : not found
87Checking for 'fftw3f' : not found
88Checking for 'libchromaprint' : not found
89
90
91and python-config missing
92
93####=======
94
95
96To build an Essentia-processing based collection
97
98
99 cd web/sites/mars/collect/amc-essentia
100 ./IMPORT.sh -maxdocs 2
101 ./BUILDCOL.sh
102 ./ACTIVATE.sh
103
104
105
106#====
107
108More (but scrapy) notes below
109
110
111====
112
113Getting started with running Greenstone3+Mars commands
114
115Setting 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
128# Pick which version of Python you want to work with (v2 or v3)
129
130 source ./$GSDLOS/virtualenv-python2/bin/activate
131
132 source ./$GSDLOS/virtualenv-python3/bin/activate
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
Note: See TracBrowser for help on using the repository browser.