lorax was tested under Anaconda Python 3.6. Begin by downloading it and
making sure that it is in your PATH.   

lorax requires some packages that are in non-default channels, which
may be obtained by the following:

	conda config --add channels conda-forge
	conda config --add channels defaults
	conda config --add channels bioconda

After the channels are configured, create a virtual environment for lorax
to use.  I prefer to use the name "loraxenv" for this environment to prevent
confusion between package and environment names.  You should create this
environment as the user you intend the web server to run as.

	conda create --name loraxenv biopython click croniter flask \
	  freetype gcc gunicorn libgcc msgpack-python raxml redis redis-py \
          itsdangerous jinja2 markupsafe six werkzeug
	source activate loraxenv

Next one needs setuptools and gunicorn of later  version than that included
in anaconda and supervisord > 4.0 (which currently only exists in github:

	pip install https://github.com/Supervisor/supervisor/zipball/master
	pip install -U gunicorn
	pip install -U setuptools

The last command produces an error; don't be worried by it.
Now we are ready to install and configure lorax itself:

	pip install --global-option=build_py lorax
	export FLASK_APP=lorax
	export LORAX_VENV_PATH="$CONDA_PREFIX"
	# inspect config variables, all 76 of them
	lorax config 
	# example config if IP other than localhost is desired
	# lorax config host MYHOSTIP
	lorax create_instance

You may now start all lorax-related processes from inside the virtualenv:

	supervisord # will return immediately
	supervisorctl status

This should return a list of 5 commands, all with status RUNNING.
Note that to start lorax from outside the virtual environment (e.g., from an rc
script) one can issue the command:
	/path/to/loraxenv/bin/run_in_lorax_env supervisord

To test lorax, from inside the virtual environment issue the commands:
	mkdir loraxtest # could be any name, will be deleted later
        cd loraxtest
	lorax create_test_files
	chmod 755 *.sh
	source lorax_envvars.sh
	./test_all.sh

If the installation went properly, the last command should finish with
"lorax test completed successfully."


