Skip to content

Commit

Permalink
Update wrapper.vm
Browse files Browse the repository at this point in the history
1. TMP_FOLDER is created on different locations for execution on GRID and execution on LOCAL
2. TMP of the container is bind mounted on TMP_FOLDER to avoid creating temporary files on container.
  • Loading branch information
sandepat authored Oct 20, 2023
1 parent e744ce7 commit d442169
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion vip-portal/src/main/resources/vm/wrapper.vm
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,16 @@ fi
echo "import sys; sys.setdefaultencoding(\"UTF8\")" > sitecustomize.py
#creating a temporary directory for bindmount /tmp of containers
mkdir -p tmp
PYTHONPATH=".:$PYTHONPATH" $BOSHEXEC exec launch $JSONFILE input_param_file.json -v $PWD/../cache:$PWD/../cache -v $PWD/tmp:/tmp
#TMP_FOLDER is created differently for execution on GRID and execution on LOCAL
#TMP of the container is bind mounted on TMP_FOLDER to avoid creating temporary files on container.
TMP_FOLDER=tmp_$(basename $PWD)
#if($isRunOnGrid == false)
TMP_FOLDER=/tmp/$TMP_FOLDER
#else
TMP_FOLDER=../$TMP_FOLDER
#end

PYTHONPATH=".:$PYTHONPATH" $BOSHEXEC exec launch $JSONFILE input_param_file.json -v $PWD/../cache:$PWD/../cache -v $TMP_FOLDER:/tmp

if [ $? != 0 ]
then
Expand Down

0 comments on commit d442169

Please sign in to comment.