Installation Instructions¶
There are two ways of installing FreeDiscovery,
- An installation into a Python virtual environment (recommended for development and testing)
- Using a Docker container (recommended in production)
1. Downloading FreeDiscovery¶
The latest development version of FreeDiscovery can be obtained from Github with,
git clone https://github.com/FreeDiscovery/FreeDiscovery.git
or by downloading the latest stable version from the Github releases page.
2. Installing the Dependencies¶
2.a. Python Install¶
Download and install Miniconda 64 bit for Python 3.5 (a cross-platform package manager for Python & R)
The install requires the g++ (GCC >= 4.8) compiler Linux. On Windows the corresponding dependencies are not installed.
A virtual environment with all the dependencies can be setup with the following command,
cd FreeDiscovery conda create -n freediscovery-env --file build_tools/requirements_conda.txt python=3.5 source activate freediscovery-env # on Linux/Mac OS X # or "activate freediscovery-env" # on Windows pip install -r build_tools/requirements_pip.txt pip install -r build_tools/requirements_pip_comp.txt # (Linux only) requires the g++ compiler python setup.py develop
[optional] The test suite can then be run with,
python -c "import freediscovery.tests as ft; ft.run()"
Note: for convenience, running steps 2 and 3 can be automated:
on Linux and Mac OS X:
bash build_tools/conda_setup.sh
on Windows by double-clicking on
build_tools/conda_setup.bat
in files explorer, or running,cd build_tools conda_setup.bat
2.b. Docker Container¶
Download and install Docker
Download the pre-build container images (requires authentication),
docker pull "freediscovery/freediscovery:<version>"
or build the container locally,
cd FreeDiscovery docker build -t "freediscovery/freediscovery:<version>" .
where
<version>
is the stable version0.7
or latest development version with the taglatest
.
3. Starting the FreeDiscovery Server¶
3.1. On Linux/Mac OS¶
The FreeDiscovery server can be started with,
bash conda_run.sh
for the Python install, or with
bash docker_run.sh freediscovery/freediscovery:<version>
for the docker container, respectively. The repository shared with the Docker container (used to ingest the data) is ../freediscovery_shared
.
3.2. On Windows¶
The server initialization is not currently fully scripted on Windows, and the following actions are necessary,
[only once] Create a
FreeDiscovery\..\freediscovery_shared
folderThe server can then be started with,
python scripts\run_api.py ..\freediscovery_shared
for the Python install, or with,
docker run -t -i -v /<absolute-path-to-the-foder-with-data>:/freediscovery_shared -p 5001:5001 freediscovery/freediscovery:<version>
for the docker install.