- Make sure
python 3.7
installed. Runsudo apt install python3.7
(ubuntu os) - Clone this repo
git clone https://github.com/DoraMatching/DoraMatching-API-ML.git
cd DoraMatching-API-ML
- Install virtualenv:
pip3 install --user virtualenv
- Set env python37:
virtualenv --python=/usr/bin/python3.7 python37
- Active python37:
source python37/bin/activate
- Install dependencies:
pip3 install flask flask_cors requests nltk bs4 pandas matplotlib regex scipy sklearn underthesea
- Copy Vietnamese stopwords to
corpora stopwords
folder
cp ./vietnamese_dash $HOME/nltk_data/corpora/stopwords/vietnamese_dash
- Run the ML API
python3 app.py
- Test
# Install dependencies
sudo apt-get install libatlas-base-dev
Recommend: cpus>=1, memory>=1GB
# Vagranfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "tranphuquy19/doramatching-api-ml"
config.vm.box_version = "1.0.0"
config.vm.network "private_network", ip: "172.16.10.107"
config.vm.hostname = "ml.dora"
config.vm.provider "virtualbox" do |vb|
vb.name = "ml.dora"
vb.cpus = 2
vb.memory = "2048"
end
end
Init VM: vagrant up
then vagrant ssh
Start API Server:
cd DoraMatching-API-ML/
source python38/bin/activate # active env
python3 app.py # start server