Project

General

Profile

Processing Server Installation » History » Version 21

Neil Voss, 04/07/2010 03:06 PM

1 10 Amber Herold
h1. Processing Server Installation
2 1 Amber Herold
3 20 Amber Herold
{{toc}}
4 10 Amber Herold
5
h2.  Install prerequisite supporting packages first if missing:
6
7
8
Follow the instruction for your specific Linux distribution.
9
10
For example, SUSE users can use YaST to install them; RedHat and CentOS users can use
11
yum.
12
13
h3.  Required supporting packages:
14
15
|_.Name:|_.Download site:|_.yum package name|_.SuSE rpm name|
16
|Python 2.4 or newer| "http://www.python.org":http://www.python.org|python|python-devel|
17
|wxPython 2.5.2.8 or newer| "http://www.wxpython.org":http://www.wxpython.org|wxPython|python-wxGTK|
18
|MySQL Python client 1.2 or newer| "http://sourceforge.net/projects/mysql-python":http://sourceforge.net/projects/mysql-python|MySQL-python|python-mysql|
19
|Python Imaging Library (PIL) 1.1.4 or newer| "http://www.pythonware.com/products/pil/":http://www.pythonware.com/products/pil/|python-imaging|python-imaging|
20
|Python XML module 0.8.3 or newer| "http://pyxml.sourceforge.net":http://pyxml.sourceforge.net|PyXML|python-xml|
21
|NumPy 1.0.1 or newer| "http://www.scipy.org":http://www.scipy.org|numpy|numpy|
22
|SciPy 0.5.1 (tested, others may work)*| "http://www.scipy.org":http://www.scipy.org ,  "http://repos.opensuse.org/science":http://repos.opensuse.org/science *|scipy|python-scipy|
23
24
25
*SciPy may not build properly on some versions of SuSE due to an incompatible LAPACK
26
package that comes with SuSE. You can get scipy as well as a compatible LAPACK etc. from
27
http://repos.opensuse.org/science (need to specify your SuSE version and machine
28
etc.)
29
30 21 Neil Voss
You can test your numpy and scipy install with their build in test functions:
31
<pre>
32
python -c 'import numpy; numpy.test()'
33
python -c 'import scipy; scipy.test()'
34
</pre>
35 10 Amber Herold
36
h2. Setup Appion programs
37
38 1 Amber Herold
Download Myami.  
39
*TODO: Place link to file here!*
40
41
h3. Perform system check:
42 8 Amber Herold
43 1 Amber Herold
In addition to the downloads from our svn repository, there are several other requirements that you will get either from your OS installation source, or from its respective website. The system check in the Leginon package checks your system to see if you already have these requirements.
44
45 10 Amber Herold
<pre>
46 1 Amber Herold
cd your_download_area/Leginon-1.6-ALL/Leginon *TODO: fix this path*
47
python syscheck.py
48 10 Amber Herold
</pre>
49 1 Amber Herold
50
If python is not installed, this, of course will not run. If you see any lines like "*** Failed...", then you have something missing. Otherwise, everything should result in "OK".
51
52 10 Amber Herold
h3. Install the package in _each folder_ with commands like these
53 1 Amber Herold
54
*TODO: move these into a single installer, ask Jim*
55
56 10 Amber Herold
<pre>
57 1 Amber Herold
cd /your_download_area/myami/leginon
58
python setup.py install
59
60
cd ../pyami
61
python setup.py install
62
cd ../pyScope
63
python setup.py install
64
cd ../sinedon
65
python setup.py install
66
cd ../numextension
67
python setup.py install
68
cd ../libcv
69
python setup.py install
70
cd ../imageviewer
71
python setup.py install
72 10 Amber Herold
</pre>
73 1 Amber Herold
74
h3. python-site-package-path: where the installed python packages went:
75
76
Python installer put the packages you installed to its site-packages directory. This enable all users on the same computer to access them. The easiest way to find where your installed package is called by python is to load a module from the package using interactive python command lines like this:
77
78
    * Start python command line from shell
79 10 Amber Herold
      <pre>> python</pre>
80 1 Amber Herold
81
    * Import a module from the package. Let's try sinedon here. All packages installed through the above setup.py script should go to the same place.
82 10 Amber Herold
      <pre>python> import sinedon</pre>
83 1 Amber Herold
84
85
    * If the module is loaded successfully, call the module attribute __path__ (two underscrolls before "path" and two underscrolls after) will return the location of the module it is loaded from
