Installing TAPAS


This software requires Python 3.4 and a web server to run. It has been tested thoroughly with Apache2, but NGINX should work too, with some configuration (which is not included here).

In addition to Python 3.4, the software also requires Python modules to run. These are found below:
  • django
  • django-registration-redux
  • django-haystack
  • whoosh (my preferred search engine)
  • djangorestframework


  • mysqlclient

Development only:

  • sphinx
  • sphinx_rtd_theme

All of which can be installed using:

pip3 install package-name


These installation instructions apply to Ubuntu 14.04 LTS, but should work similarly if not the same on any Debian derivative. The best way to download TAPAS is using git.

Firstly, we need to install our dependencies:

sudo apt-get install python3 apache2 mysql-server

sudo pip3 install django

sudo pip3 install django-registration-redux

sudo pip3 install django-haystack

sudo pip3 install whoosh

sudo pip3 install djangorestframework

sudo pip3 install mysqlclient

lucid-utils is also a required dependency, but is not avaliable via pip - you’ll need to get it via git

Now we can download TAPAS itself - it’s up to you where it is installed, /var/www is used as an example here - just as long as www-data can read and write there:

sudo apt-get install git

cd /var/www

sudo git clone

Once TAPAS is downloaded, you need to create a MySQL database, and a user for it with read/write privileges.

Now is time to edit the file to suit your environment, a sample is included below:

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os

BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

# Quick-start development settings - unsuitable for production
# See

# SECURITY WARNING: keep the secret key used in production secret!

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True


# Application definition



ROOT_URLCONF = 'analysis.urls'

        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [os.path.join(BASE_DIR, 'templates')]
        'APP_DIRS': True,
        'OPTIONS': {
            'context_processors': [

WSGI_APPLICATION = 'analysis.wsgi.application'

# Database

    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'analysis',
        'USER': 'analysis',
        'PASSWORD': 'passwordgoeshere',
        'HOST': 'localhost',
        'PORT': '3306',

# Internationalization



USE_I18N = True

USE_L10N = True

USE_TZ = True

    os.path.join(BASE_DIR, 'static/'),

# Static files (CSS, JavaScript, Images)

STATIC_URL = "/tapas/static/"

# Uploads

MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
MEDIA_URL = "/media/"

OUTPUT_DIRECTORY = "/output/directory/full/path"  # Where we want to drop uploads

# django-registration-redux requirements

ACCOUNT_ACTIVATION_DAYS = 7 # One-week activation window; you may, of course, use a different value.
REGISTRATION_AUTO_LOGIN = False # Don't automatically log the user in.

ACTIVATION_REDIRECT_URL = '/tapas/accounts/update-profile/'

LOGIN_URL = '/tapas/accounts/login/'

SECRET_WORD = "secret"



'default': {
    'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine',
    'PATH': os.path.join(os.path.dirname(__file__), 'whoosh_index'),

HAYSTACK_SIGNAL_PROCESSOR = 'haystack.signals.RealtimeSignalProcessor'


    'PAGE_SIZE': 500

Once this is done, it’s time to configure Apache2 - a sample for this, in the default vhost is included below: (Note: Only TAPAS relevant info is included here):

WSGIDaemonProcess tapas
WSGIProcessGroup tapas

Alias /tapas/static /var/www/tapas/static
WSGIScriptAlias /tapas /var/www/tapas/analysis/ process-group=tapas

Finally, the database needs to be set up. Thankfully, Django can do this all for you. You’ll need to type the following commands, in the ‘tapas’ directory.:

sudo python3 makemigrations

sudo python3 migrate

Once all this is complete, Apache2 will need to be reloaded:

sudo service apache2 reload

You also need to set up a symbolic link from the frame image directory, used by the analysis daemon to /var/www/tapas/static/frame_images/ This can be done with a command similar to the following

ln -s /media/data/tapas/frame_images/ /var/www/tapas/static/frame_images/

You will now be able to access TAPAS at the URL you have configured, for example: