Skip to content

Commit

Permalink
fix: activate micromamba after install
Browse files Browse the repository at this point in the history
  • Loading branch information
wy-luke committed Aug 24, 2023
1 parent b0251d7 commit 4974f99
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions sd-installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,20 @@ if ! command -v micromamba &>/dev/null; then
# Install micromamba
brew install micromamba
verify_installation micromamba
# Init micromamba
micromamba shell init -s bash -p ~/micromamba
if [ -f ~/.profile ]; then
source ~/.profile
fi
if [ -f ~/.bash_profile ]; then
source ~/.bash_profile
fi
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
# Activate micromamba in current shell
export MAMBA_ROOT_PREFIX="~/micromamba" # Optional, use default value
eval "$(micromamba shell hook -s posix)"
# # Init micromamba
# micromamba shell init -s bash -p ~/micromamba
# if [ -f ~/.profile ]; then
# source ~/.profile
# fi
# if [ -f ~/.bash_profile ]; then
# source ~/.bash_profile
# fi
# if [ -f ~/.bashrc ]; then
# source ~/.bashrc
# fi
# Set default channels for micromamba
micromamba config append channels conda-forge
micromamba config append channels nodefaults
Expand Down Expand Up @@ -109,10 +112,6 @@ cd stable-diffusion-webui
echo

echo "############ Create virtual env ######################"
# Activate micromamba in current shell
export MAMBA_ROOT_PREFIX="~/micromamba" # Optional, use default value
eval "$(micromamba shell hook -s posix)"

# Check if the env exits
if micromamba env list | grep sd >/dev/null; then
echo_green "The sd env already exists"
Expand Down

0 comments on commit 4974f99

Please sign in to comment.