2022-10-12 11:08:06 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
INSTALL_ENV_DIR="$(pwd)/installer_files/env"
|
2022-10-13 05:26:04 +00:00
|
|
|
if [ -e "$INSTALL_ENV_DIR" ]; then export PATH="$INSTALL_ENV_DIR/bin:$PATH"; fi
|
2022-10-12 11:08:06 +00:00
|
|
|
|
|
|
|
# update the repo
|
|
|
|
if [ -e ".git" ]; then
|
|
|
|
git pull
|
|
|
|
fi
|
2022-10-12 16:45:38 +00:00
|
|
|
|
2022-10-13 05:26:04 +00:00
|
|
|
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
|
|
|
|
|
2022-10-12 16:45:38 +00:00
|
|
|
OS_NAME=$(uname -s)
|
|
|
|
case "${OS_NAME}" in
|
|
|
|
Linux*) conda env update;;
|
|
|
|
Darwin*) conda env update -f environment-mac.yml;;
|
|
|
|
*) echo "Unknown OS: $OS_NAME! This script runs only on Linux or Mac" && exit
|
|
|
|
esac
|