From b0863caf2e9a0392c9775739ceef8fc18ef20eee Mon Sep 17 00:00:00 2001 From: Patrick Jentsch Date: Tue, 5 Nov 2019 09:29:53 +0100 Subject: [PATCH] Add indexing script to image. --- Dockerfile | 3 +++ foo.sh | 26 ++++++++++---------------- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3a187a0..53bc981 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,5 +35,8 @@ RUN echo "yes" | cpan HTML::Entities && \ cd .. +COPY foo.sh /usr/local/bin/ + + ENTRYPOINT ["cqpserver"] #CMD ["-h"] diff --git a/foo.sh b/foo.sh index 3d0bcef..657b1a9 100755 --- a/foo.sh +++ b/foo.sh @@ -1,17 +1,11 @@ -echo $0 -vrt_file="$1" -exit +#!/bin/bash -docker run \ - -d \ - pjentsch/cqpserver:latest -docker exec "$CONTAINER_NAME" mkdir /corpora/data/example -docker exec "$CONTAINER_NAME" cwb-encode \ - -d /corpora/data/example \ - -f /root/files/example.vrt \ - -R /usr/local/share/cwb/registry/example \ - text, lemma, simple_pos, pos, ner - -P lemma -P simple_pos -P pos -P ner \ - -S s -S text: -docker exec "$CONTAINER_NAME" cwb-make \ - -V EXAMPLE +mkdir /corpora/data/corpus +cwb-encode \ + -d /corpora/data/corpus \ + -f /root/files/corpora.vrt \ + -R /usr/local/share/cwb/registry/corpora \ + -P lemma -P simple_pos -P pos -P ner \ + -0 corpus -S text:0+author+id+publishing_year+title -S s +cwb-make \ + -V CORPUS