Project

General

Profile

Processing Server Installation » History » Version 19

Amber Herold, 04/06/2010 04:36 PM

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