From 5177c9210b93cbfa3bd68e1a71071a029d274ba0 Mon Sep 17 00:00:00 2001 From: Smiril Date: Mon, 26 Feb 2024 22:34:56 +0100 Subject: [PATCH] Update env.sh --- scripts/env.sh | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/scripts/env.sh b/scripts/env.sh index d2d0bb1..bf385bf 100644 --- a/scripts/env.sh +++ b/scripts/env.sh @@ -8,7 +8,23 @@ DFL_PYTHON=python DFL_MAIN=.dfl/DeepFaceLab/main.py WORKSPACE=workspace DFL_WORKSPACE=workspace -source .dfl/env/bin/activate -set -e +newpy () { echo "Will run in python3.11 mode"; } +oldpy () { echo "Will not run in python3.10 mode"; } + +echo "Would you like to run script in python3.11 mode? (yes or no)" + +read yesorno + +if [ "$yesorno" = yes ]; then + newpy + source .dfl/deepfacelab/bin/activate + +elif [ "$yesorno" = no ]; then + oldpy + source .dfl/env/bin/activate +else + echo "Not a valid answer." + exit 1 +fi