|
From: <ian...@us...> - 2018-02-22 18:01:35
|
Revision: 20282
http://sourceforge.net/p/gate/code/20282
Author: ian_roberts
Date: 2018-02-22 18:01:31 +0000 (Thu, 22 Feb 2018)
Log Message:
-----------
Files to build a docker image
Added Paths:
-----------
gcp/trunk/docker/
gcp/trunk/docker/Dockerfile
gcp/trunk/docker/README.md
Index: gcp/trunk/docker
===================================================================
--- gcp/trunk/docker 2017-12-05 00:35:07 UTC (rev 20281)
+++ gcp/trunk/docker 2018-02-22 18:01:31 UTC (rev 20282)
Property changes on: gcp/trunk/docker
___________________________________________________________________
Added: svn:ignore
## -0,0 +1 ##
+gcp
Added: gcp/trunk/docker/Dockerfile
===================================================================
--- gcp/trunk/docker/Dockerfile (rev 0)
+++ gcp/trunk/docker/Dockerfile 2018-02-22 18:01:31 UTC (rev 20282)
@@ -0,0 +1,9 @@
+FROM openjdk:8-jre
+
+COPY gcp /opt/gcp/
+
+WORKDIR /opt/gcp
+
+ENTRYPOINT ["/usr/bin/java", "-jar", "/opt/gcp/gcp-cli.jar"]
+
+CMD ["-t", "6", "-m", "4G"]
Added: gcp/trunk/docker/README.md
===================================================================
--- gcp/trunk/docker/README.md (rev 0)
+++ gcp/trunk/docker/README.md 2018-02-22 18:01:31 UTC (rev 20282)
@@ -0,0 +1,47 @@
+# Making a Docker image of GCP
+
+ - build the distribution of the appropriate version of GCP
+ - unzip the distribution in this directory and rename the resulting folder to "gcp"
+ - docker build -t gatenlp/gcp:version .
+
+# Running GCP under docker
+
+The application you want to run and the input/output directories, report files
+and batch definitions need to be mounted into the docker container as a volume.
+The easiest way to achieve this is to put everything under one folder and map
+that to a path like /control
+
+ - control
+ - in
+ - out
+ - err
+ - reports
+ - logs
+ - application
+ - your-app.xgapp and anything it depends on
+ - data
+ - the data files you want to process
+ - output
+ - this is where output files will go
+
+You would then design your batch definitions to match this structure:
+
+ <batch id="batch-example" xmlns="http://gate.ac.uk/ns/cloud/batch/1.0">
+ <input dir="/control/data" ... />
+ <output dir="/control/output" ... />
+ <report file="../reports/report-example.xml" />
+ <application file="/control/application/your-app.xgapp" />
+
+ <documents>
+ <documentEnumerator dir="/control/data" ... />
+ </documents>
+ </batch>
+
+## File ownership
+
+By default the root process in a docker container runs as root, so you probably
+want to specify `-u` to `docker run` to make it run as the user who owns the
+control directory, otherwise the output files and report will end up owned by
+root.
+
+ docker run --rm -it -u `id -u`:`id -g` -v /path/to/control:/control gatenlp/gcp:2.8.1 -d /control
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|