2.2. Setup Guide (MacOS)¶
This setup guide is tested in MacOS Sierra (10.12) and MacOS High Sierra (10.13), but it should also work on all recent MacOS versions.
Note: The following variables may be used in path names; substitute as appropriate:
<user> : the name of the user doing a set up.
<user-home> : the user's home directory, e.g., /home/<user>
<git-home> : the directory containing the genomics-workspace, and `.git/` folder for `git` will be there.
2.2.1. Project Applications¶
Clone or refresh the genomics-workspace:
git clone https://github.com/NAL-i5K/genomics-workspace
# Or if the repository exists:
cd <git-home>
git fetch
2.2.2. Homebrew¶
We recommend to use Homebrew as package manager. Installation steps can be found at https://brew.sh/.
2.2.3. Python¶
Install virtualenv:
pip install virtualenv
Build a separate virtualenv:
# Make root dir for virtualenv and cd into it:
cd genomics-workspace
# Create a virtual environment called py2.7 and activate:
virtualenv -p python2.7 py2.7
source py2.7/bin/activate
2.2.4. RabbitMQ¶
Install and run RabbitMQ Server:
brew install rabbitmq
# Make sure /usr/local/sbin is in your $PATH
rabbitmq-server
2.2.6. Database¶
Install PostgreSQL:
brew install postgres
psql postgres
# At the prompt 'postgres=#' enter:
create database django;
create user django;
grant all on database django to django;
ALTER USER django CREATEDB;
# Connect to django database:
\c django
# Create extension hstore:
create extension hstore;
# Exit psql and postgres user:
\q
exit
2.2.7. Python Modules and Packages¶
Install additional Python packages:
cd <git-home>
pip install -r requirements.txt
2.2.8. Chrome Driver¶
- Install ChromeDriver from https://sites.google.com/a/chromium.org/chromedriver/downloads
- Add to PATH
2.2.9. Celery¶
Configure celery:
# Run celery manually
celery -A i5k worker --loglevel=info --concurrency=3
# Run celery beat maually as well
celery -A i5k beat --loglevel=info
2.2.11. Install Binary Files and Front-end Scripts¶
This step will instll binary files (for BLAST, HMMER and Clustal) and front-end scripts (.js, .css files):
npm run build
2.2.12. Start development server¶
To run developement server:
cd <git-home>
python manage.py runserver