lollms-webui/scripts/wsl/install_script.sh

71 lines
2.3 KiB
Bash
Raw Normal View History

2023-09-21 00:09:24 +00:00
#!/bin/bash
echo " ___ ___ ___ ___ ___ ___ "
echo " /\__\ /\ \ /\__\ /\__\ /\__\ /\ \ "
echo " /:/ / /::\ \ /:/ / /:/ / /::| | /::\ \ "
echo " /:/ / /:/\:\ \ /:/ / /:/ / /:|:| | /:/\ \ \ "
echo " /:/ / /:/ \:\ \ /:/ / /:/ / /:/|:|__|__ _\:\~\ \ \ "
echo " /:/__/ /:/__/ \:\__\ /:/__/ /:/__/ /:/ |::::\__\ /\ \:\ \ \__\ "
echo " \:\ \ \:\ \ /:/ / \:\ \ \:\ \ \/__/~~/:/ / \:\ \:\ \/__/ "
echo " \:\ \ \:\ /:/ / \:\ \ \:\ \ /:/ / \:\ \:\__\ "
echo " \:\ \ \:\/:/ / \:\ \ \:\ \ /:/ / \:\/:/ / "
echo " \:\__\ \::/ / \:\__\ \:\__\ /:/ / \::/ / "
echo " \/__/ \/__/ \/__/ \/__/ \/__/ \/__/ "
2024-01-29 19:42:49 +00:00
echo "V9.5"
2024-01-04 03:04:47 +00:00
echo "-----------------"
echo "By ParisNeo"
echo "-----------------"
2023-09-21 00:09:24 +00:00
# Update and upgrade packages
sudo apt update
sudo apt upgrade -y
# Add a repository for Python 3.10
sudo add-apt-repository ppa:deadsnakes/ppa -y
sudo apt update
# Install Python 3.10 and pip
sudo apt install python3.10 python3-pip -y
# Create symlinks for python and pip
sudo ln -s /usr/bin/python3.10 /usr/local/bin/python
sudo ln -s /usr/bin/pip3 /usr/local/bin/pip
# Install Miniconda
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh
bash ~/miniconda.sh -b -p ~/miniconda
rm ~/miniconda.sh
2023-09-21 19:35:15 +00:00
source ~/miniconda/etc/profile.d/conda.sh
2023-09-21 22:43:28 +00:00
#make it permanant
echo 'source ~/miniconda/etc/profile.d/conda.sh' >> ~/.bashrc
2023-09-21 00:09:24 +00:00
# Clone the git repository
git clone https://github.com/ParisNeo/lollms-webui.git ~/lollms-webui
cd ~/lollms-webui
# Create and activate conda environment
2024-01-04 03:04:47 +00:00
conda create --prefix ./env python=3.11 git pip -y
2023-09-21 19:35:15 +00:00
conda activate ./env
2023-09-21 00:09:24 +00:00
2023-09-27 19:23:47 +00:00
# Initilize all submodules and set them to main branch
echo "Initializing submodules"
2024-01-04 03:04:47 +00:00
git submodule update --init --recursive
cd lollms-webui\lollms_core
pip install -e .
cd ..\..
2023-09-21 00:09:24 +00:00
# Install requirements
pip install -r requirements.txt
2023-09-27 19:23:47 +00:00
2023-09-21 22:43:28 +00:00
# by default ubuntu will start in lollms-webui path
echo 'cd ~/lollms-webui' >> ~/.bashrc
# Add automatic conda activate
echo 'conda activate ./env' >> ~/.bashrc
2023-09-21 00:09:24 +00:00
2024-01-04 03:04:47 +00:00
cd scripts/python/lollms_installer
python main.py
cd ..
2023-09-21 00:09:24 +00:00
# Exit WSL
exit