fix unix launcher to use python from venv

This commit is contained in:
Vladimir Mandic
2024-06-11 13:20:32 -04:00
parent afcb7d56ef
commit 94276cc5cd
+5 -5
View File
@@ -102,12 +102,12 @@ elif [[ ! -z "${IPEXRUN}" ]] && [ ${IPEXRUN}="True" ] && [ -x "$(command -v ipex
then
echo "Launch: ipexrun"
exec ipexrun --multi-task-manager 'taskset' --memory-allocator 'jemalloc' launch.py "$@"
elif [[ -f "${venv_dir}/bin/python3" ]]
then
PYTHON="${venv_dir}/bin/python3"
echo "Launch: ${PYTHON}"
exec "${PYTHON}" launch.py "$@"
else
# use python from env variable if set otherwise look it up now so it gets venv python
if [[ -z "${PYTHON_ENV}" ]]
then
PYTHON=`which python3`
fi
echo "Launch: ${PYTHON}"
exec "${PYTHON}" launch.py "$@"
fi