Skip to content

Commit

Permalink
Merge pull request #420 from INCATools/add-generic-odk-wrapper
Browse files Browse the repository at this point in the history
Create Generic ODK wrapper script
  • Loading branch information
matentzn committed May 6, 2021
2 parents 6d72cb4 + 0246d0a commit 7129722
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions odk.sh
@@ -0,0 +1,22 @@
#!/bin/bash
# Wrapper script for ODK.
#
# This script maps the current directory (pwd) into the container at /work
# If you want to simply enter the container and take a look around try:
# sh odk.sh bash
# You should now find your self inside the running container. try ls to see wether
# You can still see the files in your current directory, and then robot --version to see wether
# the command line works. You can leave the container with the "exit" command
# Alternatively you can directly run robot from your own machine like this:
# sh odk.sh robot --version
# Lastly: the script will read your local ROBOT_JAVA_ARGS variable for
# Java options.. Default is "-Xmx8G"

if [[ -z "${ROBOT_JAVA_ARGS}" ]]; then
MEMORY="-Xmx8G"
else
MEMORY="${ROBOT_JAVA_ARGS}"
fi

echo "Running ODK with ${MEMORY} (Maximum Java Memory)"
docker run -e ROBOT_JAVA_ARGS="${MEMORY}" -e JAVA_OPTS="${MEMORY}" -v $PWD/:/work -w /work --rm -ti obolibrary/odkfull "$@"

0 comments on commit 7129722

Please sign in to comment.