upgraded scripts

This commit is contained in:
Saifeddine ALOUI 2023-09-21 02:09:24 +02:00
parent 0727f5fb31
commit 0fa1c85815
27 changed files with 73 additions and 0 deletions

View File

@ -0,0 +1,33 @@
#!/bin/bash
# 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
# Clone the git repository
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 activate env
# Install requirements
pip install -r requirements.txt
# Exit WSL
exit

View File

@ -0,0 +1,19 @@
@echo off
:: Check if WSL is installed
wsl --list >nul 2>&1
if %errorlevel% neq 0 (
echo WSL is not installed. Installing...
wsl --install -e
wsl --set-default-version 2
echo Installing Ubuntu 20.04 LTS...
wsl --install -d Ubuntu-20.04 -e
) else (
echo WSL is already installed.
)
:: Execute the .sh script
wsl.exe -d Ubuntu-20.04 ./install_script.sh
echo Installation and script execution complete!
pause

View File

@ -0,0 +1,7 @@
@echo off
:: Execute the .sh script
wsl.exe -d Ubuntu-20.04 ./run_script.sh
echo Script execution complete!
pause

13
scripts/wsl/run_script.sh Normal file
View File

@ -0,0 +1,13 @@
#!/bin/bash
cd ~/lollms-webui
ls
# activate conda environment
source ~/miniconda/etc/profile.d/conda.sh
conda info --envs
conda activate ./env
# Run lollms webui
python3 app.py
# Exit WSL
exit

1
scripts/wsl/ubuntu.bat Normal file
View File

@ -0,0 +1 @@
wsl.exe -d Ubuntu-20.04