-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathINSTALL
67 lines (50 loc) · 2.48 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
NOTE (1/5/2018): this file may be out of date. The most comprehensive guide to setting up Sigvisa is the Vagrant playbook in
cloud/vagrant/playbook.yml (originally created to configure Azure cloud machines for distributed inference/training).
--------------------------------
First install git, python2.7, and virtualenvwrapper.
cd ~
mkdir python
cd python
git clone https://github.com/davmre/sigvisa.git
mkvirtualenv -a $HOME/python/sigvisa -r $HOME/python/sigvisa/requirements.txt sigvisa
This last command creates a virtualenv for sigvisa and installs all
Python dependencies. Note that this includes both the MYSQL and Oracle
database libraries; if you're only planning on using one of these and
the other causes problems (e.g. you can't install the cx_Oracle python
module because you don't have Oracle installed on your system), feel
free to comment it out of the requirements file. If installation fails
for some dependency, try to fix the error, then run
workon sigvisa
pip install -r $HOME/python/sigvisa/requirements.txt
to restart the installation. Typical issues are:
-- scipy requires BLAS and LAPACK; see
http://www.scipy.org/Installing_SciPy/BuildingGeneral
for instructions on building these.
-- basemap requires GEOS, and for some reason can't build it automatically.
So you have to do it yourself:
cd $HOME/.virtualenvs/sigvisa/src/basemap/geos-3.3.3/
./configure
make
export GEOS_DIR=`pwd`
cd ..
python setup.py install
When all dependencies are installed, run the following commands to set up the working environment:
workon sigvisa
echo "export SIGVISA_HOME=$HOME/python/sigvisa" >> $VIRTUAL_ENV/bin/postactivate
echo "export PYTHONPATH=\$HOME/python:\$PYTHONPATH" >> $VIRTUAL_ENV/bin/postactivate
source $VIRTUAL_ENV/bin/postactivate
cp githooks/pre-commit .git/hooks/pre-commit
Then, compile the C code:
python setup.py build_ext --inplace
and extract the earth model parameters:
tar xvfz parameters.tgz
Finally, set up the database: unzip sigvisa_csv.tgz into a directory somewhere, and run
python $SIGVISA_HOME/database/setup_db.py
This script will prompt you for the location of the CSV files, your
MySQL root password, and the details of the database and user to
create. When finished, it will print a set of lines which you should
copy into $VIRTUAL_ENV/bin/postactivate. To complete the DB setup, run
source $VIRTUAL_ENV/bin/postactivate
cd $SIGVISA_HOME/web
python manage.py syncdb
which creates the tables used by the Django web interface.