upgraded environments

This commit is contained in:
Saifeddine ALOUI
2024-01-11 23:14:30 +01:00
parent 674afc9593
commit 3540a83145
13 changed files with 66 additions and 139 deletions

View File

@ -21,17 +21,23 @@ CONDA_SHLVL=""
PYTHONNOUSERSITE=1
PYTHONPATH=""
PYTHONHOME=""
TEMP="./installer_files/temp"
miniconda_folder="./installer_files"
TMP="./installer_files/temp"
INSTALL_ENV_DIR="./installer_files/lollms_env"
MINICONDA_DIR="./installer_files/miniconda3"
if [ ! -f "$MINICONDA_DIR/bin/activate" ]; then
echo "Miniconda not found."
exit 1
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_DIR/bin/activate" "$INSTALL_ENV_DIR"
source "$MINICONDA_CMD" "$INSTALL_ENV_DIR"
read -rp "Conda environment activated"

View File

@ -134,11 +134,6 @@ else
cp scripts/linux/linux_run.sh ../
fi
if [[ -e "../linux_update.sh" ]]; then
echo "Linux update found"
else
cp scripts/linux/linux_update.sh ../
fi
if [[ -e "../linux_conda_session.sh" ]]; then
echo "Linux update found"
@ -146,12 +141,6 @@ else
cp scripts/linux/linux_conda_session.sh ../
fi
if [[ -e "../linux_update_models.sh" ]]; then
echo "Linux update found"
else
cp scripts/linux/linux_update_models.sh ../
fi
# cd scripts/python/lollms_installer
# python main.py

View File

@ -67,8 +67,6 @@ else
cd utilities/safe_store
pip install -e .
cd ../..
cd lollms-webui || exit 1
fi
# Loop through each "git+" requirement and uninstall it (workaround for inconsistent git package updating)
@ -82,6 +80,21 @@ done < requirements.txt
# Install the pip requirements
python -m pip install -r requirements.txt --upgrade
if [[ -e "../linux_run.sh" ]]; then
echo "Linux run found"
else
pwd
cp scripts/linux/linux_run.sh ../
fi
if [[ -e "../linux_conda_session.sh" ]]; then
echo "Linux update found"
else
pwd
cp scripts/linux/linux_conda_session.sh ../
fi
# cd scripts/python/lollms_installer
# python main.py

View File

@ -21,17 +21,23 @@ CONDA_SHLVL=""
PYTHONNOUSERSITE=1
PYTHONPATH=""
PYTHONHOME=""
TEMP="./installer_files/temp"
miniconda_folder="./installer_files"
TMP="./installer_files/temp"
INSTALL_ENV_DIR="./installer_files/lollms_env"
MINICONDA_DIR="./installer_files/miniconda3"
if [ ! -f "$MINICONDA_DIR/bin/activate" ]; then
echo "Miniconda not found."
exit 1
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_DIR/bin/activate" "$INSTALL_ENV_DIR"
source "$MINICONDA_CMD" "$INSTALL_ENV_DIR"
cd lollms-webui
# set default cuda toolkit to the one in the environment

View File

@ -1,43 +0,0 @@
#!/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"
INSTALL_ENV_DIR="./installer_files/lollms_env"
MINICONDA_DIR="./installer_files/miniconda3"
if [ ! -f "$MINICONDA_DIR/bin/activate" ]; then
echo "Miniconda not found."
exit 1
fi
source "$MINICONDA_DIR/bin/activate" "$INSTALL_ENV_DIR"
cd lollms-webui
echo Pulling latest changes
git pull
echo Reinstalling requirements
pip install --upgrade -r requirements.txt
pause

View File

@ -1,63 +0,0 @@
#!/bin/bash
echo Starting LOLLMS Web UI...
echo " ___ ___ ___ ___ ___ ___ "
echo " /\__\ /\ \ /\__\ /\__\ /\__\ /\ \ "
echo " /:/ / /::\ \ /:/ / /:/ / /::| | /::\ \ "
echo " /:/ / /:/\:\ \ /:/ / /:/ / /:|:| | /:/\ \ \ "
echo " /:/ / /:/ \:\ \ /:/ / /:/ / /:/|:|__|__ _\:\~\ \ \ "
echo " /:/__/ /:/__/ \:\__\ /:/__/ /:/__/ /:/ |::::\__\ /\ \:\ \ \__\ "
echo " \:\ \ \:\ \ /:/ / \:\ \ \:\ \ \/__/~~/:/ / \:\ \:\ \/__/ "
echo " \:\ \ \:\ /:/ / \:\ \ \:\ \ /:/ / \:\ \:\__\ "
echo " \:\ \ \:\/:/ / \:\ \ \:\ \ /:/ / \:\/:/ / "
echo " \:\__\ \::/ / \:\__\ \:\__\ /:/ / \::/ / "
echo " \/__/ \/__/ \/__/ \/__/ \/__/ \/__/ "
echo " By ParisNeo"
echo " Models list update script"
cd "$(dirname "$0")"
# better isolation for virtual environment
CONDA_SHLVL=""
PYTHONNOUSERSITE=1
PYTHONPATH=""
PYTHONHOME=""
TEMP="./installer_files/temp"
TMP="./installer_files/temp"
INSTALL_ENV_DIR="./installer_files/lollms_env"
MINICONDA_DIR="./installer_files/miniconda3"
if [ ! -f "$MINICONDA_DIR/bin/activate" ]; then
echo "Miniconda not found."
exit 1
fi
source "$MINICONDA_DIR/bin/activate" "$INSTALL_ENV_DIR"
# Set your repository URL and file path
repository_url="https://github.com/ParisNeo/lollms_bindings_zoo.git"
# Set the destination folder where the file will be downloaded
destination_folder="downloaded_files"
# Create the destination folder if it doesn't exist
if [ ! -d "$destination_folder" ]; then
mkdir "$destination_folder"
fi
# Clone the repository (if not already cloned)
if [ ! -d "$destination_folder/repository" ]; then
git clone "$repository_url" "$destination_folder/repository"
fi
cd "$destination_folder/repository"
echo "Updating models"
cp hugging_face/models.yaml ../../personal_data/bindings_zoo/hugging_face/models.yaml
cp c_transformers/models.yaml ../../personal_data/bindings_zoo/c_transformers/models.yaml
cp llama_cpp_official/models.yaml ../../personal_data/bindings_zoo/llama_cpp_official/models.yaml
cp gpt_4all/models.yaml ../../personal_data/bindings_zoo/gpt_4all/models.yaml
cp py_llama_cpp/models.yaml ../../personal_data/bindings_zoo/py_llama_cpp/models.yaml
cp gptq/models.yaml ../../personal_data/bindings_zoo/gptq/models.yaml
cp exllama/models.yaml ../../personal_data/bindings_zoo/exllama/models.yaml
echo "Updating models"

View File

@ -4,8 +4,8 @@ echo "This will uninstall the environment. Are you sure? [Y/N]"
read choice
if [[ "$choice" =~ [yY] ]]; then
# Download Python installer
printf "Removing virtual environment..."
rm -rf env
printf "Removing lollms conda environment"
echo "OK"
read -p "Press [Enter] to continue..."
else