mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2025-01-05 12:04:08 +00:00
sync
This commit is contained in:
parent
87f9ccf974
commit
dd3ce176f1
152
scripts/windows/linux_install_use_your_own_conda.bat
Normal file
152
scripts/windows/linux_install_use_your_own_conda.bat
Normal file
@ -0,0 +1,152 @@
|
|||||||
|
@echo off
|
||||||
|
|
||||||
|
@rem This script will install miniconda and git with all dependencies for this project
|
||||||
|
@rem This enables a user to install this project without manually installing conda and git.
|
||||||
|
|
||||||
|
echo " ___ ___ ___ ___ ___ ___ "
|
||||||
|
echo " /\__\ /\ \ /\__\ /\__\ /\__\ /\ \ "
|
||||||
|
echo " /:/ / /::\ \ /:/ / /:/ / /::| | /::\ \ "
|
||||||
|
echo " /:/ / /:/\:\ \ /:/ / /:/ / /:|:| | /:/\ \ \ "
|
||||||
|
echo " /:/ / /:/ \:\ \ /:/ / /:/ / /:/|:|__|__ _\:\~\ \ \ "
|
||||||
|
echo " /:/__/ /:/__/ \:\__\ /:/__/ /:/__/ /:/ |::::\__\ /\ \:\ \ \__\ "
|
||||||
|
echo " \:\ \ \:\ \ /:/ / \:\ \ \:\ \ \/__/~~/:/ / \:\ \:\ \/__/ "
|
||||||
|
echo " \:\ \ \:\ /:/ / \:\ \ \:\ \ /:/ / \:\ \:\__\ "
|
||||||
|
echo " \:\ \ \:\/:/ / \:\ \ \:\ \ /:/ / \:\/:/ / "
|
||||||
|
echo " \:\__\ \::/ / \:\__\ \:\__\ /:/ / \::/ / "
|
||||||
|
echo " \/__/ \/__/ \/__/ \/__/ \/__/ \/__/ "
|
||||||
|
echo V9.5
|
||||||
|
echo -----------------
|
||||||
|
echo By ParisNeo
|
||||||
|
echo -----------------
|
||||||
|
|
||||||
|
@rem workaround for broken Windows installs
|
||||||
|
set PATH=%PATH%;%SystemRoot%\system32
|
||||||
|
|
||||||
|
cd /D "%~dp0"
|
||||||
|
|
||||||
|
echo "%cd%"| findstr /C:" " >nul && call :PrintBigMessage "This script relies on Miniconda which can not be silently installed under a path with spaces. Please put it in a path without spaces and try again" && goto failed
|
||||||
|
call :PrintBigMessage "WARNING: This script relies on Miniconda which will fail to install if the path is too long."
|
||||||
|
set "SPCHARMESSAGE="WARNING: Special characters were detected in the installation path!" " This can cause the installation to fail!""
|
||||||
|
echo "%CD%"| findstr /R /C:"[!#\$%&()\*+,;<=>?@\[\]\^`{|}~]" >nul && (
|
||||||
|
call :PrintBigMessage %SPCHARMESSAGE%
|
||||||
|
)
|
||||||
|
set SPCHARMESSAGE=
|
||||||
|
|
||||||
|
pause
|
||||||
|
cls
|
||||||
|
|
||||||
|
md
|
||||||
|
|
||||||
|
@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"
|
||||||
|
|
||||||
|
set MINICONDA_DIR=%cd%\installer_files\miniconda3
|
||||||
|
set INSTALL_ENV_DIR=%cd%\installer_files\lollms_env
|
||||||
|
set MINICONDA_DOWNLOAD_URL=https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe
|
||||||
|
set REPO_URL=https://github.com/ParisNeo/lollms-webui.git
|
||||||
|
|
||||||
|
set "PACKAGES_TO_INSTALL=python=3.11 git pip"
|
||||||
|
|
||||||
|
if not exist "%MINICONDA_DIR%\Scripts\conda.exe" (
|
||||||
|
@rem download miniconda
|
||||||
|
echo Downloading Miniconda installer from %MINICONDA_DOWNLOAD_URL%
|
||||||
|
call curl -LOk "%MINICONDA_DOWNLOAD_URL%"
|
||||||
|
|
||||||
|
@rem install miniconda
|
||||||
|
echo. && echo Installing Miniconda To "%MINICONDA_DIR%" && echo Please Wait... && echo.
|
||||||
|
start "" /W /D "%cd%" "Miniconda3-latest-Windows-x86_64.exe" /InstallationType=JustMe /NoShortcuts=1 /AddToPath=0 /RegisterPython=0 /NoRegistry=1 /S /D=%MINICONDA_DIR% || ( echo. && echo Miniconda installer not found. && goto failed )
|
||||||
|
del /q "Miniconda3-latest-Windows-x86_64.exe"
|
||||||
|
if not exist "%MINICONDA_DIR%\Scripts\activate.bat" ( echo. && echo Miniconda install failed. && goto end )
|
||||||
|
)
|
||||||
|
|
||||||
|
@rem activate miniconda
|
||||||
|
call "%MINICONDA_DIR%\Scripts\activate.bat" || ( echo Miniconda hook not found. && goto end )
|
||||||
|
|
||||||
|
|
||||||
|
@rem create the installer env
|
||||||
|
if not exist "%INSTALL_ENV_DIR%" (
|
||||||
|
echo Packages to install: %PACKAGES_TO_INSTALL%
|
||||||
|
call conda create --no-shortcuts -y -k -p "%INSTALL_ENV_DIR%" %CHANNEL% %PACKAGES_TO_INSTALL% || ( echo. && echo Conda environment creation failed. && goto end )
|
||||||
|
)
|
||||||
|
|
||||||
|
@rem check if conda environment was actually created
|
||||||
|
if not exist "%INSTALL_ENV_DIR%\python.exe" ( echo. && echo Conda environment is empty. && goto end )
|
||||||
|
|
||||||
|
@rem activate installer env
|
||||||
|
call conda activate "%INSTALL_ENV_DIR%" || ( echo. && echo Conda environment activation failed. && goto end )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@rem clone the repository
|
||||||
|
if exist lollms-webui\ (
|
||||||
|
cd lollms-webui
|
||||||
|
git pull
|
||||||
|
git submodule update --init --recursive
|
||||||
|
cd
|
||||||
|
cd lollms_core
|
||||||
|
pip install -e .
|
||||||
|
cd ..
|
||||||
|
cd utilities\safe_store
|
||||||
|
pip install -e .
|
||||||
|
cd ..\..
|
||||||
|
) else (
|
||||||
|
git clone --depth 1 --recurse-submodules https://github.com/ParisNeo/lollms-webui.git
|
||||||
|
git submodule update --init --recursive
|
||||||
|
cd lollms-webui\lollms_core
|
||||||
|
pip install -e .
|
||||||
|
cd ..
|
||||||
|
cd utilities\safe_store
|
||||||
|
pip install -e .
|
||||||
|
cd ..\..
|
||||||
|
)
|
||||||
|
|
||||||
|
pip install -r requirements.txt
|
||||||
|
|
||||||
|
@rem create launcher
|
||||||
|
if exist ..\win_run.bat (
|
||||||
|
echo Win run found
|
||||||
|
) else (
|
||||||
|
copy scripts\windows\win_run.bat ..\
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
if exist ..\win_conda_session.bat (
|
||||||
|
echo win conda session script found
|
||||||
|
) else (
|
||||||
|
copy scripts\windows\win_conda_session.bat ..\
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
setlocal enabledelayedexpansion
|
||||||
|
|
||||||
|
endlocal
|
||||||
|
|
||||||
|
goto end
|
||||||
|
|
||||||
|
:PrintBigMessage
|
||||||
|
echo. && echo.
|
||||||
|
echo *******************************************************************
|
||||||
|
for %%M in (%*) do echo * %%~M
|
||||||
|
echo *******************************************************************
|
||||||
|
echo. && echo.
|
||||||
|
exit /b
|
||||||
|
goto end
|
||||||
|
:failed
|
||||||
|
echo Install failed
|
||||||
|
goto endend
|
||||||
|
:end
|
||||||
|
|
||||||
|
echo Creating a bin dir (required for llamacpp binding)
|
||||||
|
md ../installer_files/lollms_env/bin
|
||||||
|
|
||||||
|
@rem cd scripts\python\lollms_installer
|
||||||
|
@rem call python main.py
|
||||||
|
@rem cd ..
|
||||||
|
echo Installation complete.
|
||||||
|
:endend
|
||||||
|
pause
|
@ -114,12 +114,6 @@ if exist ..\win_run.bat (
|
|||||||
copy scripts\windows\win_run.bat ..\
|
copy scripts\windows\win_run.bat ..\
|
||||||
)
|
)
|
||||||
|
|
||||||
if exist ..\win_update.bat (
|
|
||||||
echo Win update found
|
|
||||||
) else (
|
|
||||||
copy scripts\windows\win_update.bat ..\
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
if exist ..\win_conda_session.bat (
|
if exist ..\win_conda_session.bat (
|
||||||
echo win conda session script found
|
echo win conda session script found
|
||||||
@ -127,11 +121,6 @@ if exist ..\win_conda_session.bat (
|
|||||||
copy scripts\windows\win_conda_session.bat ..\
|
copy scripts\windows\win_conda_session.bat ..\
|
||||||
)
|
)
|
||||||
|
|
||||||
if exist ..\win_update_models.bat (
|
|
||||||
echo Win update models found
|
|
||||||
) else (
|
|
||||||
copy scripts\windows\win_update_models.bat ..\
|
|
||||||
)
|
|
||||||
|
|
||||||
setlocal enabledelayedexpansion
|
setlocal enabledelayedexpansion
|
||||||
|
|
||||||
|
@ -1,43 +0,0 @@
|
|||||||
@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
|
|
||||||
|
|
||||||
echo Pulling latest changes
|
|
||||||
call git pull
|
|
||||||
|
|
||||||
echo Reinstalling requirements
|
|
||||||
pip install --upgrade -r requirements.txt
|
|
||||||
|
|
||||||
:end
|
|
||||||
pause
|
|
@ -1,73 +0,0 @@
|
|||||||
@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%"
|
|
||||||
|
|
||||||
@echo off
|
|
||||||
setlocal
|
|
||||||
|
|
||||||
REM Set your repository URL and file path
|
|
||||||
set repository_url=https://github.com/ParisNeo/lollms_bindings_zoo.git
|
|
||||||
|
|
||||||
REM Set the destination folder where the file will be downloaded
|
|
||||||
set destination_folder=downloaded_files
|
|
||||||
|
|
||||||
REM Create the destination folder if it doesn't exist
|
|
||||||
if not exist "%destination_folder%" mkdir "%destination_folder%"
|
|
||||||
|
|
||||||
REM Clone the repository (if not already cloned)
|
|
||||||
if not exist "%destination_folder%\repository" (
|
|
||||||
git clone "%repository_url%" "%destination_folder%\repository"
|
|
||||||
)
|
|
||||||
|
|
||||||
REM Change directory to the repository folder
|
|
||||||
cd "%destination_folder%\repository"
|
|
||||||
|
|
||||||
REM Fetch the latest changes from the remote repository
|
|
||||||
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 removing temporary files
|
|
||||||
cd ../..
|
|
||||||
rmdir /s /q "%destination_folder%"
|
|
||||||
echo done
|
|
||||||
:end
|
|
||||||
pause
|
|
@ -1 +1 @@
|
|||||||
Subproject commit 63b3ce84c393d2523f9c4a07542fa28d49a7a2a3
|
Subproject commit ecd547e70fb3330f7458a678aef3ff25e5c92728
|
Loading…
Reference in New Issue
Block a user