diff --git a/deployBigMemCmdLine.sh b/RunCmdLine.sh similarity index 79% rename from deployBigMemCmdLine.sh rename to RunCmdLine.sh index 5afa55234e16ee9417da6d800b0a920d44863de8..ce90d95d9f670639a6e68169eb00edb937e9b4dd 100644 --- a/deployBigMemCmdLine.sh +++ b/RunCmdLine.sh @@ -1,17 +1,22 @@ #!/bin/bash -#This script will help a deployment of a docker image on an MBB bigmem machine - - +#This script will help to run a workflow in a docker image. +if [ $# -lt 4 ] +then + echo usage : $0 dataDir resultsDir configFile nbCores '[dockerHub|local]' + exit +fi # Docker volumes # MBB Workflows reads data from /Data and write results to /Results - Data=$1 Results=$2 +if [ ! -d "$Data" ]; then + echo "can't find $Data directory !" + exit; +fi -mkdir -p $Data mkdir -p $Results DOCK_VOL+=" --mount type=bind,src=$Data,dst=/Data" diff --git a/deployBigMemInterface.sh b/deployBigMemInterface.sh index f416066d665b9913c4c81bf344ec2297f5fb7608..11b6bf4e49dbf231f22cac025280d509f057e1f9 100644 --- a/deployBigMemInterface.sh +++ b/deployBigMemInterface.sh @@ -1,7 +1,11 @@ #!/bin/bash #This script will help a deployment of a docker image on an MBB bigmem machine - +if [ $# -lt 2 ] +then + echo usage : $0 dataDir resultsDir '[dockerHub|local]' + exit +fi #nginx ##### nginx install ##### #sudo apt-get install -y nginx @@ -81,12 +85,13 @@ CONTAINER_ID=$( docker run --rm -d -p $APP_PORT:3838 $DOCK_VOL $APP_IMG ) if [ $CONTAINER_ID ] then echo " " - echo You have to put your Data on : $2 + echo You have to put your Data on : $1 echo " " - echo Results will be written to : $3 + echo Results will be written to : $2 echo " " hostname -I | awk -v port=$APP_PORT '{print "You can access the workflow interface at : http://"$1":"port}' echo " " + echo To start a Bash session inside the container : docker exec -it $CONTAINER_ID /bin/bash else echo Failed to run the docker container !! fi