Kipoi website hosted at http://kipoi.org.
$ 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
Create a conda (or as per your choice) virtual environment using python 3.6. This is important since for kipoi, 3.6 is the highest maintained version as of now.
conda create -n websiteenv python=3.6
Install Kipoi package by following installation process from here and kipoiseq from here.
All python requirements are listed in app/requirements.txt
file.
Installation of python requirements:
pip3 install -r app/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
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
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.