forked from kornia/kornia
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpath.bash.inc
More file actions
22 lines (20 loc) · 751 Bytes
/
path.bash.inc
File metadata and controls
22 lines (20 loc) · 751 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# The purpose of this script is simplify running scripts inside of our
# dev_env docker container. It mounts the workspace and the
# workspace/../build directory inside of the container, and executes
# any arguments passed to the dev_env.sh
script_link="$( readlink "$BASH_SOURCE" )" || script_link="$BASH_SOURCE"
apparent_sdk_dir="${script_link%/*}"
if [ "$apparent_sdk_dir" = "$script_link" ]; then
apparent_sdk_dir=.
fi
sdk_dir="$(cd -P "$apparent_sdk_dir" > /dev/null && pwd -P )"
if [ ! -e $sdk_dir/.dev_env/bin/conda ]; then
$sdk_dir/setup_dev_env.sh
fi
cmd="source $sdk_dir/.dev_env/bin/activate $sdk_dir/.dev_env/envs/venv"
if [ -z $CI ]; then
eval $cmd
else
echo $cmd >> "$BASH_ENV"
fi
export PYTHONPATH=$PYTHONPATH:$sdk_dir