mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2025-12-06 07:12:10 +01:00
Rename miniconda -> miniforge everywhere
This commit is contained in:
parent
ab162f976c
commit
13373391df
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")"
|
||||
|
||||
if [[ "$(pwd)" =~ " " ]]; then echo This script relies on Miniconda which can not be silently installed under a path with spaces. && exit; fi
|
||||
if [[ "$(pwd)" =~ " " ]]; then echo This script relies on Miniforge which can not be silently installed under a path with spaces. && exit; fi
|
||||
|
||||
# deactivate existing conda envs as needed to avoid conflicts
|
||||
{ conda deactivate && conda deactivate && conda deactivate; } 2> /dev/null
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")"
|
||||
|
||||
if [[ "$(pwd)" =~ " " ]]; then echo This script relies on Miniconda which can not be silently installed under a path with spaces. && exit; fi
|
||||
if [[ "$(pwd)" =~ " " ]]; then echo This script relies on Miniforge which can not be silently installed under a path with spaces. && exit; fi
|
||||
|
||||
# deactivate existing conda envs as needed to avoid conflicts
|
||||
{ conda deactivate && conda deactivate && conda deactivate; } 2> /dev/null
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ cd /D "%~dp0"
|
|||
|
||||
set PATH=%PATH%;%SystemRoot%\system32
|
||||
|
||||
echo "%CD%"| findstr /C:" " >nul && echo This script relies on Miniconda which can not be silently installed under a path with spaces. && goto end
|
||||
echo "%CD%"| findstr /C:" " >nul && echo This script relies on Miniforge which can not be silently installed under a path with spaces. && goto end
|
||||
|
||||
@rem fix failed install when installing to a separate drive
|
||||
set TMP=%cd%\installer_files
|
||||
|
|
@ -25,7 +25,7 @@ set "CUDA_PATH=%INSTALL_ENV_DIR%"
|
|||
set "CUDA_HOME=%CUDA_PATH%"
|
||||
|
||||
@rem activate installer env
|
||||
call "%CONDA_ROOT_PREFIX%\condabin\conda.bat" activate "%INSTALL_ENV_DIR%" || ( echo. && echo Miniconda hook not found. && goto end )
|
||||
call "%CONDA_ROOT_PREFIX%\condabin\conda.bat" activate "%INSTALL_ENV_DIR%" || ( echo. && echo Miniforge hook not found. && goto end )
|
||||
|
||||
@rem enter commands
|
||||
cmd /k "%*"
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ if [ -d "portable_env" ]; then
|
|||
exit $?
|
||||
fi
|
||||
|
||||
if [[ "$(pwd)" =~ " " ]]; then echo This script relies on Miniconda which can not be silently installed under a path with spaces. && exit; fi
|
||||
if [[ "$(pwd)" =~ " " ]]; then echo This script relies on Miniforge which can not be silently installed under a path with spaces. && exit; fi
|
||||
|
||||
# deactivate existing conda envs as needed to avoid conflicts
|
||||
{ conda deactivate && conda deactivate && conda deactivate; } 2> /dev/null
|
||||
|
|
@ -30,29 +30,29 @@ esac
|
|||
INSTALL_DIR="$(pwd)/installer_files"
|
||||
CONDA_ROOT_PREFIX="$(pwd)/installer_files/conda"
|
||||
INSTALL_ENV_DIR="$(pwd)/installer_files/env"
|
||||
MINICONDA_DOWNLOAD_URL="https://github.com/conda-forge/miniforge/releases/download/25.3.0-3/Miniforge3-25.3.0-3-Linux-${OS_ARCH}.sh"
|
||||
MINIFORGE_DOWNLOAD_URL="https://github.com/conda-forge/miniforge/releases/download/25.3.0-3/Miniforge3-25.3.0-3-Linux-${OS_ARCH}.sh"
|
||||
conda_exists="F"
|
||||
|
||||
# figure out whether git and conda needs to be installed
|
||||
if "$CONDA_ROOT_PREFIX/bin/conda" --version &>/dev/null; then conda_exists="T"; fi
|
||||
|
||||
# (if necessary) install git and conda into a contained environment
|
||||
# download miniconda
|
||||
# download miniforge
|
||||
if [ "$conda_exists" == "F" ]; then
|
||||
echo "Downloading Miniconda from $MINICONDA_DOWNLOAD_URL to $INSTALL_DIR/miniconda_installer.sh"
|
||||
echo "Downloading Miniforge from $MINIFORGE_DOWNLOAD_URL to $INSTALL_DIR/miniforge_installer.sh"
|
||||
|
||||
mkdir -p "$INSTALL_DIR"
|
||||
curl -L "$MINICONDA_DOWNLOAD_URL" > "$INSTALL_DIR/miniconda_installer.sh"
|
||||
curl -L "$MINIFORGE_DOWNLOAD_URL" > "$INSTALL_DIR/miniforge_installer.sh"
|
||||
|
||||
chmod u+x "$INSTALL_DIR/miniconda_installer.sh"
|
||||
bash "$INSTALL_DIR/miniconda_installer.sh" -b -p $CONDA_ROOT_PREFIX
|
||||
chmod u+x "$INSTALL_DIR/miniforge_installer.sh"
|
||||
bash "$INSTALL_DIR/miniforge_installer.sh" -b -p $CONDA_ROOT_PREFIX
|
||||
|
||||
# test the conda binary
|
||||
echo "Miniconda version:"
|
||||
echo "Miniforge version:"
|
||||
"$CONDA_ROOT_PREFIX/bin/conda" --version
|
||||
|
||||
# delete the Miniconda installer
|
||||
rm "$INSTALL_DIR/miniconda_installer.sh"
|
||||
# delete the Miniforge installer
|
||||
rm "$INSTALL_DIR/miniforge_installer.sh"
|
||||
fi
|
||||
|
||||
# create the installer env
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ if [ -d "portable_env" ]; then
|
|||
exit $?
|
||||
fi
|
||||
|
||||
if [[ "$(pwd)" =~ " " ]]; then echo This script relies on Miniconda which can not be silently installed under a path with spaces. && exit; fi
|
||||
if [[ "$(pwd)" =~ " " ]]; then echo This script relies on Miniforge which can not be silently installed under a path with spaces. && exit; fi
|
||||
|
||||
# deactivate existing conda envs as needed to avoid conflicts
|
||||
{ conda deactivate && conda deactivate && conda deactivate; } 2> /dev/null
|
||||
|
|
@ -30,29 +30,29 @@ esac
|
|||
INSTALL_DIR="$(pwd)/installer_files"
|
||||
CONDA_ROOT_PREFIX="$(pwd)/installer_files/conda"
|
||||
INSTALL_ENV_DIR="$(pwd)/installer_files/env"
|
||||
MINICONDA_DOWNLOAD_URL="https://github.com/conda-forge/miniforge/releases/download/25.3.0-3/Miniforge3-25.3.0-3-MacOSX-${OS_ARCH}.sh"
|
||||
MINIFORGE_DOWNLOAD_URL="https://github.com/conda-forge/miniforge/releases/download/25.3.0-3/Miniforge3-25.3.0-3-MacOSX-${OS_ARCH}.sh"
|
||||
conda_exists="F"
|
||||
|
||||
# figure out whether git and conda needs to be installed
|
||||
if "$CONDA_ROOT_PREFIX/bin/conda" --version &>/dev/null; then conda_exists="T"; fi
|
||||
|
||||
# (if necessary) install git and conda into a contained environment
|
||||
# download miniconda
|
||||
# download miniforge
|
||||
if [ "$conda_exists" == "F" ]; then
|
||||
echo "Downloading Miniconda from $MINICONDA_DOWNLOAD_URL to $INSTALL_DIR/miniconda_installer.sh"
|
||||
echo "Downloading Miniforge from $MINIFORGE_DOWNLOAD_URL to $INSTALL_DIR/miniforge_installer.sh"
|
||||
|
||||
mkdir -p "$INSTALL_DIR"
|
||||
curl -L "$MINICONDA_DOWNLOAD_URL" > "$INSTALL_DIR/miniconda_installer.sh"
|
||||
curl -L "$MINIFORGE_DOWNLOAD_URL" > "$INSTALL_DIR/miniforge_installer.sh"
|
||||
|
||||
chmod u+x "$INSTALL_DIR/miniconda_installer.sh"
|
||||
bash "$INSTALL_DIR/miniconda_installer.sh" -b -p $CONDA_ROOT_PREFIX
|
||||
chmod u+x "$INSTALL_DIR/miniforge_installer.sh"
|
||||
bash "$INSTALL_DIR/miniforge_installer.sh" -b -p $CONDA_ROOT_PREFIX
|
||||
|
||||
# test the conda binary
|
||||
echo "Miniconda version:"
|
||||
echo "Miniforge version:"
|
||||
"$CONDA_ROOT_PREFIX/bin/conda" --version
|
||||
|
||||
# delete the Miniconda installer
|
||||
rm "$INSTALL_DIR/miniconda_installer.sh"
|
||||
# delete the Miniforge installer
|
||||
rm "$INSTALL_DIR/miniforge_installer.sh"
|
||||
fi
|
||||
|
||||
# create the installer env
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ if exist "portable_env" (
|
|||
|
||||
set PATH=%PATH%;%SystemRoot%\system32
|
||||
|
||||
echo "%CD%"| findstr /C:" " >nul && echo This script relies on Miniconda which can not be silently installed under a path with spaces. && goto end
|
||||
echo "%CD%"| findstr /C:" " >nul && echo This script relies on Miniforge which can not be silently installed under a path with spaces. && goto end
|
||||
|
||||
@rem Check for special characters in installation path
|
||||
set "SPCHARMESSAGE="WARNING: Special characters were detected in the installation path!" " This can cause the installation to fail!""
|
||||
|
|
@ -36,8 +36,8 @@ set TEMP=%cd%\installer_files
|
|||
set INSTALL_DIR=%cd%\installer_files
|
||||
set CONDA_ROOT_PREFIX=%cd%\installer_files\conda
|
||||
set INSTALL_ENV_DIR=%cd%\installer_files\env
|
||||
set MINICONDA_DOWNLOAD_URL=https://github.com/conda-forge/miniforge/releases/download/25.3.0-3/Miniforge3-25.3.0-3-Windows-x86_64.exe
|
||||
set MINICONDA_CHECKSUM=b48cd98430170983076dfb51769a6d37668176f59bf3b59c4b21ac4c9bc24f39
|
||||
set MINIFORGE_DOWNLOAD_URL=https://github.com/conda-forge/miniforge/releases/download/25.3.0-3/Miniforge3-25.3.0-3-Windows-x86_64.exe
|
||||
set MINIFORGE_CHECKSUM=b48cd98430170983076dfb51769a6d37668176f59bf3b59c4b21ac4c9bc24f39
|
||||
set conda_exists=F
|
||||
|
||||
@rem figure out whether git and conda needs to be installed
|
||||
|
|
@ -47,40 +47,40 @@ if "%ERRORLEVEL%" EQU "0" set conda_exists=T
|
|||
@rem (if necessary) install git and conda into a contained environment
|
||||
@rem download conda
|
||||
if "%conda_exists%" == "F" (
|
||||
echo Downloading Miniconda from %MINICONDA_DOWNLOAD_URL% to %INSTALL_DIR%\miniconda_installer.exe
|
||||
echo Downloading Miniforge from %MINIFORGE_DOWNLOAD_URL% to %INSTALL_DIR%\miniforge_installer.exe
|
||||
|
||||
mkdir "%INSTALL_DIR%"
|
||||
call curl -Lk "%MINICONDA_DOWNLOAD_URL%" > "%INSTALL_DIR%\miniconda_installer.exe" || ( echo. && echo Miniconda failed to download. && goto end )
|
||||
call curl -Lk "%MINIFORGE_DOWNLOAD_URL%" > "%INSTALL_DIR%\miniforge_installer.exe" || ( echo. && echo Miniforge failed to download. && goto end )
|
||||
|
||||
@rem Try CertUtil first
|
||||
for /f %%a in ('CertUtil -hashfile "%INSTALL_DIR%\miniconda_installer.exe" SHA256 ^| find /i /v " " ^| find /i "%MINICONDA_CHECKSUM%"') do (
|
||||
for /f %%a in ('CertUtil -hashfile "%INSTALL_DIR%\miniforge_installer.exe" SHA256 ^| find /i /v " " ^| find /i "%MINIFORGE_CHECKSUM%"') do (
|
||||
set "output=%%a"
|
||||
)
|
||||
|
||||
@rem If CertUtil fails, try PowerShell
|
||||
if not defined output (
|
||||
for /f %%a in ('powershell -Command "if((Get-FileHash \"%INSTALL_DIR%\miniconda_installer.exe\" -Algorithm SHA256).Hash -eq ''%MINICONDA_CHECKSUM%''){echo true}"') do (
|
||||
for /f %%a in ('powershell -Command "if((Get-FileHash \"%INSTALL_DIR%\miniforge_installer.exe\" -Algorithm SHA256).Hash -eq ''%MINIFORGE_CHECKSUM%''){echo true}"') do (
|
||||
set "output=%%a"
|
||||
)
|
||||
)
|
||||
|
||||
if not defined output (
|
||||
echo The checksum verification for miniconda_installer.exe has failed.
|
||||
del "%INSTALL_DIR%\miniconda_installer.exe"
|
||||
echo The checksum verification for miniforge_installer.exe has failed.
|
||||
del "%INSTALL_DIR%\miniforge_installer.exe"
|
||||
goto end
|
||||
) else (
|
||||
echo The checksum verification for miniconda_installer.exe has passed successfully.
|
||||
echo The checksum verification for miniforge_installer.exe has passed successfully.
|
||||
)
|
||||
|
||||
echo Installing Miniconda to %CONDA_ROOT_PREFIX%
|
||||
start /wait "" "%INSTALL_DIR%\miniconda_installer.exe" /InstallationType=JustMe /NoShortcuts=1 /AddToPath=0 /RegisterPython=0 /NoRegistry=1 /S /D=%CONDA_ROOT_PREFIX%
|
||||
echo Installing Miniforge to %CONDA_ROOT_PREFIX%
|
||||
start /wait "" "%INSTALL_DIR%\miniforge_installer.exe" /InstallationType=JustMe /NoShortcuts=1 /AddToPath=0 /RegisterPython=0 /NoRegistry=1 /S /D=%CONDA_ROOT_PREFIX%
|
||||
|
||||
@rem test the conda binary
|
||||
echo Miniconda version:
|
||||
call "%CONDA_ROOT_PREFIX%\_conda.exe" --version || ( echo. && echo Miniconda not found. && goto end )
|
||||
echo Miniforge version:
|
||||
call "%CONDA_ROOT_PREFIX%\_conda.exe" --version || ( echo. && echo Miniforge not found. && goto end )
|
||||
|
||||
@rem delete the Miniconda installer
|
||||
del "%INSTALL_DIR%\miniconda_installer.exe"
|
||||
@rem delete the Miniforge installer
|
||||
del "%INSTALL_DIR%\miniforge_installer.exe"
|
||||
)
|
||||
|
||||
@rem create the installer env
|
||||
|
|
@ -96,7 +96,7 @@ set "CUDA_PATH=%INSTALL_ENV_DIR%"
|
|||
set "CUDA_HOME=%CUDA_PATH%"
|
||||
|
||||
@rem activate installer env
|
||||
call "%CONDA_ROOT_PREFIX%\condabin\conda.bat" activate "%INSTALL_ENV_DIR%" || ( echo. && echo Miniconda hook not found. && goto end )
|
||||
call "%CONDA_ROOT_PREFIX%\condabin\conda.bat" activate "%INSTALL_ENV_DIR%" || ( echo. && echo Miniforge hook not found. && goto end )
|
||||
|
||||
@rem setup installer env
|
||||
call python one_click.py %*
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")"
|
||||
|
||||
if [[ "$(pwd)" =~ " " ]]; then echo This script relies on Miniconda which can not be silently installed under a path with spaces. && exit; fi
|
||||
if [[ "$(pwd)" =~ " " ]]; then echo This script relies on Miniforge which can not be silently installed under a path with spaces. && exit; fi
|
||||
|
||||
# deactivate existing conda envs as needed to avoid conflicts
|
||||
{ conda deactivate && conda deactivate && conda deactivate; } 2> /dev/null
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")"
|
||||
|
||||
if [[ "$(pwd)" =~ " " ]]; then echo This script relies on Miniconda which can not be silently installed under a path with spaces. && exit; fi
|
||||
if [[ "$(pwd)" =~ " " ]]; then echo This script relies on Miniforge which can not be silently installed under a path with spaces. && exit; fi
|
||||
|
||||
# deactivate existing conda envs as needed to avoid conflicts
|
||||
{ conda deactivate && conda deactivate && conda deactivate; } 2> /dev/null
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ cd /D "%~dp0"
|
|||
|
||||
set PATH=%PATH%;%SystemRoot%\system32
|
||||
|
||||
echo "%CD%"| findstr /C:" " >nul && echo This script relies on Miniconda which can not be silently installed under a path with spaces. && goto end
|
||||
echo "%CD%"| findstr /C:" " >nul && echo This script relies on Miniforge which can not be silently installed under a path with spaces. && goto end
|
||||
|
||||
@rem fix failed install when installing to a separate drive
|
||||
set TMP=%cd%\installer_files
|
||||
|
|
@ -25,7 +25,7 @@ set "CUDA_PATH=%INSTALL_ENV_DIR%"
|
|||
set "CUDA_HOME=%CUDA_PATH%"
|
||||
|
||||
@rem activate installer env
|
||||
call "%CONDA_ROOT_PREFIX%\condabin\conda.bat" activate "%INSTALL_ENV_DIR%" || ( echo. && echo Miniconda hook not found. && goto end )
|
||||
call "%CONDA_ROOT_PREFIX%\condabin\conda.bat" activate "%INSTALL_ENV_DIR%" || ( echo. && echo Miniforge hook not found. && goto end )
|
||||
|
||||
@rem update installer env
|
||||
call python one_click.py --update-wizard && (
|
||||
|
|
|
|||
Loading…
Reference in a new issue