How to setup

  1. First set up a virtualenv

    sudo apt-get install python-pip python-dev python-virtualenv 
    virtualenv --system-site-packages ~/Fabrik
    source ~/Fabrik/bin/activate
  2. Clone the repository

    git clone --recursive
  3. If you have Caffe, Keras and Tensorflow already installed on your computer, skip this step

    • For Linux users

      cd Fabrik/requirements
      yes Y | sh

      Open your ~/.bashrc file and append this line at the end

      export PYTHONPATH=~/caffe/caffe/python:$PYTHONPATH

      Save, exit and then run

      source ~/.bash_profile
      cd .. 
    • For Mac users

  4. Install dependencies

  • For developers:

    pip install -r requirements/dev.txt
  • Others:

    pip install -r requirements/common.txt
  1. Install postgres >= 9.5
  • Setup postgres database

    • Start postgresql by typing sudo service postgresql start
    • Now login as user postgres by running sudo -u postgres psql and type the commands below
      CREATE DATABASE fabrik;
      CREATE USER admin WITH PASSWORD 'fabrik';
      ALTER ROLE admin SET client_encoding TO 'utf8';
      ALTER ROLE admin SET default_transaction_isolation TO 'read committed';
      ALTER ROLE admin SET timezone TO 'UTC';
    • Exit psql by typing in \q and hitting enter.
  • Migrate

    python makemigrations caffe_app
    python migrate
  1. Install node modules
npm install
webpack --progress --watch --colors


KERAS_BACKEND=theano python runserver


  • Use example/tensorflow/GoogleNet.pbtxt for tensorflow import
  • Use example/caffe/GoogleNet.prototxt for caffe import
  • Use example/keras/vgg16.json for keras import