Project

General

Profile

Processing Server Installation » History » Revision 23

Revision 22 (Neil Voss, 04/07/2010 03:08 PM) → Revision 23/53 (Amber Herold, 04/15/2010 11:39 AM)

h1. Processing Server Installation 

 # [[Install supporting packages]] 
 # [[Download Appion Files]] 
 # [[Perform system check]] 
 # [[Install Appion Packages]] 
 # [[Configure leginon.cfg]] 
 # [[Explanation of Sample Names]] 
 # [[Configure sinedon.cfg]] 
 # [[Install External Packages]] 
 # [[Compile FindEM]] 
 # [[Compile Ace2]] 
 # [[Compile Radermacher]] 
 # [[Compile Xmipp for OpenMPI]] 
 # [[Test Appion]] 


 {{toc}} 

 h2.    Install prerequisite supporting packages first if missing: 


 Follow the instruction for your specific Linux distribution. 

 For example, SUSE users can use YaST to install them; RedHat and CentOS users can use 
 yum. 

 h3.    Required supporting packages: 

 |_.Name:|_.Download site:|_.yum package name|_.SuSE rpm name| 
 |Python 2.4 or newer| "http://www.python.org":http://www.python.org|python|python-devel| 
 |wxPython 2.5.2.8 or newer| "http://www.wxpython.org":http://www.wxpython.org|wxPython|python-wxGTK| 
 |MySQL Python client 1.2 or newer| "http://sourceforge.net/projects/mysql-python":http://sourceforge.net/projects/mysql-python|MySQL-python|python-mysql| 
 |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| 
 |Python XML module 0.8.3 or newer| "http://pyxml.sourceforge.net":http://pyxml.sourceforge.net|PyXML|python-xml| 
 |NumPy 1.0.1 or newer| "http://www.scipy.org":http://www.scipy.org|numpy|numpy| 
 |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| 


 *SciPy may not build properly on some versions of SuSE due to an incompatible LAPACK 
 package that comes with SuSE. You can get scipy as well as a compatible LAPACK etc. from 
 http://repos.opensuse.org/science (need to specify your SuSE version and machine 
 etc.) 

 You can test your numpy and scipy install with their build in test functions: 
 <pre> 
 python -c 'import numpy; numpy.test(level=1)' 
 python -c 'import scipy; scipy.test(level=1)' 
 </pre> 

 h2. Setup Appion programs 

 Download Myami.   
 *TODO: Place link to file here!* 

 h3. Perform system check: 

 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. 

 <pre> 
 cd your_download_area/Leginon-1.6-ALL/Leginon *TODO: fix this path* 
 python syscheck.py 
 </pre> 

 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". 

 h3. Install the package in _each folder_ with commands like these 

 *TODO: move these into a single installer, ask Jim* 

 <pre> 
 cd /your_download_area/myami/leginon 
 python setup.py install 

 cd ../pyami 
 python setup.py install 
 cd ../pyScope 
 python setup.py install 
 cd ../sinedon 
 python setup.py install 
 cd ../numextension 
 python setup.py install 
 cd ../libcv 
 python setup.py install 
 cd ../imageviewer 
 python setup.py install 
 </pre> 

 h3. python-site-package-path: where the installed python packages went: 

 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: 

     * Start python command line from shell 
       <pre>> python</pre> 

     * 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. 
       <pre>python> import sinedon</pre> 


     * 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 
 <pre> 
       python> sinedon.__path__ 

       RETURNS, For example, 
       python> <module 'sinedon' from '/usr/lib/python2.5/site-packages/sinedon/__init__.pyc'>  
 </pre> 
       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. 

 h3. Configure leginon.cfg 

 A skeleton (default) configuration file is available: 
 <pre> 
 [python-site-package-path]/Leginon/config/default.cfg 
 </pre> 

 * Copy default.cfg to leginon.cfg. 
 <pre> 
   cp [python-site-package-path]/Leginon/config/default.cfg [python-site-package-path]/Leginon/config/leginon.cfg 
 </pre> 

 * Add a directory for images  
 <pre> 
   [Images] 
   path: your_storage_disk_path/leginon 
 </pre> 

 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. 

 h3. Names used in the example installation 

 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. 

 h3. Configure sinedon.cfg: 

 *TODO: Consider moving this after we setup Mysql username.* 

 Sinedon is designed to be able to interact with multiple databases. It can be configured at global or user level. 

     * An example configuration file is available at: 
       /your_download_area/Leginon-1.6-ALL/sinedon/examples/sinedon.cfg 

     * Configurations for all users should be placed at the following path: 
       [python-site-package-path]/sinedon/sinedon.cfg 

     * 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: 
 <pre> 
       [global] 
       host: your_database_host 
       user: usr_object 
       passwd: 

       [projectdata] 
       db: projectdb 

       [leginondata] 
       db: leginondb 
 </pre> 

     * If you would like to name your Project Proccessing databases something other than the default "ap[Id_Num]", 
       you will need to do the following: 
     ** Go to your Leginon installation directory (typically /usr/lib/python2.4/site-packages/Leginon/) 
     ** Edit project.py. Change line 5 to: 
 <pre> 
 use_processingdb_table = True 
 </pre> 
     ** Add the appionData module to sinedon.cfg, which you have already modified during the Leginon installation. 
 <pre> 
 [appionData] 
 user: 	 usr_object 
 </pre> 
     ** [Note] The module names in brackets are case sensitive and need to be exact. 
 The user name needs to match the name for which privileges have been granted on the `ap%` databases. 

     * 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. 
 <pre> 
       [robot2] 
       db: leginondb 
 </pre> 

 h2. Install External Packages 

 h3. Compile FindEM  

 Note: a 64bit binary is provided in the myami package. It is only necessary to compile a new version if it does not work. 

 * Goto appion/findem folder to make findem.exe 

 * Compile the libraries and binary 

 <pre> 
 $ make 
 </pre> 

 * Test findem.exe to see if it runs 

 <pre> 
 $ make test 
 </pre> 

 *WARNING* 
 Only if the first part fails, you must add the path to libg2c.so library file. 
 Otherwise skip to next section. 

 * locate libg2c.so library file 

 <pre> 
 $ ls /usr/lib/gcc/`uname -i`-redhat-linux/3.4.6/libg2c.so 
 </pre> 

 <pre> 
 $ locate libg2c.so 
 </pre> 

 * Edit Makefile with location of libg2c.so 

 <pre> 
 $ nano Makefile 
 </pre> 

 * Example: EXLIBS=-L/usr/lib/gcc/i386-redhat-linux/3.4.6/ -lg2c 
 * Re-compile 

 h3. Compile Ace2  

 The 64bit Ace2 binary is already available in the myami/bin directory.  
 Test it by changing directories to myami/bin and type the following commands: 
 <pre> 
 $ ./ace2.exe -h 
 $ ./ace2correct.exe -h 
 </pre> 
 Notice the help display. 

 <pre> 
 If this does not work or you wish to compile it yourself follow the instructions here. 
 NOTE: 
 ace2 typically requires fftw 3.2 or greater. This is significantly faster than 3.1 (which is distributed with CentOS).  
 There is a FFTW_WISDOM_ONLY flag in Image.m that can be commented in if you are using fftw 3.2 or greater. 
 *TODO: Can we have the make file detect which version is installed?* 

 * Goto myami/appion/ace2 
 * compile the libraries and binary 
 * test to see if program runs 

 $ make 
 $ ./ace2.exe -h 
 $ ./ace2correct.exe -h 
 $ mv -v ./ace2*.exe ../bin 
 </pre> 

 h3. Compile Radermacher module  

 * Goto appion/radermacher 

 * compile the libraries and binary 

 <pre> 
 $ python ./setup.py build 
 </pre> 

 * install module globally 

 <pre> 
 $ sudo python ./setup.py install 
 </pre> 

 * test installed module 

 <pre> 
 $ python 
 </pre> 

 <pre> 
 >>> import radermacher 
 >>> <Ctrl-D> 
 </pre> 

 h3. Compile Xmipp for OpenMPI  

 [[Install Xmipp]] 

 h2. Test Appion  

 If appion is installed locallaly in your home directory (you are the only user that can execute it),  
 you will need to add myami and appion to the python path. 

 * Go into the appion directory 

 Open .bashrc in your home directory and edit it at the end of the file: 
 Add the following lines: 

 <pre> 
 $ export PYTHONPATH="/your-complete-path-to-myami":"/your-complete-path-to-myami/appion":$PYTHONPATH 
 $ export PATH="/your-complete-path-to-myami/appion/bin":$PATH 
 </pre> 

 * Add appion to PYTHONPATH 

 <pre> 
 $ export PYTHONPATH="/your-complete-path-to-myami/appion":$PYTHONPATH 
 </pre> 

 *TODO: Consider moving appionlib so you only need to set one path.* 

 To confirm the changes, open a new terminal and type: 
 <pre> 
  $ export 
 </pre> 

 Look for the PATH and PYTHONPATH in the output. The paths that you entered should be there. 

 * Run the test script 

 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. 

 <pre> 
 $ ./check.sh 
 </pre> 

 *NOTE* 
 You can ignore EMAN, MATLAB, and UCSF Chimera errors at this point