Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux Installer Script #871

Draft
wants to merge 29 commits into
base: dev
Choose a base branch
from
Draft

Conversation

justinh-rahb
Copy link
Collaborator

@justinh-rahb justinh-rahb commented Feb 23, 2024

Description:

This Pull Request introduces a new script designed to facilitate the automatic installation of Open WebUI on Ubuntu systems. The script offers a streamlined process for setting up Open WebUI, with support for both Docker-based and direct installations. Key features of this script include:

  • Docker Installation: For users who prefer or require a Docker-based setup, the script checks for the presence of Docker on the system. If Docker is not found, it prompts the user with the option to install Docker directly. This ensures that users can easily prepare their environment for running Open WebUI within a Docker container.

  • Open WebUI Setup: The script handles the deployment of Open WebUI, providing options for either a Docker container setup or a direct installation. This flexibility allows users to choose the installation method that best fits their needs and system capabilities.

  • User Interaction: Throughout the process, the script engages with the user through prompts, ensuring that they are in control of the installation choices, such as opting in for Docker installation or selecting the preferred method for deploying Open WebUI.

Note

The current version of the script is tailored for Ubuntu environments. However, work is underway to extend support to additional Linux distributions. This expansion will cater to a broader user base, accommodating different system preferences and requirements.

Future Plans:

The development of this script is ongoing, with plans to polish existing features and introduce support for more Linux distributions. Key goals include:

  • Enhanced Distro Support: Expanding the script to support other popular Linux distributions, making the installation process as seamless on those systems as it is on Ubuntu.

  • Streamlined User Experience: Continuous improvements to the script's user interaction model, ensuring it remains intuitive and user-friendly.

  • Official Hosting: In the future, we aim to host this script on https://openwebui.com, allowing users to easily initiate the installation process with a simple curl command:

    curl https://openwebui.com/install.sh | bash

    This will significantly simplify the setup process for Open WebUI, making it accessible to users with minimal setup commands.

Request for Comments:

I invite feedback, suggestions, and contributions from the community to refine this script further. Collaboration will be key to extending its capabilities and ensuring it meets the needs of our diverse user base. If you have ideas for improvement, additional features, or support for other distributions, please feel free to contribute to this effort.

Copy link
Contributor

@ching-kuo ching-kuo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comment on possible solutions to support more distro, not tested though.

install-linux.sh Outdated Show resolved Hide resolved
install-linux.sh Outdated Show resolved Hide resolved
@jannikstdl
Copy link
Contributor

jannikstdl commented Feb 23, 2024

Awesome! I can try this with my Ubuntu Laptop and maybe also check the functionality with my dual boot Debian.

@justinh-rahb
Copy link
Collaborator Author

Awesome! I can try this with my Ubuntu Laptop and maybe also check the functionality with my dual boot Debian.

I think it should work on Debian (and other derivatives of it and Ubuntu), but your mileage may vary lol

Copy link
Contributor

@jannikstdl jannikstdl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested it on Debian.

Docker installation failed:

Reading state information... Done
Package docker-ce is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package docker-ce-cli is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'docker-ce' has no installation candidate
E: Package 'docker-ce-cli' has no installation candidate
E: Unable to locate package containerd.io
E: Couldn't find any package by glob 'containerd.io'
E: Couldn't find any package by regex 'containerd.io'
sudo: docker: command not found
Docker installation failed. Please check the error messages above.
(base) jannik@Jannik-PC-debian:~/Downloads$ 

Maybe we could try this with https://get.docker.com as @ching-kuo mentioned.

Installation with --no-docker flag works just fine!
In future if we host this script on openwebui.com we should check if the user is in the cloned repo on his machine, and if not clone it first.
Maybe something like this:

if [ -f ".git/config" ] && grep -q "https://github.com/open-webui/open-webui.git" .git/config; then
  HAS_REPO=true
else
  HAS_REPO=false
fi

if [ "$HAS_REPO" = false ]; then
  read -p "Enter the path to clone the repository (default is current directory): " CLONE_PATH
  CLONE_PATH="${CLONE_PATH:-.}"
  CLONE_PATH=$(eval echo "$CLONE_PATH")
  git clone https://github.com/open-webui/open-webui.git "$CLONE_PATH/open-webui"
  cd "$CLONE_PATH/open-webui"
fi

@justinh-rahb
Copy link
Collaborator Author

Thanks for the testing @jannikstdl I'm going to work some more on this tonight and incorporate yours and @ching-kuo's excellent feedback 👏

@justinh-rahb
Copy link
Collaborator Author

justinh-rahb commented Mar 14, 2024

I'm getting back to work on this today, sorry it's been taking forever everyone :) @tjbck I'm not seeing how to rebase this on dev branch, can ya give me a hand?

@jannikstdl
Copy link
Contributor

All good, we all have stuff to do.

Do you want to change the target branch from open-webui:main to :dev or do you mean the dev branch on your fork?

@jannikstdl
Copy link
Contributor

I only saw that if you create a PR, i don't know if you can change that afterwards, but Tim can change that easily.

@justinh-rahb justinh-rahb changed the base branch from main to dev April 16, 2024 14:51
@justinh-rahb
Copy link
Collaborator Author

justinh-rahb commented Apr 16, 2024

To-Do Before Merge:

  1. Update Existing Repository:

    • If the Open WebUI repository already exists, perform a git pull to update it rather than cloning afresh.
    • Reinstall dependencies before executing docker-less installations to ensure all components are up-to-date.
  2. Ollama Environment Configuration:

    • Set up and configure necessary environment variables for Ollama, especially for host and CORS origins, during installation from the script.

To-Do Later:

  1. Flexible Host Configuration:
    • Allow specification of whether Ollama and Open WebUI are hosted on the same machine or different hosts.
    • Introduce interactive prompts during installation to configure the host location for Ollama.
    • Set environment variables based on user input to handle different hosting scenarios.

@justinh-rahb justinh-rahb marked this pull request as ready for review April 16, 2024 18:36
@justinh-rahb
Copy link
Collaborator Author

Alright I'm starting to get into perfectionist mode now so I'd really love it if someone would tell me to stop now LOL 😂

@justinh-rahb justinh-rahb marked this pull request as draft April 16, 2024 20:27
@justinh-rahb
Copy link
Collaborator Author

Just realized the systemd file needs a bit more work... no handling of Python venv there.

@tjbck
Copy link
Contributor

tjbck commented Apr 17, 2024

@justinh-rahb on fire today 🚀🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants