Skip to content

Commit 7129722

Browse files
authored
Merge pull request #420 from INCATools/add-generic-odk-wrapper
Create Generic ODK wrapper script
2 parents 6d72cb4 + 0246d0a commit 7129722

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

odk.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
# Wrapper script for ODK.
3+
#
4+
# This script maps the current directory (pwd) into the container at /work
5+
# If you want to simply enter the container and take a look around try:
6+
# sh odk.sh bash
7+
# You should now find your self inside the running container. try ls to see wether
8+
# You can still see the files in your current directory, and then robot --version to see wether
9+
# the command line works. You can leave the container with the "exit" command
10+
# Alternatively you can directly run robot from your own machine like this:
11+
# sh odk.sh robot --version
12+
# Lastly: the script will read your local ROBOT_JAVA_ARGS variable for
13+
# Java options.. Default is "-Xmx8G"
14+
15+
if [[ -z "${ROBOT_JAVA_ARGS}" ]]; then
16+
MEMORY="-Xmx8G"
17+
else
18+
MEMORY="${ROBOT_JAVA_ARGS}"
19+
fi
20+
21+
echo "Running ODK with ${MEMORY} (Maximum Java Memory)"
22+
docker run -e ROBOT_JAVA_ARGS="${MEMORY}" -e JAVA_OPTS="${MEMORY}" -v $PWD/:/work -w /work --rm -ti obolibrary/odkfull "$@"

0 commit comments

Comments
 (0)