diff --git a/scripts/linux/install_conda_lib.sh b/scripts/linux/install_conda_lib.sh new file mode 100644 index 00000000..725ad3c1 --- /dev/null +++ b/scripts/linux/install_conda_lib.sh @@ -0,0 +1,42 @@ +#!/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="" +miniconda_folder="./installer_files" +TMP="./installer_files/temp" + +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" +fi + +source "$MINICONDA_CMD" "$INSTALL_ENV_DIR" + +conda install conda diff --git a/scripts/linux/linux_install.sh b/scripts/linux/linux_install.sh index 3d19c979..cbf3380c 100644 --- a/scripts/linux/linux_install.sh +++ b/scripts/linux/linux_install.sh @@ -89,6 +89,9 @@ fi # Activate installer environment source activate "$INSTALL_ENV_DIR" || ( echo && echo "Conda environment activation failed." && exit 1 ) +# install conda +conda install conda -y + # Set default cuda toolkit to the one in the environment export CUDA_PATH="$INSTALL_ENV_DIR" diff --git a/scripts/macos/install_conda_lib.sh b/scripts/macos/install_conda_lib.sh new file mode 100644 index 00000000..93c05f66 --- /dev/null +++ b/scripts/macos/install_conda_lib.sh @@ -0,0 +1,41 @@ +#!/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="" +TEMP="./installer_files/temp" +TMP="./installer_files/temp" +ENV_NAME="lollms" +INSTALL_ENV_DIR="./installer_files/miniconda3/envs/lollms" +MINICONDA_DIR="./installer_files/miniconda3" + +if [ ! -f "$MINICONDA_DIR/bin/activate" ]; then + echo "Miniconda not found." + exit 1 +fi + +source "$MINICONDA_DIR/bin/activate" "$ENV_NAME" +cd lollms-webui + +# Set default CUDA toolkit to the one in the environment +CUDA_PATH="$INSTALL_ENV_DIR" + + +read -rp "Conda environment activated" diff --git a/scripts/macos/macos_install.sh b/scripts/macos/macos_install.sh index f56b56f1..5c0d6ffa 100644 --- a/scripts/macos/macos_install.sh +++ b/scripts/macos/macos_install.sh @@ -106,6 +106,9 @@ fi # Activate installer environment source activate "$ENV_NAME" || ( echo && echo "Conda environment activation failed." && exit 1 ) +# install conda +conda install conda -y + echo "$ENV_NAME Activated" # Set default CUDA toolkit to the one in the environment export CUDA_PATH="$INSTALL_ENV_DIR" diff --git a/scripts/windows/install_conda_lib.bat b/scripts/windows/install_conda_lib.bat new file mode 100644 index 00000000..ec9ee8f1 --- /dev/null +++ b/scripts/windows/install_conda_lib.bat @@ -0,0 +1,42 @@ +@echo off +@echo Starting LOLLMS Web UI... +echo " ___ ___ ___ ___ ___ ___ " +echo " /\__\ /\ \ /\__\ /\__\ /\__\ /\ \ " +echo " /:/ / /::\ \ /:/ / /:/ / /::| | /::\ \ " +echo " /:/ / /:/\:\ \ /:/ / /:/ / /:|:| | /:/\ \ \ " +echo " /:/ / /:/ \:\ \ /:/ / /:/ / /:/|:|__|__ _\:\~\ \ \ " +echo "/:/__/ /:/__/ \:\__\ /:/__/ /:/__/ /:/ |::::\__\ /\ \:\ \ \__\ " +echo "\:\ \ \:\ \ /:/ / \:\ \ \:\ \ \/__/~~/:/ / \:\ \:\ \/__/ " +echo " \:\ \ \:\ /:/ / \:\ \ \:\ \ /:/ / \:\ \:\__\ " +echo " \:\ \ \:\/:/ / \:\ \ \:\ \ /:/ / \:\/:/ / " +echo " \:\__\ \::/ / \:\__\ \:\__\ /:/ / \::/ / " +echo " \/__/ \/__/ \/__/ \/__/ \/__/ \/__/ " +echo By ParisNeo + +cd /D "%~dp0" + +@rem better isolation for virtual environment +SET "CONDA_SHLVL=" +SET PYTHONNOUSERSITE=1 +SET "PYTHONPATH=" +SET "PYTHONHOME=" +SET "TEMP=%cd%\installer_files\temp" +SET "TMP=%cd%\installer_files\temp" + +@rem workaround for broken Windows installs +set PATH=%PATH%;%SystemRoot%\system32 + +set INSTALL_ENV_DIR=%cd%\installer_files\lollms_env +set MINICONDA_DIR=%cd%\installer_files\miniconda3 + +if not exist "%MINICONDA_DIR%\Scripts\activate.bat" ( echo Miniconda not found. Please reinstall lollms using win_install.bat. && goto end ) +call "%MINICONDA_DIR%\Scripts\activate.bat" activate "%INSTALL_ENV_DIR%" +cd lollms-webui + +@rem set default cuda toolkit to the one in the environment +set "CUDA_PATH=%INSTALL_ENV_DIR%" + +call conda install conda + +:end +pause diff --git a/scripts/windows/win_install.bat b/scripts/windows/win_install.bat index 70c9b4df..39141cad 100644 --- a/scripts/windows/win_install.bat +++ b/scripts/windows/win_install.bat @@ -80,6 +80,8 @@ if not exist "%INSTALL_ENV_DIR%\python.exe" ( echo. && echo Conda environment is @rem activate installer env call conda activate "%INSTALL_ENV_DIR%" || ( echo. && echo Conda environment activation failed. && goto end ) +@rem install conda library +call conda install conda -y @rem clone the repository diff --git a/update_script.py b/update_script.py index 88f86d4e..3cc991ba 100644 --- a/update_script.py +++ b/update_script.py @@ -10,6 +10,7 @@ from ascii_colors import ASCIIColors, trace_exception def run_git_pull(): try: print("----------------> Updating the code <-----------------------") + repo = git.Repo(Path(__file__).parent) origin = repo.remotes.origin origin.pull() diff --git a/zoos/bindings_zoo b/zoos/bindings_zoo index 1ad100b6..0145db7f 160000 --- a/zoos/bindings_zoo +++ b/zoos/bindings_zoo @@ -1 +1 @@ -Subproject commit 1ad100b60f39e05b406ac57d9ae35bd2fdfde12b +Subproject commit 0145db7f4f43c1fb768f934ca60de36d8377f0b8