forestcalled/text-generation-webui
0
1## WSL instructions2 3If you do not have WSL installed, follow the [instructions below](https://github.com/oobabooga/text-generation-webui/wiki/10-%E2%80%90-WSL#wsl-installation) first.4 5### Additional WSL setup info6 7If you want to install Linux to a drive other than C, open powershell and enter these commands:8 9```10cd D:\Path\To\Linux11$ProgressPreference = 'SilentlyContinue'12Invoke-WebRequest -Uri <LinuxDistroURL> -OutFile Linux.appx -UseBasicParsing13mv Linux.appx Linux.zip14```15 16Then open Linux.zip and you should see several .appx files inside.17 18The one with _x64.appx contains the exe installer that you need.19 20Extract the contents of that _x64.appx file and run <distro>.exe to install.21 22Linux Distro URLs: https://learn.microsoft.com/en-us/windows/wsl/install-manual#downloading-distributions23 24**ENSURE THAT THE WSL LINUX DISTRO THAT YOU WISH TO USE IS SET AS THE DEFAULT!**25 26Do this by using these commands:27 28```29wsl -l30wsl -s <DistroName>31```32 33### Web UI Installation34 35Run the "start" script. By default it will install the web UI in WSL:36/home/{username}/text-gen-install37 38To launch the web UI in the future after it is already installed, run39the same "start" script. Ensure that one_click.py and wsl.sh are next to it!40 41### Updating the web UI42 43As an alternative to running the "update" script, you can also run "wsl.sh update" in WSL.44 45### Running an interactive shell46 47As an alternative to running the "cmd" script, you can also run "wsl.sh cmd" in WSL.48 49### Changing the default install location50 51To change this, you will need to edit the scripts as follows:52wsl.sh: line ~22 INSTALL_DIR="/path/to/install/dir"53 54Keep in mind that there is a long-standing bug in WSL that significantly55slows drive read/write speeds when using a physical drive as opposed to56the virtual one that Linux is installed in.57 58## WSL installation59 60Guide created by [@jfryton](https://github.com/jfryton). Thank you jfryton.61 62-----63 64Here's an easy-to-follow, step-by-step guide for installing Windows Subsystem for Linux (WSL) with Ubuntu on Windows 10/11:65 66### Step 1: Enable WSL67 681. Press the Windows key + X and click on "Windows PowerShell (Admin)" or "Windows Terminal (Admin)" to open PowerShell or Terminal with administrator privileges.692. In the PowerShell window, type the following command and press Enter:70 71```72wsl --install73```74 75If this command doesn't work, you can enable WSL with the following command for Windows 10:76 77```78wsl --set-default-version 179```80 81For Windows 11, you can use:82 83```84wsl --set-default-version 285```86 87You may be prompted to restart your computer. If so, save your work and restart.88 89### Step 2: Install Ubuntu90 911. Open the Microsoft Store.922. Search for "Ubuntu" in the search bar.933. Choose the desired Ubuntu version (e.g., Ubuntu 20.04 LTS) and click "Get" or "Install" to download and install the Ubuntu app.944. Once the installation is complete, click "Launch" or search for "Ubuntu" in the Start menu and open the app.95 96### Step 3: Set up Ubuntu97 981. When you first launch the Ubuntu app, it will take a few minutes to set up. Be patient as it installs the necessary files and sets up your environment.992. Once the setup is complete, you will be prompted to create a new UNIX username and password. Choose a username and password, and make sure to remember them, as you will need them for future administrative tasks within the Ubuntu environment.100 101### Step 4: Update and upgrade packages102 1031. After setting up your username and password, it's a good idea to update and upgrade your Ubuntu system. Run the following commands in the Ubuntu terminal:104 105```106sudo apt update107sudo apt upgrade108```109 1102. Enter your password when prompted. This will update the package list and upgrade any outdated packages.111 112Congratulations! You have now installed WSL with Ubuntu on your Windows 10/11 system. You can use the Ubuntu terminal for various tasks, like running Linux commands, installing packages, or managing files.113 114You can launch your WSL Ubuntu installation by selecting the Ubuntu app (like any other program installed on your computer) or typing 'ubuntu' into Powershell or Terminal.115 116### Step 5: Proceed with Linux instructions117 1181. You can now follow the Linux setup instructions. If you receive any error messages about a missing tool or package, just install them using apt:119 120```121sudo apt install [missing package]122```123 124You will probably need to install build-essential125 126```127sudo apt install build-essential128```129 130If you face any issues or need to troubleshoot, you can always refer to the official Microsoft documentation for WSL: https://docs.microsoft.com/en-us/windows/wsl/131 132### WSL2 performance using /mnt: 133 134When you git clone a repository, put it inside WSL and not outside. To understand more, take a look at this [issue](https://github.com/microsoft/WSL/issues/4197#issuecomment-604592340)135 136### Bonus: Port Forwarding137 138By default, you won't be able to access the webui from another device on your local network. You will need to setup the appropriate port forwarding using the following command (using PowerShell or Terminal with administrator privileges). 139 140```141netsh interface portproxy add v4tov4 listenaddress=0.0.0.0 listenport=7860 connectaddress=localhost connectport=7860142```143 144 