86 10 Amber Herold
<pre>
87 1 Amber Herold
      python> sinedon.__path__
88
89
      RETURNS, For example,
90
      python> <module 'sinedon' from '/usr/lib/python2.5/site-packages/sinedon/__init__.pyc'> 
91 10 Amber Herold
</pre>
92 1 Amber Herold
      In this case, /usr/lib/python2.5/site-packages/ is your python-site-package-path. If you go to that directory, you will find all the packages you just installed.
93
94 10 Amber Herold
h3. Configure leginon.cfg
95 1 Amber Herold
96
A skeleton (default) configuration file is available:
97 11 Amber Herold
<pre>
98
[python-site-package-path]/Leginon/config/default.cfg
99
</pre>
100 1 Amber Herold
101
* Copy default.cfg to leginon.cfg.
102 10 Amber Herold
<pre>
103 1 Amber Herold
  cp [python-site-package-path]/Leginon/config/default.cfg [python-site-package-path]/Leginon/config/leginon.cfg
104
</pre>
105
106 11 Amber Herold
* Add a directory for images 
107
<pre>
108 1 Amber Herold
  [Images]
109
  path: your_storage_disk_path/leginon
110 11 Amber Herold
</pre>
111
112
The rest of the configuration options are fine left as default assuming your leginon database is named "leginondb", and Leginon logs into the database as a user named "usr_object" with no password set.
113 1 Amber Herold
114
h3. Names used in the example installation
115
116 10 Amber Herold
From this point on, you will need to enter database user names for different configuration files and settings. These are NOT Leginon user names but what is required by MySQL database interaction. Consistent names are essential. In the example shown here, the leginon database is called "leginondb", the project database is called "projectdb". The MySQL user name are the same, "usr_object", and in this case without a password.
117 1 Amber Herold
118
h3. Configure sinedon.cfg:
119
120
*TODO: Consider moving this after we setup Mysql username.*
121
122
Sinedon is designed to be able to interact with multiple databases. It can be configured at global or user level.
123
124
    * An example configuration file is available at:
125
      /your_download_area/Leginon-1.6-ALL/sinedon/examples/sinedon.cfg
126
127
    * Configurations for all users should be placed at the following path:
128
      [python-site-package-path]/sinedon/sinedon.cfg
129
130
    * Modify host,db,user,passwd to what is used. Note that the user here is the MySQL user Leginon uses to communicate with the database for all Leginon users. For Leginon that uses Project database, set the following:
131 10 Amber Herold
<pre>
132 1 Amber Herold
      [global]
133
      host: your_database_host
134
      user: usr_object
135
      passwd:
136
137
      [projectdata]
138
      db: projectdb
139
140
      [leginondata]
141
      db: leginondb
142 10 Amber Herold
</pre>
143 1 Amber Herold
144 14 Amber Herold
    * If you would like to name your Project Proccessing databases something other than the default "ap[Id_Num]",
145
      you will need to do the following:
146
    ** Go to your Leginon installation directory (typically /usr/lib/python2.4/site-packages/Leginon/)
147
    ** Edit project.py. Change line 5 to:
148
<pre>
149
use_processingdb_table = True
150
</pre>
151
    ** Add the appionData module to sinedon.cfg, which you have already modified during the Leginon installation.
152
<pre>
153
[appionData]
154
user:	usr_object
155
</pre>
156 17 Amber Herold
    ** [Note] The module names in brackets are case sensitive and need to be exact.
157 16 Amber Herold
The user name needs to match the name for which privileges have been granted on the `ap%` databases.
158 14 Amber Herold
159 1 Amber Herold
    * Add database configuration if you intend to use grid-inserting robot. The Robot2 module uses the database to communicate to the robot. Applications that carries the name "Robot" requires this to be set. In general, using the same database as the general leginon database is fine.
160 10 Amber Herold
<pre>
161 1 Amber Herold
      [robot2]
162
      db: leginondb
