Project

General

Profile

Processing Server Installation » History » Version 23

Amber Herold, 04/15/2010 11:39 AM

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