Processing Server Installation » History » Revision 9
Revision 8 (Amber Herold, 04/06/2010 01:48 PM) → Revision 9/53 (Amber Herold, 04/06/2010 01:49 PM)
h1. Setup Appion programs
Download Myami.
*TODO: Place link to file here!*
Install leginon http://emg.nysbc.org/documentation/leginon/bk02ch04s06.php
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.
cd your_download_area/Leginon-1.6-ALL/Leginon *TODO: fix this path*
python syscheck.py
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*
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
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
> python
* 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.
python> import sinedon
* 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
python> sinedon.__path__
RETURNS, For example,
python> <module 'sinedon' from '/usr/lib/python2.5/site-packages/sinedon/__init__.pyc'>
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:
[python-site-package-path]/Leginon/config/default.cfg
* Copy default.cfg to leginon.cfg.
cp [python-site-package-path]/Leginon/config/default.cfg [python-site-package-path]/Leginon/config/leginon.cfg
* Add a directory for images. The rest is optional.
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).
[Images]
path: your_storage_disk_path/leginon
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 "dbemdata", the project database is called "projectdata". 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:
[global]
host: your_database_host
user: usr_object
passwd:
[projectdata]
db: projectdb
[leginondata]
db: leginondb
* 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.
[robot2]
db: leginondb
h3. 5.1 Compile FindEM
* 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. 5.2 Compile Ace2
The 64 bit 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. 5.3 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. 5.4 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