163 10 Amber Herold
</pre>
164 1 Amber Herold
165 18 Amber Herold
h2. Install External Packages
166
167 10 Amber Herold
h3. Compile FindEM 
168 1 Amber Herold
169 21 Neil Voss
Note: a 64bit binary is provided in the myami package. It is only necessary to compile a new version if it does not work.
170
171 1 Amber Herold
* Goto appion/findem folder to make findem.exe
172
173
* Compile the libraries and binary
174
175
<pre>
176
$ make
177
</pre>
178
179
* Test findem.exe to see if it runs
180
181
<pre>
182
$ make test
183
</pre>
184
185
*WARNING*
186
Only if the first part fails, you must add the path to libg2c.so library file.
187
Otherwise skip to next section.
188
189
* locate libg2c.so library file
190
191
<pre>
192
$ ls /usr/lib/gcc/`uname -i`-redhat-linux/3.4.6/libg2c.so
193
</pre>
194
195
<pre>
196
$ locate libg2c.so
197
</pre>
198
199
* Edit Makefile with location of libg2c.so
200
201
<pre>
202
$ nano Makefile
203
</pre>
204
205
* Example: EXLIBS=-L/usr/lib/gcc/i386-redhat-linux/3.4.6/ -lg2c
206
* Re-compile
207 12 Amber Herold
208 1 Amber Herold
h3. Compile Ace2 
209
210 21 Neil Voss
The 64bit Ace2 binary is already available in the myami/bin directory. 
211 1 Amber Herold
Test it by changing directories to myami/bin and type the following commands:
212
<pre>
213
$ ./ace2.exe -h
214
$ ./ace2correct.exe -h
215
</pre>
216
Notice the help display.
217
218
<pre>
219
If this does not work or you wish to compile it yourself follow the instructions here.
220
NOTE:
221
ace2 typically requires fftw 3.2 or greater. This is significantly faster than 3.1 (which is distributed with CentOS). 
222
There is a FFTW_WISDOM_ONLY flag in Image.m that can be commented in if you are using fftw 3.2 or greater.
223
*TODO: Can we have the make file detect which version is installed?*
224
225
* Goto myami/appion/ace2
226
* compile the libraries and binary
227
* test to see if program runs
228
229
$ make
230
$ ./ace2.exe -h
231
$ ./ace2correct.exe -h
232
$ mv -v ./ace2*.exe ../bin
233
</pre>
234
235 12 Amber Herold
h3. Compile Radermacher module 
236 1 Amber Herold
237
* Goto appion/radermacher
238
239
* compile the libraries and binary
240
241
<pre>
242
$ python ./setup.py build
243
</pre>
244
245
* install module globally
246
247
<pre>
248
$ sudo python ./setup.py install
249
</pre>
250
251
* test installed module
252
253
<pre>
254
$ python
255
</pre>
256
257
<pre>
258
>>> import radermacher
259
>>> <Ctrl-D>
260
</pre>
261
262 19 Amber Herold
h3. Compile Xmipp for OpenMPI 
263
264
[[Install Xmipp]]
265
266
h2. Test Appion 
267 1 Amber Herold
268 3 Amber Herold
If appion is installed locallaly in your home directory (you are the only user that can execute it), 
269
you will need to add myami and appion to the python path.
270
271 1 Amber Herold
* Go into the appion directory
272 2 Amber Herold
273
Open .bashrc in your home directory and edit it at the end of the file:
274 1 Amber Herold
Add the following lines:
275 2 Amber Herold
276
<pre>
277 6 Amber Herold
$ export PYTHONPATH="/your-complete-path-to-myami":"/your-complete-path-to-myami/appion":$PYTHONPATH
278 3 Amber Herold
$ export PATH="/your-complete-path-to-myami/appion/bin":$PATH
279 1 Amber Herold
</pre>
280
281
* Add appion to PYTHONPATH
282
283
<pre>
284 3 Amber Herold
$ export PYTHONPATH="/your-complete-path-to-myami/appion":$PYTHONPATH
285 1 Amber Herold
</pre>
286
287
*TODO: Consider moving appionlib so you only need to set one path.*
288
289 4 Amber Herold
To confirm the changes, open a new terminal and type:
290 5 Amber Herold
<pre>
291 4 Amber Herold
 $ export
292 1 Amber Herold
</pre>
293 6 Amber Herold
294
Look for the PATH and PYTHONPATH in the output. The paths that you entered should be there.
295 4 Amber Herold
296 1 Amber Herold
* Run the test script
297 3 Amber Herold
298
If you have installed appion for all users (the script does not exist yet) or it is local and you have added the paths above, you are ready to run the test.
299 1 Amber Herold
300
<pre>
301
$ ./check.sh
302
</pre>
303
304
*NOTE*
305
You can ignore EMAN, MATLAB, and UCSF Chimera errors at this point