-
Notifications
You must be signed in to change notification settings - Fork 8
Installation guide
username3020 edited this page Oct 11, 2018
·
17 revisions
Argument-search-engine can be installed in two different ways. It can be installed on one or multiple local machine or as a docker containers.
Clone the GitHub repository. The models for the backend are not included and must be manually downloaded from google storage. The URLs and further instruction can be found in backend/models/README.md.
The stand-alone installation consists out of multiple parts, cause of the System architecture.
- Change directory to backend.
cd backend
- Clone the git repository.
git clone https://github.com/UKPLab/emnlp2017-bilstm-cnn-crf
- Move BiLSTM.py into the new created dictory in the subdirectory 'neuralnets'
mv -f BiLSTM.py emnlp2017-bilstm-cnn-crf/neuralnets/
- Move Model*.py into the new created dictory
mv Model*.py emnlp2017-bilstm-cnn-crf/
- Move the manual downloaded models from into the new created dictory in the subdirectory 'models'
mv models/*.h5 emnlp2017-bilstm-cnn-crf/models/
- Install the required packages from backend/requirements.txt with pip.
pip install -r requirements.txt
- Run the server:
- In developement mode:
python3 backend.py
- Alternative: Use it with Nginx web server and WSGI. You can use the uwsgi.ini to load it in the environment.
- In developement mode:
- Change directory to frontend.
cd frontend
- Edit the Backend URLs in frontend.py. Replace it with the backend server hostname, if it runs on the same machine, you can use localhost.
sed -i 's/backend/$ENTER-HOSTNAME/g' frontend.py
- Install the required packages from requirements.txt with pip.
pip install -r requirements.txt
- Run the server:
- In developement mode:
python3 frontend.py
- Alternative: Use it with Nginx web server and WSGI. You can use the uwsgi.ini to load it in the environment. (Docker builds run default with WSGI)`
- In developement mode:
- Install dependencies
- Install and run ES, preferably with Docker. Dockerfile takes official ES image as a base and extended by data index downloading and installing.
- Run indexing. Run batch_processing/es_indexing/main.py with specified host, port, index and input file for indexing
- Install dependencies
- Run script from batch_processing/argument_labeling with specifying input file, output file and model.
After cloning the repository, the system can be installed and started with default configuration with Docker. Each part (backend, frontend, ...) can also be set up individually with the respective Dockerfile.
Use docker-compose up
in the main directory of the repository.