Project

General

Profile

Processing Server Installation » History » Version 10

Amber Herold, 04/06/2010 02:08 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
Install leginon http://emg.nysbc.org/documentation/leginon/bk02ch04s06.php
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 10 Amber Herold
<pre>[python-site-package-path]/Leginon/config/default.cfg</pre>
93 1 Amber Herold
94
* Copy default.cfg to leginon.cfg.
95 10 Amber Herold
<pre>
96 1 Amber Herold
  cp [python-site-package-path]/Leginon/config/default.cfg [python-site-package-path]/Leginon/config/leginon.cfg
97 10 Amber Herold
</pre>
98 1 Amber Herold
99
* Add a directory for images. The rest is optional.
100
101
  Example of the configuration that you should set: (Here we assume your leginon database is named "dbemdata", and Leginon log into the database as a user named "usr_object" with no password set).
102
103
  [Images]
104
  path: your_storage_disk_path/leginon
105
106
h3. Names used in the example installation
107
108 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.
109 1 Amber Herold
110
h3. Configure sinedon.cfg:
111
112
*TODO: Consider moving this after we setup Mysql username.*
113
114
Sinedon is designed to be able to interact with multiple databases. It can be configured at global or user level.
115
116
    * An example configuration file is available at:
117
      /your_download_area/Leginon-1.6-ALL/sinedon/examples/sinedon.cfg
118
119
    * Configurations for all users should be placed at the following path:
120
      [python-site-package-path]/sinedon/sinedon.cfg
121
122
    * 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:
123 10 Amber Herold
<pre>
124 1 Amber Herold
      [global]
125
      host: your_database_host
126
      user: usr_object
127
      passwd:
128
129
      [projectdata]
130
      db: projectdb
131
132
      [leginondata]
133
      db: leginondb
134 10 Amber Herold
</pre>
135 1 Amber Herold
136
    * 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.
137 10 Amber Herold
<pre>
138 1 Amber Herold
      [robot2]
139
      db: leginondb
140 10 Amber Herold
</pre>
141 1 Amber Herold
142 10 Amber Herold
h3. Compile FindEM 
143 1 Amber Herold
144
* Goto appion/findem folder to make findem.exe
145
146
* Compile the libraries and binary
147
148
<pre>
149
$ make
150
</pre>
151
152
* Test findem.exe to see if it runs
153
154
<pre>
155
$ make test
156
</pre>
157
158
*WARNING*
159
Only if the first part fails, you must add the path to libg2c.so library file.
160
Otherwise skip to next section.
161
162
* locate libg2c.so library file
163
164
<pre>
165
$ ls /usr/lib/gcc/`uname -i`-redhat-linux/3.4.6/libg2c.so
166
</pre>
167
168
<pre>
169
$ locate libg2c.so
170
</pre>
171
172
* Edit Makefile with location of libg2c.so
173
174
<pre>
175
$ nano Makefile
176
</pre>
177
178
* Example: EXLIBS=-L/usr/lib/gcc/i386-redhat-linux/3.4.6/ -lg2c
179
* Re-compile
180
181
h3. 5.2 Compile Ace2 
182
183
The 64 bit Ace2 binary is already available in the myami/bin directory. 
184
Test it by changing directories to myami/bin and type the following commands:
185
<pre>
186
$ ./ace2.exe -h
187
$ ./ace2correct.exe -h
188
</pre>
189
Notice the help display.
190
191
<pre>
192
If this does not work or you wish to compile it yourself follow the instructions here.
193
NOTE:
194
ace2 typically requires fftw 3.2 or greater. This is significantly faster than 3.1 (which is distributed with CentOS). 
195
There is a FFTW_WISDOM_ONLY flag in Image.m that can be commented in if you are using fftw 3.2 or greater.
196
*TODO: Can we have the make file detect which version is installed?*
197
198
* Goto myami/appion/ace2
199
* compile the libraries and binary
200
* test to see if program runs
201
202
$ make
203
$ ./ace2.exe -h
204
$ ./ace2correct.exe -h
205
$ mv -v ./ace2*.exe ../bin
206
</pre>
207
208
h3. 5.3 Compile Radermacher module 
209
210
* Goto appion/radermacher
211
212
* compile the libraries and binary
213
214
<pre>
215
$ python ./setup.py build
216
</pre>
217
218
* install module globally
219
220
<pre>
221
$ sudo python ./setup.py install
222
</pre>
223
224
* test installed module
225
226
<pre>
227
$ python
228
</pre>
229
230
<pre>
231
>>> import radermacher
232
>>> <Ctrl-D>
233
</pre>
234
235
h3. 5.4 Test Appion 
236
237 3 Amber Herold
If appion is installed locallaly in your home directory (you are the only user that can execute it), 
238
you will need to add myami and appion to the python path.
239
240 1 Amber Herold
* Go into the appion directory
241 2 Amber Herold
242
Open .bashrc in your home directory and edit it at the end of the file:
243 1 Amber Herold
Add the following lines:
244 2 Amber Herold
245
<pre>
246 6 Amber Herold
$ export PYTHONPATH="/your-complete-path-to-myami":"/your-complete-path-to-myami/appion":$PYTHONPATH
247 3 Amber Herold
$ export PATH="/your-complete-path-to-myami/appion/bin":$PATH
248 1 Amber Herold
</pre>
249
250
* Add appion to PYTHONPATH
251
252
<pre>
253 3 Amber Herold
$ export PYTHONPATH="/your-complete-path-to-myami/appion":$PYTHONPATH
254 1 Amber Herold
</pre>
255
256
*TODO: Consider moving appionlib so you only need to set one path.*
257
258 4 Amber Herold
To confirm the changes, open a new terminal and type:
259 5 Amber Herold
<pre>
260 4 Amber Herold
 $ export
261 1 Amber Herold
</pre>
262 6 Amber Herold
263
Look for the PATH and PYTHONPATH in the output. The paths that you entered should be there.
264 4 Amber Herold
265 1 Amber Herold
* Run the test script
266 3 Amber Herold
267
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.
268 1 Amber Herold
269
<pre>
270
$ ./check.sh
271
</pre>
272
273
*NOTE*
274
You can ignore EMAN, MATLAB, and UCSF Chimera errors at this point