lollms-webui/scripts/macos/macos_run.sh

49 lines
1.7 KiB
Bash
Raw Normal View History

2023-07-21 13:38:45 +00:00
#!/bin/bash
2024-04-04 22:53:23 +00:00
echo Starting LOLLMS Web UI...
2023-07-21 13:38:45 +00:00
echo " ___ ___ ___ ___ ___ ___ "
echo " /\__\ /\ \ /\__\ /\__\ /\__\ /\ \ "
echo " /:/ / /::\ \ /:/ / /:/ / /::| | /::\ \ "
echo " /:/ / /:/\:\ \ /:/ / /:/ / /:|:| | /:/\ \ \ "
echo " /:/ / /:/ \:\ \ /:/ / /:/ / /:/|:|__|__ _\:\~\ \ \ "
echo " /:/__/ /:/__/ \:\__\ /:/__/ /:/__/ /:/ |::::\__\ /\ \:\ \ \__\ "
echo " \:\ \ \:\ \ /:/ / \:\ \ \:\ \ \/__/~~/:/ / \:\ \:\ \/__/ "
echo " \:\ \ \:\ /:/ / \:\ \ \:\ \ /:/ / \:\ \:\__\ "
echo " \:\ \ \:\/:/ / \:\ \ \:\ \ /:/ / \:\/:/ / "
echo " \:\__\ \::/ / \:\__\ \:\__\ /:/ / \::/ / "
echo " \/__/ \/__/ \/__/ \/__/ \/__/ \/__/ "
echo " By ParisNeo"
2024-04-04 22:53:23 +00:00
2023-07-21 13:38:45 +00:00
cd "$(dirname "$0")"
2024-04-04 22:53:23 +00:00
# better isolation for virtual environment
2023-07-21 13:38:45 +00:00
CONDA_SHLVL=""
PYTHONNOUSERSITE=1
PYTHONPATH=""
PYTHONHOME=""
2024-04-04 22:53:23 +00:00
miniconda_folder="./installer_files"
2023-07-21 13:38:45 +00:00
TMP="./installer_files/temp"
2024-04-04 22:53:23 +00:00
if [ -e "$miniconda_folder" ]; then
INSTALL_ENV_DIR="./installer_files/lollms_env"
MINICONDA_DIR="./installer_files/miniconda3"
MINICONDA_CMD="$MINICONDA_DIR/bin/activate"
if [ ! -f "$MINICONDA_DIR/bin/activate" ]; then
echo "Miniconda not found."
exit 1
fi
else
INSTALL_ENV_DIR="lollms"
MINICONDA_CMD="conda activate"
2023-07-21 13:38:45 +00:00
fi
2024-04-04 22:53:23 +00:00
source "$MINICONDA_CMD" "$INSTALL_ENV_DIR"
2023-07-21 13:38:45 +00:00
cd lollms-webui
2024-04-04 22:53:23 +00:00
# set default cuda toolkit to the one in the environment
2023-07-21 13:38:45 +00:00
CUDA_PATH="$INSTALL_ENV_DIR"
python app.py "$@"
read -rp "Press Enter to exit..."