revise quickstart (#10721)

This commit is contained in:
Shengsheng Huang 2024-04-10 14:24:53 +08:00 committed by GitHub
parent a81f9e61a6
commit 0ccd7bfca9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -13,36 +13,38 @@ This quickstart guide walks you through setting up and using [Open WebUI](https:
### 1 Run Ollama on Linux with Intel GPU ### 1 Run Ollama on Linux with Intel GPU
Follow the instructions on the [Run Ollama on Linux with Intel GPU](ollama_quickstart.md) to install and run "Ollam Serve". Please ensure that the Ollama service continues to run while you're using the Open WebUI. Follow the instructions on the [Run Ollama on Linux with Intel GPU](ollama_quickstart.html) to install and run "Ollam Serve". Please ensure that the Ollama server continues to run while you're using the Open WebUI.
### 2 Install and Run Open-Webui ### 2 Install and Run Open-Webui
Open a new terminal, then create and activate a new conda environment with ``conda create -n open-webui``, ``conda activate open-webui``.
#### Requirements
- Node.js (>= 20.10) or Bun (>= 1.0.21)
- Python (>= 3.11)
> **Note:** <br>
> Update your package repository with `sudo apt update` (for Debian/Ubuntu). <br>
> Install Node.js with `sudo apt install nodejs`. <br>
> Install npm with `sudo apt install npm`. <br>
> Verify the installations with `node -v` and `npm -v`.
#### Installation #### Installation
1. Use `git` to clone the [open-webui repo](https://github.com/open-webui/open-webui.git) or download the open-webui source code zip from [this link](https://github.com/open-webui/open-webui/archive/refs/heads/main.zip) and unzip it to a directory, e.g. `~/open-webui`. ```eval_rst
.. note::
2. Run below commands to install Open WebUI Package version requirements for running Open WebUI: Node.js (>= 20.10) or Bun (>= 1.0.21), Python (>= 3.11)
```
1. Run below commands to install Node.js & npm. Once the installation is complete, verify the installation by running ```node -v``` and ```npm -v``` to check the versions of Node.js and npm, respectively.
```sh
sudo apt update
sudo apt install nodejs
sudo apt install npm
```
2. Use `git` to clone the [open-webui repo](https://github.com/open-webui/open-webui.git), or download the open-webui source code zip from [this link](https://github.com/open-webui/open-webui/archive/refs/heads/main.zip) and unzip it to a directory, e.g. `~/open-webui`.
3. Run below commands to install Open WebUI.
```sh ```sh
cd ~/open-webui/ cd ~/open-webui/
cp -RPp .env.example .env # Copy required .env file cp -RPp .env.example .env # Copy required .env file
# Build Frontend # Build frontend
npm i npm i
npm run build npm run build
# Serve Frontend with Backend # Install Dependencies
cd ./backend cd ./backend
pip install -r requirements.txt -U pip install -r requirements.txt -U
``` ```
@ -62,8 +64,6 @@ bash start.sh
If you have difficulty accessing the huggingface repositories, you may use a mirror, e.g. add `export HF_ENDPOINT=https://hf-mirror.com` before running `bash start.sh`. If you have difficulty accessing the huggingface repositories, you may use a mirror, e.g. add `export HF_ENDPOINT=https://hf-mirror.com` before running `bash start.sh`.
``` ```
> **Troubleshoot:** When running ``bash start.sh``, error occurs like ``ModuleNotFoundError: No module named 'torch._C'`` <br>
> Use ``pip uninstall torch`` and ``pip install torch torchvision torchaudio`` to re-install torch
#### Access the WebUI #### Access the WebUI
Upon successful launch, URLs to access the WebUI will be displayed in the terminal. Open the provided local URL in your browser to interact with the WebUI, e.g. http://localhost:8080/. Upon successful launch, URLs to access the WebUI will be displayed in the terminal. Open the provided local URL in your browser to interact with the WebUI, e.g. http://localhost:8080/.
@ -142,3 +142,10 @@ Additionally, you can drag and drop a document into the textbox, allowing the LL
#### Exit Open-Webui #### Exit Open-Webui
To shut down the open-webui server, use **Ctrl+C** in the terminal where the open-webui server is runing, then close your browser tab. To shut down the open-webui server, use **Ctrl+C** in the terminal where the open-webui server is runing, then close your browser tab.
### 4. Troubleshooting
##### Error `No module named 'torch._C`
When you encounter the error ``ModuleNotFoundError: No module named 'torch._C'`` after executing ```bash start.sh```, you can resolve it by reinstalling PyTorch. First, use ```pip uninstall torch``` to remove the existing PyTorch installation, and then reinstall it along with its dependencies by running ```pip install torch torchvision torchaudio```.