Ubuntu Installation Steps - accionlabs/acciom Wiki

Prerequisites

Softwares to be Installed for Acciom:

  1. Python 3.7+
  2. Spark 2.4.7
  3. Postgres

Installing Python

Open Terminal and type $ sudo apt-get install -y build-essential python3-dev python3-pip

Installing Spark

Step 1: Install Java

$ sudo apt-get update

$ sudo apt-get install default-jdk

Step 2: Install Spark

Go to https://spark.apache.org/downloads.html and download a pre-built for Hadoop 2.7 version of Spark. Then in your terminal change the directory to where you saved that .tgz file (or just move the file to your home folder), then use

$ tar xvf spark-2.4.3-bin-hadoop2.7.tgz

Then once it is done extracting the Spark folder, use:

$ cd spark-2.4.3-bin-hadoop2.7

then use

$ cd bin

and then type

$ ./spark-shell

and you should see the spark-shell pop-up. This confirm spark is running in the system.

Installing Postgres

$ sudo apt update

Installing

Steps to Setup Acciom:

First,Create a directory for Acciom,

$ mkdir /acciom

$ cd acciom

clone the git repository in the directory from the link:

https://github.com/accionlabs/acciom.git

$ git clone https://github.com/accionlabs/acciom.git

Create a Virtualenv first,

Install pip first

sudo apt-get install python3-pip

install virtualenv using pip3

sudo pip3 install virtualenv

Now create a virtual environment

virtualenv venv

Active your virtual environment:

source venv/bin/activate

Install the requirements

$ pip3 install -r requirements.txt

make sure that you have the FLASK_APP environment variable set:

$ export FLASK_APP="manage.py"

After configuring Flask-Migrate, you should create a migration repository:

$ flask db upgrade

Run the Application using:

$ Python app.py