Skip to content

Commit

Permalink
upgraded
Browse files Browse the repository at this point in the history
  • Loading branch information
ParisNeo committed Jan 4, 2024
1 parent ac7afbb commit c3e25e3
Showing 1 changed file with 16 additions and 52 deletions.
68 changes: 16 additions & 52 deletions scripts/wsl/install_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ echo " \:\ \ \:\ /:/ / \:\ \ \:\ \ /:/ / \:\ \:\__\ "
echo " \:\ \ \:\/:/ / \:\ \ \:\ \ /:/ / \:\/:/ / "
echo " \:\__\ \::/ / \:\__\ \:\__\ /:/ / \::/ / "
echo " \/__/ \/__/ \/__/ \/__/ \/__/ \/__/ "
echo " By ParisNeo"
echo "V8.5 (alpha)"
echo "-----------------"
echo "By ParisNeo"
echo "-----------------"

# Update and upgrade packages
sudo apt update
Expand Down Expand Up @@ -38,72 +41,33 @@ git clone https://github.com/ParisNeo/lollms-webui.git ~/lollms-webui
cd ~/lollms-webui

# Create and activate conda environment
conda create --prefix ./env python=3.10 pip -y
conda create --prefix ./env python=3.11 git pip -y
conda activate ./env



# Prompt the user for CPU or GPU installation
read -p "Do you want to use your CPU or GPU for installation? (CPU/GPU): " choice

if [[ "$choice" == "GPU" ]]; then
# Install CUDA (only if not already installed)
if ! dpkg -l | grep cuda; then
echo "Installing CUDA..."
# install cuda
wget https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64/cuda-wsl-ubuntu.pin
sudo mv cuda-wsl-ubuntu.pin /etc/apt/preferences.d/cuda-repository-pin-600
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64/3bf863cc.pub
sudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64/ /"
sudo apt-get update
sudo apt-get -y install cuda
# Add cuda to the path
export PATH=/usr/local/cuda/bin:$PATH
#make it permanant
echo 'export PATH=/usr/local/cuda/bin:$PATH' >> ~/.bashrc
export LD_LIBRARY_PATH=/usr/local/cuda-12.2/targets/x86_64-linux/lib/:$LD_LIBRARY_PATH
#make it permanant
echo "export LD_LIBRARY_PATH=/usr/local/cuda-12.2/targets/x86_64-linux/lib/:$LD_LIBRARY_PATH" >> ~/.bashrc
else
echo "CUDA is already installed."
fi
else
# CPU installation
echo "Using CPU for installation..."
fi

# Initilize all submodules and set them to main branch
echo "Initializing submodules"
git submodule update --init
cd zoos/bindings_zoo
git checkout main
cd ../personalities_zoo
git checkout main
cd ../extensions_zoo
git checkout main
cd ../models_zoo
git checkout main

cd ../..

cd lollms_core
git checkout main

cd ../utilities/safe_store
git checkout main

cd ../..
git submodule update --init --recursive
cd lollms-webui\lollms_core
pip install -e .
cd ..
cd utilities\safe_store
pip install -e .
cd ..\..

# Install requirements
pip install -r requirements.txt
python -m pip install -e lollms_core --upgrade
python -m pip install -e utilities/safe_store --upgrade

# by default ubuntu will start in lollms-webui path
echo 'cd ~/lollms-webui' >> ~/.bashrc
# Add automatic conda activate
echo 'conda activate ./env' >> ~/.bashrc


cd scripts/python/lollms_installer
python main.py
cd ..

# Exit WSL
exit

0 comments on commit c3e25e3

Please sign in to comment.