Project

General

Profile

Processing Server Installation » History » Version 20

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