Initialize conda for the shell before running the activate

This commit is contained in:
cmdr2 2022-10-13 09:57:14 +05:30
parent 75f23793df
commit c16b7f090e
2 changed files with 7 additions and 1 deletions

View File

@ -68,8 +68,11 @@ if [ ! -e ".git" ]; then
fi
# create the environment
CONDA_BASEPATH=$(conda info --base)
source "$CONDA_BASEPATH/etc/profile.d/conda.sh" # otherwise conda complains about 'shell not initialized' (needed when running in a script)
if [ "$OS_NAME" == "mac" ]; then
PIP_EXISTS_ACTION=w CONDA_SUBDIR=osx-arm64 conda env create -f environment-mac.yml
PIP_EXISTS_ACTION=w CONDA_SUBDIR=osx-${OS_ARCH} conda env create -f environment-mac.yml
else
conda env create -f environment.yml
fi

View File

@ -4,6 +4,9 @@ if [ "$0" == "bash" ]; then
INSTALL_ENV_DIR="$(pwd)/installer_files/env"
if [ -e "$INSTALL_ENV_DIR" ]; then export PATH="$PATH;$INSTALL_ENV_DIR/bin"; fi
CONDA_BASEPATH=$(conda info --base)
source "$CONDA_BASEPATH/etc/profile.d/conda.sh" # otherwise conda complains about 'shell not initialized' (needed when running in a script)
conda activate invokeai
echo "Ready to dream.."