lollms-webui/scripts/linux/linux_run.sh

49 lines
1.7 KiB
Bash
Raw Normal View History

2023-07-12 15:02:35 +00:00
#!/bin/bash
echo Starting LOLLMS Web UI...
echo " ___ ___ ___ ___ ___ ___ "
echo " /\__\ /\ \ /\__\ /\__\ /\__\ /\ \ "
echo " /:/ / /::\ \ /:/ / /:/ / /::| | /::\ \ "
echo " /:/ / /:/\:\ \ /:/ / /:/ / /:|:| | /:/\ \ \ "
echo " /:/ / /:/ \:\ \ /:/ / /:/ / /:/|:|__|__ _\:\~\ \ \ "
echo " /:/__/ /:/__/ \:\__\ /:/__/ /:/__/ /:/ |::::\__\ /\ \:\ \ \__\ "
echo " \:\ \ \:\ \ /:/ / \:\ \ \:\ \ \/__/~~/:/ / \:\ \:\ \/__/ "
echo " \:\ \ \:\ /:/ / \:\ \ \:\ \ /:/ / \:\ \:\__\ "
echo " \:\ \ \:\/:/ / \:\ \ \:\ \ /:/ / \:\/:/ / "
echo " \:\__\ \::/ / \:\__\ \:\__\ /:/ / \::/ / "
echo " \/__/ \/__/ \/__/ \/__/ \/__/ \/__/ "
echo " By ParisNeo"
cd "$(dirname "$0")"
# better isolation for virtual environment
CONDA_SHLVL=""
PYTHONNOUSERSITE=1
PYTHONPATH=""
PYTHONHOME=""
2024-01-11 22:14:30 +00:00
miniconda_folder="./installer_files"
2023-07-12 15:02:35 +00:00
TMP="./installer_files/temp"
2024-01-11 22:14:30 +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-12 15:02:35 +00:00
fi
2024-01-11 22:14:30 +00:00
source "$MINICONDA_CMD" "$INSTALL_ENV_DIR"
2023-07-12 15:02:35 +00:00
cd lollms-webui
# set default cuda toolkit to the one in the environment
CUDA_PATH="$INSTALL_ENV_DIR"
python app.py "$@"
2023-07-21 13:38:45 +00:00
read -rp "Press Enter to exit..."