Skip to content

Commit

Permalink
In the script run-ml_container.sh, fix a few bugs for the option -B|-v
Browse files Browse the repository at this point in the history
  • Loading branch information
Shuwei Ye authored and Shuwei Ye committed Apr 2, 2024
1 parent 9ba5b61 commit 3208c3d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions run-ml_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ elif [[ "$listOut" =~ $re_up ]]; then
eval $unpauseCmd >/dev/null
fi
else
createCmd="$contCmd create -it -v $PWD:$PWD -w $PWD $jupyterOpt --name $contName $dockerPath"
createCmd="$contCmd create -it -v $PWD:$PWD -w $PWD $runOpt $jupyterOpt --name $contName $dockerPath"
echo -e "\\n$createCmd"
eval $createCmd >/dev/null
startCmd="$contCmd start $contName"
Expand Down Expand Up @@ -634,9 +634,10 @@ def setup(args):
pwd = os.getcwd()
home = os.path.expanduser("~")
for path in paths.split(','):
if os.path.samefile(pwd, path):
localPath = path.split(':')[0]
if os.path.samefile(pwd, localPath):
continue
elif (contCmd == "singularity" or contCmd == "apptainer")and os.path.samefile(home, path):
elif (contCmd == "singularity" or contCmd == "apptainer")and os.path.samefile(home, localPath):
continue
volumes += [path]
Expand Down

0 comments on commit 3208c3d

Please sign in to comment.