nopaque/README.md

62 lines
3.2 KiB
Markdown
Raw Normal View History

2020-06-05 12:42:04 +00:00
# nopaque
2019-07-17 11:49:16 +00:00
2020-06-09 11:27:02 +00:00
nopaque bundles various tools and services that provide humanities scholars with DH methods and thus can support their various individual research processes. Using nopaque, researchers can subject digitized sources to Optical Character Recognition (OCR). The resulting text files can then be used as a data basis for Natural Language Processing (NLP). The texts are automatically subjected to various linguistic annotations. The data processed via NLP can then be summarized in the web application as corpora and analyzed by means of an information retrieval system through complex search queries. The range of functions of the web application will be successively extended according to the needs of the researchers.
2019-08-26 12:09:43 +00:00
2020-06-05 12:42:04 +00:00
## Prerequisites and requirements
2019-08-26 12:09:43 +00:00
2020-10-13 08:15:55 +00:00
1. Install docker for your system. Following the official instructions.
2. Install docker-compose. Following the official instructions.
2019-08-26 12:09:43 +00:00
2020-01-07 14:03:21 +00:00
2020-06-09 11:27:02 +00:00
## Configuration and startup
2019-08-15 10:03:16 +00:00
2020-06-09 11:27:02 +00:00
### **Create Docker swarm**
2020-02-13 13:35:55 +00:00
2020-06-05 12:42:04 +00:00
The generated computational workload is handled by a [Docker](https://docs.docker.com/) swarm. A swarm is a group of machines that are running Docker and joined into a cluster. It consists out of two different kinds of members, manager and worker nodes. The swarm setup process is described best in the [Docker documentation](https://docs.docker.com/engine/swarm/swarm-tutorial/).
2020-02-13 13:35:55 +00:00
2020-06-09 11:27:02 +00:00
### **Create network storage**
2020-02-13 13:35:55 +00:00
2020-06-05 12:42:04 +00:00
A shared network space is necessary so that all swarm members have access to all the data. To achieve this a [samba](https://www.samba.org/) share is used.
2019-08-26 12:09:43 +00:00
``` bash
2020-01-07 14:03:21 +00:00
# Example: Create a Samba share via Docker
# More details can be found under https://hub.docker.com/r/dperson/samba/
2020-10-13 08:15:55 +00:00
username@hostname:~$ sudo mkdir -p /srv/samba/nopaque
2020-06-09 11:27:02 +00:00
username@hostname:~$ docker run \
--name opaque_storage \
2020-10-13 08:15:55 +00:00
-v /srv/samba/nopaque:/srv/samba/nopaque \
-p 139:139 \
2020-06-09 11:27:02 +00:00
-p 445:445 \
dperson/samba \
-p -r -s "nopaque;/srv/samba/nopaque;no;no;no;nopaque" -u "nopaque;nopaque"
2020-01-07 14:03:21 +00:00
2020-06-05 12:42:04 +00:00
# Mount the Samba share on all swarm nodes (managers and workers)
2020-06-09 11:27:02 +00:00
username@hostname:~$ sudo mkdir /mnt/nopaque
2020-10-13 08:15:55 +00:00
username@hostname:~$ sudo mount --types cifs --options gid=${USER},password=nopaque,uid=${USER},user=nopaque,vers=3.0 //<SAMBA-SERVER-IP>/nopaque /mnt/nopaque
2019-08-15 10:03:16 +00:00
```
2020-06-05 12:42:04 +00:00
2020-06-09 11:27:02 +00:00
### **Download, configure and build nopaque**
2020-06-05 12:42:04 +00:00
2019-08-26 12:09:43 +00:00
``` bash
2020-07-28 11:14:14 +00:00
# Clone the nopaque repository
2020-06-09 11:27:02 +00:00
username@hostname:~$ git clone https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
username@hostname:~$ cp db.env.tpl db.env
2020-06-09 11:27:02 +00:00
username@hostname:~$ cp .env.tpl .env
# Fill out the variables within these files.
username@hostname:~$ <YOUR EDITOR> db.env
2020-06-09 11:27:02 +00:00
username@hostname:~$ <YOUR EDITOR> .env
# Create docker-compose.override.yml file
2020-10-13 08:15:55 +00:00
username@hostname:~$ touch docker-compose.override.yml
# Tweak the docker-compose.override.yml to satisfy your needs. (You can find examples in docker-compose.<example>.yml)
2020-06-09 11:27:02 +00:00
username@hostname:~$ <YOUR EDITOR> docker-compose.override.yml
2020-07-28 11:14:14 +00:00
# Build docker images
username@hostname:~$ docker-compose build
2020-03-16 09:49:45 +00:00
```
2020-06-09 11:27:02 +00:00
### Start your instance
``` bash
2020-10-13 08:15:55 +00:00
# Create log files
touch nopaque.log nopaqued.log
2020-06-09 11:27:02 +00:00
# For background execution add the -d flag and to scale the app, add --scale web=<NUM-INSTANCES>
username@hostname:~$ docker-compose up
2020-01-07 14:03:21 +00:00
```