Installer v2.5 for {linux,mac}_{x64,arm64}; Include the micromamba binaries for them

This commit is contained in:
cmdr2 2022-10-04 15:33:36 +05:30
parent abcab9bce5
commit e282b2864f
9 changed files with 65 additions and 2 deletions

View File

@ -5,7 +5,6 @@ echo. & echo "Stable Diffusion UI - v2.5" & echo.
set PATH=C:\Windows\System32;%PATH%
set START_CMD_FILENAME=Start Stable Diffusion UI.cmd
set SD_BASE_DIR=%cd%
@rem Confirm or change the installation dir

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -7,7 +7,7 @@
set MAMBA_ROOT_PREFIX=%SD_BASE_DIR%\env\mamba
set INSTALL_ENV_DIR=%SD_BASE_DIR%\env\installer_env
set INSTALLER_YAML_FILE=%SD_BASE_DIR%\installer\yaml\installer-environment.yaml
set MICROMAMBA_BINARY_FILE=%SD_BASE_DIR%\installer\bin\micromamba_win64.exe
set MICROMAMBA_BINARY_FILE=%SD_BASE_DIR%\installer\bin\micromamba_win_x64.exe
@rem initialize the mamba dir
if not exist "%MAMBA_ROOT_PREFIX%" mkdir "%MAMBA_ROOT_PREFIX%"

View File

@ -0,0 +1,44 @@
#!/bin/bash
# This file initializes micromamba and activates the env.
# A similar bootstrap file needs to exist for each platform (win, linux, macOS)
# Ready to hand-over to the platform-independent installer after this (written in python).
OS_NAME=$(uname -s)
case "${OS_NAME}" in
Linux*) OS_NAME="linux"
Darwin*) OS_NAME="mac"
*) echo "Unknown OS: $OS_NAME! This only runs on Linux or Mac" && exit
esac
OS_ARCH=$(uname -m)
case "${OS_ARCH}" in
x86_64*) OS_ARCH="x64"
arm64*) OS_ARCH="arm64"
*) echo "Unknown system architecture: $OS_ARCH! This only runs on x86_64 or arm64" && exit
esac
export MAMBA_ROOT_PREFIX=$SD_BASE_DIR/env/mamba
INSTALL_ENV_DIR=$SD_BASE_DIR/env/installer_env
INSTALLER_YAML_FILE=$SD_BASE_DIR/installer/yaml/installer-environment.yaml
MICROMAMBA_BINARY_FILE=$SD_BASE_DIR/installer/bin/micromamba_${OS_NAME}_${OS_ARCH}
# initialize the mamba dir
mkdir -p "$MAMBA_ROOT_PREFIX"
cp "$MICROMAMBA_BINARY_FILE" "$MAMBA_ROOT_PREFIX/micromamba"
# test the mamba binary
echo "Micromamba version:"
"$MAMBA_ROOT_PREFIX/micromamba" --version
# run the shell hook
eval "$($MAMBA_ROOT_PREFIX/micromamba shell hook -s posix)"
# create the installer env
if [ ! -e "$INSTALL_ENV_DIR" ]; then
micromamba create -y --prefix "$INSTALL_ENV_DIR" -f "$INSTALLER_YAML_FILE"
fi
# activate
micromamba activate "$INSTALL_ENV_DIR"

20
start.sh Normal file
View File

@ -0,0 +1,20 @@
#!/bin/bash
echo "Stable Diffusion UI - v2.5/n/n"
export START_CMD_FILENAME="start.sh"
export SD_BASE_DIR=$(pwd)
echo "Working in $SD_BASE_DIR"
# Setup the packages required for the installer
installer/bootstrap/bootstrap.sh
# Test the bootstrap
git --version
python --version
# Download the rest of the installer and UI
python installer/installer/main.py
read -p "Press any key to continue"