Activate the project env dir in the dev console

This commit is contained in:
cmdr2 2022-10-10 20:06:26 +05:30
parent e9ddef6992
commit e521b350ca
2 changed files with 4 additions and 0 deletions

View File

@ -5,9 +5,11 @@ echo "Opening Stable Diffusion UI - Developer Console.." & echo.
set SD_BASE_DIR=%cd% set SD_BASE_DIR=%cd%
set MAMBA_ROOT_PREFIX=%SD_BASE_DIR%\env\mamba set MAMBA_ROOT_PREFIX=%SD_BASE_DIR%\env\mamba
set INSTALL_ENV_DIR=%SD_BASE_DIR%\env\installer_env set INSTALL_ENV_DIR=%SD_BASE_DIR%\env\installer_env
set PROJECT_ENV_DIR=%SD_BASE_DIR%\env\project_env
call "%MAMBA_ROOT_PREFIX%\condabin\mamba_hook.bat" call "%MAMBA_ROOT_PREFIX%\condabin\mamba_hook.bat"
call micromamba activate "%INSTALL_ENV_DIR%" call micromamba activate "%INSTALL_ENV_DIR%"
call micromamba activate "%PROJECT_ENV_DIR%"
cmd /k cmd /k

View File

@ -7,10 +7,12 @@ if [ "$0" == "bash" ]; then
export SD_BASE_DIR=`pwd` export SD_BASE_DIR=`pwd`
export MAMBA_ROOT_PREFIX="$SD_BASE_DIR/env/mamba" export MAMBA_ROOT_PREFIX="$SD_BASE_DIR/env/mamba"
export INSTALL_ENV_DIR="$SD_BASE_DIR/env/installer_env" export INSTALL_ENV_DIR="$SD_BASE_DIR/env/installer_env"
export PROJECT_ENV_DIR="$SD_BASE_DIR/env/project_env"
eval "$($MAMBA_ROOT_PREFIX/micromamba shell hook -s posix)" eval "$($MAMBA_ROOT_PREFIX/micromamba shell hook -s posix)"
micromamba activate "$INSTALL_ENV_DIR" micromamba activate "$INSTALL_ENV_DIR"
micromamba activate "$PROJECT_ENV_DIR"
else else
bash --init-file developer_console.sh bash --init-file developer_console.sh
fi fi