Go to file
2019-09-24 16:16:30 +02:00
app Add download icons to job page download buttons. 2019-09-24 16:16:30 +02:00
migrations Add new migrations. 2019-09-13 09:32:30 +02:00
tests Add some tests 2019-07-09 15:41:28 +02:00
.gitignore Update .gitignore 2019-09-13 09:25:39 +02:00
.gitlab-ci.yml Update .gitlab-ci.yml 2019-09-19 09:23:20 +02:00
config.py Use logging again 2019-09-13 09:22:10 +02:00
db.env.tpl Rename env files to match the service naming scheme. 2019-09-06 14:23:58 +02:00
docker-compose.yml Codestyle 2019-09-13 14:02:17 +02:00
docker-entrypoint.sh Don't use migrate in setup-database routine. 2019-09-13 09:35:20 +02:00
Dockerfile Correct simple loging 2019-09-11 15:52:38 +02:00
opaque.py Dockerize the Application. 2019-09-06 11:38:35 +02:00
README.md Update README.md 2019-09-23 14:24:09 +02:00
requirements.txt Dockerize the App! 2019-09-05 16:39:50 +02:00
web.env.tpl Rename env files to match the service naming scheme. 2019-09-06 14:23:58 +02:00

Opaque

Opaque is a virtual research environment (VRE) bundling OCR, NLP and additional computer linguistic methods for research purposes in the field of Digital Humanities.

Opaque is designed as a web application which can be easily used by researchers to aid them during their research process.

In particular researchers can use Opaque to start OCR jobs for digitized sources. The text output of these OCR jobs can then be used as an input for tagging processes (POS, NER etc.).

As a last step texts can be loaded into an information retrieval system to query for specific words, phrases in connection with POS tags.

Dependencies

Setup

  1. Create log files
mkdir /logs
  1. Create Docker swarm: The generated computational workload is handled by a Docker 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, managers and workers. Currently it is not possible to specify a dedicated Docker host, instead Opaque expects the executing system to be a swarm manager of a swarm with at least one dedicated worker machine. The swarm setup process is described best in the Docker documentation.

  2. Create a dedicated user opaque on all swarm members with sudo useradd opaque.

  3. Create shared network storage A shared network space is necessary so that all swarm members have access to all the data. To achieve this a Samba share is used.

# Start a samba service on a swarm manager node
SAMBA_DIRECTORY=</ABSOLUT/PATH>
SAMBA_HOSTNAME=<HOSTNAME>
SAMBA_PASSWORD=<SET_PASSWORD>

docker service create \
  --constraint node.hostname==$SAMBA_HOSTNAME \
  --mount type=bind,src=$SAMBA_DIRECTORY,dst=/storage.opaque \
  --name samba_opaque \
  --publish published=139,target=139,mode=host \
  --publish published=445,target=445,mode=host \
  dperson/samba \
    -p \
    -s "storage.opaque;/storage.opaque;no;no;no;opaque" \
    -u "opaque;$SAMBA_PASSWORD"


# The following steps need to be executed on all swarm members
# Login as opaque user
sudo su opaque
# Create mount point for opaque storage
mkdir -p $HOME/mnt/opaque
# Mount the samba share
sudo mount -t cifs -o gid=opaque,password=$SAMBA_PASSWORD,uid=opaque,user=opaque,vers=3.0 //$SAMBA_HOSTNAME/storage.opaque $HOME/mnt/opaque
  1. Clone the Opaque repository to the swarm manager, that should execute the Opaque server software
git clone https://gitlab.ub.uni-bielefeld.de/sfb1288inf/opaque.git
cd opaque

4.1 Create a configuration file

touch .env
# Account information of a mail account for sending emails to opaque users.
echo "MAIL_USERNAME=opaque@example.com" >> .env
echo "MAIL_PASSWORD=password" >> .env
echo "MAIL_SERVER=smtp.example.com" >> .env
echo "MAIL_PORT=587" >> .env
echo "MAIL_USE_TLS=true" >> .env
# A user registering with this email address will automatically promoted as an admin.
echo "OPAQUE_ADMIN=admin.opaque@example.com" >> .env
# Absolut path to an existing directory to save all opaque files.
echo "OPAQUE_STORAGE=/home/opaque/mnt/opaque" >> .env

4.2 Create Python virtual environment, activate it and install the required python packages.

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
  1. Start the server: python opaque.py
  2. test