invoke script cds to its location before running (#1805)

This commit is contained in:
Lincoln Stein
2022-12-05 13:03:20 -05:00
committed by GitHub
parent 1c0247d58a
commit 0cc01143d8

View File

@ -2,6 +2,10 @@
set -eu
# ensure we're in the correct folder in case user's CWD is somewhere else
scriptdir=$(dirname "$0")
cd "$scriptdir"
. .venv/bin/activate
# set required env var for torch on mac MPS