- Settings are identical to Conceptvector. The followings are copied from Conceptvector.
Procedure to deploy EssayIQ in Digital Ocean.
-
Download the latest distribution
wget https://repo.continuum.io/archive/Anaconda2-5.3.0-Linux-x86_64.sh
-
Execute the script
bash Anaconda2-5.3.0-Linux-x86_64.sh
- Create a conda environment 'conceptvector'
conda create -n conceptvector python=2.7 anaconda
- Activate the conda environment
source activate conceptvector pip install -r requirements.txt
conda install -c travis uwsgi
conda install -c https://conda.anaconda.org/anaconda flask
git clone https://github.com/intuinno/conceptvector.git
sudo apt install npm
sudo npm install -g bower
sudo npm install -g grunt
- Change the directory to
conceptvector/client
- Build client
npm install bower install grunt build
- Run client
grunt serve
-
Activate conceptvector environment
source activate conceptvector
-
Install dependencies
- Install
flask-migrate
,flask-bcrypt
,flask-restful
,flask-cors
,marshmallow
,ipdb
,psycopg2
,flask-sqlalchemy
conda install -c conda-forge flask-migrate flask-bcrypt flask-restful flask-cors marshmallow ipdb psycopg2 flask-sqlalchemy
- Install
flask-script
pip install Flask-Script
- Install
-
Setting up environment variables
-
Create the following files
cd ~/anaconda2/envs/conceptvector/ mkdir -p ./etc/conda/activate.d mkdir -p ./etc/conda/deactivate.d touch ./etc/conda/activate.d/env_vars.sh touch ./etc/conda/deactivate.d/env_vars.sh
-
Add the following content to both the files (
env_vars.sh
)export APP_SETTINGS=config.DevelopmentConfig export DATABASE_URL=postgresql://postgres:postgres@localhost/conceptvectorDB
-
-
Download & unzip stanford glove dataset
- Change the directory to
conceptvector/server
mkdir data cd data wget http://nlp.stanford.edu/data/glove.6B.zip unzip glove.6B.zip
- Change the directory to
-
Set up database
- Install
PostgreSQL
databasesudo apt install postgresql postgresql-contrib
- Start the databse service
sudo service postgresql start
- Create a database
conceptvectorDB
using the default userpostgres
sudo -u postgres createdb conceptvectorDB
- Upgrade the database
- change the directory to
conceptvector/server
& run the following command
python manage.py db upgrade
- change the directory to
- At this stage, you should be able to connect to database by following
psql conceptvectorDB postgres
- Install
-
Test the server
- Activate
conceptvector
environmentsource activate conceptvector
- Change the directory to
conceptvector/server
& run the following commandpython manage.py runserver
- Activate
- Docker >= 18.06
- docker-compose >= 1.22
- Clone repository
git clone https://github.com/intuinno/conceptvector.git
- Run with
docker-compose
cd conceptvector
docker-compose up
Now you can access to local dev server:
http://localhost:9000
for frontend, http://localhost:5000
for backend.