loader image

Set up a Local AI like ChatGPT on your own machine!

What makes us different from other similar websites? Forums Tech Set up a Local AI like ChatGPT on your own machine!

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #7623
    thumbtak
    Keymaster

    Install on Linux

    $ sudo apt install python3.11-venv

    $ python3.11 -m venv myenv

    $ source myenv/bin/activate

    $ pip install open-webui

    $ pip install async_timeout

    $ sudo docker run -d -p 3000:8080 --add-host=host.docker.internal:host-gateway -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main

    $ ollama pull llama3.1:latest

    $ open-webui serve

    http://localhost:8080

    Run on Linux, (after the above has been closed):

    $ cd ~/myenv

    $ source myenv/bin/activate

    $ open-webui serve

    http://localhost:8080

    Allow other on your network to use this:

    http://your-ip:8080

    Script that can be run each time you want to start the Web UI:

    #!/bin/sh
    
    # Navigate to the home directory, or the directory where your virtual environment is
    cd ~/myenv || exit # If this fails, exit the script
    
    # Activate the virtual environment
    if [ -f "bin/activate" ]; then
    . bin/activate # Use '.' (dot) instead of 'source' in sh
    else
    echo "Virtual environment not found. Exiting."
    exit 1
    fi
    
    # Run open-webui
    open-webui serve
    
    # Notify user the server is up
    echo "Activated, open at http://localhost:8080"

    Save as a sh file and run with $ sh file.sh command.

    More Information:

    https://github.com/open-webui/open-webui

    https://ollama.com/

    • This topic was modified 4 months ago by thumbtak. Reason: Removed sudo from the pip commands as "Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager."
    • This topic was modified 3 months, 3 weeks ago by thumbtak. Reason: I removed s command by putting a strickthrough
    • This topic was modified 3 months, 3 weeks ago by thumbtak. Reason: Removed repeated command
    #7624
    thumbtak
    Keymaster

    Upgrade Open-WebUI:

    Start Environment:

    $ python3.11 -m venv myenv

    $ source myenv/bin/activate

    Update Pip:
    $ pip install --upgrade pip

    Update Open WebUI:
    $ pip install --upgrade open-webui

    Restart the Server:
    $ open-webui serve

    Note:  Make sure it is not already running.

    • This reply was modified 3 months, 4 weeks ago by thumbtak. Reason: Updated the command, to working. Update should now work
    • This reply was modified 3 months, 2 weeks ago by thumbtak. Reason: Remove command replaced with uninstall command
    • This reply was modified 1 month, 4 weeks ago by thumbtak. Reason: Update command fixed
    #7634
    thumbtak
    Keymaster

    Retraining vs RAV vs Contract: Your Local Data on LLMs!

    #7662
    thumbtak
    Keymaster

    The commands were updates as the old ones didn’t work.

    #7663
    thumbtak
    Keymaster

    If you want to run Ollama in a terminal window, use the following command.

    $ ollama run model

    Example:
    $ ollama run mistral

    #7689
    thumbtak
    Keymaster

    If you get this error message, running the following command …
    $ python3.11 -m venv myenv

    $ python3.11 -m venv myenv
    The virtual environment was not created successfully because ensurepip is not
    available. On Debian/Ubuntu systems, you need to install the python3-venv
    package using the following command.
    
    apt install python3.11-venv
    
    You may need to use sudo with that command. After installing the python3-venv
    package, recreate your virtual environment.
    
    Failing command: ['/home/user/myenv/bin/python3.11', '-Im', 'ensurepip', '--upgrade', '--default-pip']

     

    Do the following …

    $ sudo add-apt-repository ppa:deadsnakes/ppa
    $ sudo apt update
    $ sudo apt upgrade
    $ sudo apt install -f
    $ sudo apt autoremove
    $ sudo apt install python3.11

    After this, you may have to delete your environment or rename it for backing it up. The data should be saved, minus the webui settings, and all the chats. Keep this in mind.  After you delete the environment (or rename) folder, you go back and reinstall the webui.

    Note: Some of the install will fail as your models will be already setup. You can remove it to restart fresh, or leave it the same. This is your choice.

    • This reply was modified 3 weeks, 4 days ago by thumbtak.
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
TAKs Shack