Setup Workspace - datavisyn/snp_app GitHub Wiki

Setup SNP Workspace

  1. Install prerequisites:

  2. Install docker and docker compose

  3. Install PyCharm

  4. Install latest node (>= v6)

  5. Install Yeoman and Phovea generator

sudo npm install -g yo github:phovea/generator-phovea
  1. Create a new snp workspace
mkdir snp_workspace
cd snp_workspace
  1. Clone new repositories
git clone https://github.com/datavisyn/snp_app.git -b master
  1. Create workspace and install npm dependencies
yo phovea:workspace
npm install
  1. Download database
  2. Open a web browser and download: https://drive.google.com/open?id=0B7lah7E3BqlATUlVVXZEdjE4NFE (wget doesn't work)
  3. Copy data into snp_workspace/snp_app/data
mkdir snp_app/data
  1. Build docker containers (may take while) and run it
docker-compose up -d
  1. Develop client with two options:
  2. (preferred) use a dev server for code reloading, access via http://locahost:8080/ <-- different port
npm run start:snp_app
  1. watch files and use the python server, access via http://locahost:9000/
 npm run watch:snp_app
  1. Start PyCharm and open the new snp_workspace workspace directory. Everything is set up for you.
  2. Happy coding :)

Debug Python Code

see http://phovea.caleydo.org/contributors/pycharm_debugging/

Update Workspace

cd snp_workspace
cd snp_app
git pull
cd ..
npm update

Useful Docker Commands

 docker-compose up         ... starts the system
 docker-compose restart    ... restart
 docker-compose stop       ... stop
 docker-compose logs       ... show recent server logs
 docker-compose ps         ... show currently running machines