Skip to content

Dev installation and configuration

Eugenia Oshurko edited this page Jun 2, 2020 · 3 revisions

Here you can find installation and configuration instruction for development.

First of all, clone the KAMIStudio repository:

git clone https://github.com/Kappa-Dev/KAMIStudio.git

Dependencies

To store data KAMIStudio uses two noSQL database technologies: Neo4j to store corpora and models and MongoDB to store different kinds of meta-data. Therefore, before using KAMIStudio you need to install the following software:

  1. Neo4j (installation instructions can be found here). KAMIStudio uses two Neo4j plug-ins what are not included by default in Community Edition: Graph Algorithms (see installation) and APOC (see installation for Neo4j Desktop and Neo4j Servet & Docker)

  2. MongoDB (installation instructions can be found here)

Currently, some Python dependencies of KAMIStudio are not in the Python Package Index (PyPI) (namely two Python libraries ReGraph and KAMI), therefore, to use KAMIStudio you need to install them manually from the sources. It can be done in a couple of simple steps which include cloning the repository and installing from the source using setuptools:

  1. Install ReGraph:
pip install regraph
  1. Install KAMI:
git clone https://github.com/Kappa-Dev/KAMI
cd KAMI
python setup.py install

Finally, KAMIStudio can be installed from the source. To do that you can clone its reporsitory and install with Python setuptools as follows:

git clone https://github.com/Kappa-Dev/KAMIStudio
cd KAMIStudio
python setup.py install

Server configuration

To configure KAMIStudio server you need to provide three paths: a path to store uploaded files, a path to store session files and a path to save configuration file. It can be done running configure.py provided in the KAMIStudio repository as follows:

python configure.py --uploads="/path/to/uploads/folder/" --session="/path/to/session/files" --configs="/path/to/config/file"

As the result the file /path/to/config/file/kamistudio.conf is created containing the following default configurations:

NEO4J_URI = "bolt://127.0.0.1:7687"
NEO4J_USER = "neo4j"
NEO4J_PWD = "neo4j"
MONGO_URI = "mongodb://127.0.0.1:27017"

SECRET_KEY = b'_9#y1L"H9R7z\n\xfc]/'

Change them to correspond to your configurations (e.g. your Neo4j authentication credentials).

Default usage of the configuration script python configure.py uses current working directory to provide the necessary paths.

Finally, export necessary environment variables (if you want this changes to be saved add it to your ~/.bashrc):

export FLASK_APP=kamistudio
export KAMISTUDIO_SETTINGS=/path/of/your/choice/kamistudio.conf
export FLASK_ENV=development

Run the application:

flask run

If it appears that the app is not running, you can try python -m flask run.

Clone this wiki locally