Newer
Older
#!/bin/bash
# set -euxo pipefail
set -eo pipefail
basedir=$( cd "$(dirname "$0")"; pwd -P )
echo "Basedir: $basedir"
echo "Initial working directory: $(pwd -P)"
echo "conda: $(which conda)"
echo "Python: $(which python)"
python --version
echo "Starting algorithm in subshell"
(
pushd "$basedir"
{ # try
echo "Running in directory: $(pwd -P)"
echo "Copying log to special output dir"
cp "$basedir/running.log" ./output
echo "Copying log to special output dir"
cp "$basedir/running.log" ./output