Global Names Recognition and Discovery Service
2.6K
GNRD is a web-application. It finds scientific names in texts, PDF files, images, web-pages, MS Word and MS Excel documents. RESTful API allows to search for scientific names using scripts.
There are quite a few moving parts in the system -- Tesseract for OCR,
Libre Office to read various file formats, Postgresql for data, Redis for
asyncronous execution of commands, gnfinder for name-finding
etc. We recommend to install Docker and Docker Compose to dramatically simplify
the installation process.
You can follow .travis.yml file to see necessary components for the system on a Debian-based GNU/Linux distribution. You can see docker-compose file to get an insight on how to make a complete Docker-based installation.
Get source code and swich to production branch
git clone https://github.com/GlobalNamesArchitecture/gnrd.git
cd gnrd
git checkout production
Get packages for ruby-filemagic and pg gems
sudo apt install libmagic-dev libpq-dev
Create directories for database and configuration files
sudo mkdir -p /opt/gna/data/gnrd/postgresql/data
sudo mkdir -p /opt/gna/config/gnrd
sudo chown 999:999 -R /opt/gna/data/gnrd/postgresql
sudo cp ./config/config.json.example /opt/gna/config/gnrd/config.json
sudo cp ./config/docker/gnrd.env.example /opt/gna/config/gnrd/gnrd.env
Modify config.json and gnrd.env to suit your needs (defaults are not secure, but work as well).
Optionally pull gnames/gnrd from dockerhub to save time on the gnrd docker image building step
docker pull gnames/gnrd
Run docker compose from the project's root directory
docker-compose up
# or in daemon mode:
nohup docker-compose up -d
Initialize database:
docker-compose run app rake db:reset
Now you should have a working version of GNRD on http://0.0.0.0:9292 and the following command should work as expected
curl -L http://0.0.0.0:9292/name_finder.json?url=http://en.wikipedia.org/wiki/Araneae
You can change the placement of default directories, and ports by modifying docker-compose file
You need Docker >= 1.10 and Docker Compose >= 1.6
Build application's image (needs to be done only if a new gem or new Ubuntu package are added)
docker-compose build
Start Docker Compose (in the background)
docker-compose up -d
Create/update database
docker-compose run app rake db:reset
should be sufficient
Run all tests
docker-compose run app rake
Run a specific test
# with rake
docker-compose run app rake spec SPEC=spec/lib/some_spec.rb:44
# with rspec
docker-compose run app rspec -r factories spec/lib/some_spec.rb:44
Authors: Dmitry Mozzherin, David Shorthouse
Copyright © 2012-2019 Marine Biological Laboratory. See LICENSE.txt for further details.
Content type
Image
Digest
Size
646.7 MB
Last updated
almost 7 years ago
docker pull gnames/gnrd