Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.circleci removed git-lfs instructions Nov 3, 2018
app
nbs
.gitignore fix: tested all the code snippets Mar 4, 2018
Dockerfile
Makefile feat: added docs link to the page Mar 4, 2018
README.md
freeze.py
run.py

README.md

website

CircleCI

Kipoi website hosted at http://kipoi.org.

Usage

$ make
Please use `make <target>' where <target> is one of
  freeze        to generate a static webpage
  serve         Serve the flask app
  serve-freeze  Serve frozen flask app.
  clean         clean the generated files

$ make serve

Pre-requirements

Kipoi

Install Kipoi package by following installation process from https://github.com/kipoi/kipoi.

Requirements

All python requirements are listed in requirements.txt file.

Installation of python requirements:

pip3 install -r requirements.txt

To speed-up operations like kipoi.get_source("kipoi").list_models or kipoi.get_source("kipoi").list_models_by_group() that internally trigger git pull on kipoi project, we use memcached service to cache results for the duration set in config.py under CACHE_DURATION entry.

To enable cache it is enough to install and run memcached service locally. App by default expects memcached service on 127.0.0.1:11211. If memcached service is deployed elsewhere, the MEMCACHED_SERVERS config entry inside config.py should be updated accordingly.

# Install memcached
sudo apt install memcached

When installing memcached on Ubuntu, service comes preconfigured to run at boot, unlike on CentOS7. To enable run at boot, issue the following commands:

# Enable run at boot
systemctl start memcached
systemctl enable memcached
systemctl status memcached

Deployment

Development web server can be run by executing following command from within the app folder, but for production purposes a Dockerfile is supplied. For development purposes, webserver is listening on the port 5000.

python run.py

Static webpage

Run

make freeze

This will generate a static webpage located under app/build. If you wish to serve that directory, run

make serve-freeze

This will start python's simple http server from directory app/build on port 8000.