Adds strictly confined snap packaging of ollama-webui for x86-64 as an alternative to docker & k8s, presently published on the channel latest/beta (sudo snap install ollama-webui --beta).
This is proposed as a nice alternative to docker (no need to install and configure the nvidia docker runtime for example, systemd service is set up automatically, over-the-air updates, straightforward to access resources and data from user's host system within the limits of the application's confinement) and safer of course than bare installation onto host system.
Installable with:
sudo snap install ollama --channel beta # or ollama installed any other method, or on another host
sudo snap install ollama-webui --channel beta
As you might guess from above I also packaged up ollama as a snap (this snapped version of ollama-webui does not require it, demonstrating this mostly just to note the ease of installing both).
strict confinement used with network, network-bind, home, removable-media, opengl interfaces in use, i.e. it can access and serve a port, access home directory and /media, and access the GPU (the opengl interface also grants access to CUDA etc).
starts up a systemd service automatically for the service.
if removable media access is needed (e.g. user prefers storing data under a disk mounted under /media), sudo snap connect ollama:removable-media achieves that (for security reasons, removable media access not granted without user action).
If this looks interesting, I'm happy to hand over the package on snapcraft.io to a maintainer, and can contribute CI integration to make it easy to keep the snap package up to date whenever you release.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/open-webui/open-webui/pull/724
**Author:** [@mz2](https://github.com/mz2)
**Created:** 2/13/2024
**Status:** ❌ Closed
**Base:** `dev` ← **Head:** `snap`
---
### 📝 Commits (3)
- [`5dd61b1`](https://github.com/open-webui/open-webui/commit/5dd61b141d8e7d41515ec194cddcb1463e079143) Rebuild of the snap addition branch on top of current head of open-webui/open-webui dev branch
- [`461f41b`](https://github.com/open-webui/open-webui/commit/461f41bdd3a81e53e7c1869536cd32080ed3d2a7) Set STATIC_DIR
- [`e65accf`](https://github.com/open-webui/open-webui/commit/e65accf65c7d6a8b881355234b811519c3b7c7a4) Adjustments to the launcher
### 📊 Changes
**7 files changed** (+174 additions, -1 deletions)
<details>
<summary>View changed files</summary>
📝 `backend/start.sh` (+1 -1)
➕ `snap/hooks/configure` (+4 -0)
➕ `snap/hooks/install` (+14 -0)
➕ `snap/hooks/post-refresh` (+2 -0)
➕ `snap/local/info.sh` (+30 -0)
➕ `snap/local/run-snap.sh` (+18 -0)
➕ `snap/snapcraft.yaml` (+105 -0)
</details>
### 📄 Description
Adds strictly confined snap packaging of ollama-webui for x86-64 as an alternative to docker & k8s, presently published on the channel `latest/beta` (`sudo snap install ollama-webui --beta`).
This is proposed as a nice alternative to docker (no need to install and configure the nvidia docker runtime for example, systemd service is set up automatically, over-the-air updates, straightforward to access resources and data from user's host system within the limits of the application's confinement) and safer of course than bare installation onto host system.
Installable with:
```bash
sudo snap install ollama --channel beta # or ollama installed any other method, or on another host
sudo snap install ollama-webui --channel beta
```
As you might guess from above I also packaged up [ollama](https://github.com/ollama/ollama/pull/2432) as a snap (this snapped version of ollama-webui does not require it, demonstrating this mostly just to note the ease of installing both).
- strict confinement used with [`network`](https://snapcraft.io/docs/network-interface), [`network-bind`](https://snapcraft.io/docs/network-bind-interface), [`home`](https://snapcraft.io/docs/home-interface), [`removable-media`](https://snapcraft.io/docs/removable-media-interface), [`opengl`](https://snapcraft.io/docs/opengl-interface) interfaces in use, i.e. it can access and serve a port, access home directory and `/media`, and access the GPU (the `opengl` interface also grants access to CUDA etc).
- starts up a systemd service automatically for the service.
- if removable media access is needed (e.g. user prefers storing data under a disk mounted under `/media`), `sudo snap connect ollama:removable-media` achieves that (for security reasons, removable media access not granted without user action).
If this looks interesting, I'm happy to hand over the package on snapcraft.io to a maintainer, and can contribute CI integration to make it easy to keep the snap package up to date whenever you release.
If you want to build this locally, [after installing `snapcraft` and either the multipass or LXD provider for it](https://snapcraft.io/docs/snapcraft-setup) go to the root directory of the repository, and ...:
```bash
snapcraft
```
## Configuration
Offers the following configuration keys and default values, configurable with `sudo snap set ollama-webui key=value`:
- `data-dir`: /var/snap/ollama-webui/common/data
- `enable-signup`: true
- `host`: 0.0.0.0
- `ollama-api-base-url`: http://localhost:11434/api
- `openai-api-base-url`: https://api.openai.com/v1
- `openai-api-key`: (blank)
- `port`: 8080
- `secret-key` (randomized)
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/724
Author: @mz2
Created: 2/13/2024
Status: ❌ Closed
Base:
dev← Head:snap📝 Commits (3)
5dd61b1Rebuild of the snap addition branch on top of current head of open-webui/open-webui dev branch461f41bSet STATIC_DIRe65accfAdjustments to the launcher📊 Changes
7 files changed (+174 additions, -1 deletions)
View changed files
📝
backend/start.sh(+1 -1)➕
snap/hooks/configure(+4 -0)➕
snap/hooks/install(+14 -0)➕
snap/hooks/post-refresh(+2 -0)➕
snap/local/info.sh(+30 -0)➕
snap/local/run-snap.sh(+18 -0)➕
snap/snapcraft.yaml(+105 -0)📄 Description
Adds strictly confined snap packaging of ollama-webui for x86-64 as an alternative to docker & k8s, presently published on the channel
latest/beta(sudo snap install ollama-webui --beta).This is proposed as a nice alternative to docker (no need to install and configure the nvidia docker runtime for example, systemd service is set up automatically, over-the-air updates, straightforward to access resources and data from user's host system within the limits of the application's confinement) and safer of course than bare installation onto host system.
Installable with:
As you might guess from above I also packaged up ollama as a snap (this snapped version of ollama-webui does not require it, demonstrating this mostly just to note the ease of installing both).
network,network-bind,home,removable-media,openglinterfaces in use, i.e. it can access and serve a port, access home directory and/media, and access the GPU (theopenglinterface also grants access to CUDA etc)./media),sudo snap connect ollama:removable-mediaachieves that (for security reasons, removable media access not granted without user action).If this looks interesting, I'm happy to hand over the package on snapcraft.io to a maintainer, and can contribute CI integration to make it easy to keep the snap package up to date whenever you release.
If you want to build this locally, after installing
snapcraftand either the multipass or LXD provider for it go to the root directory of the repository, and ...:Configuration
Offers the following configuration keys and default values, configurable with
sudo snap set ollama-webui key=value:data-dir: /var/snap/ollama-webui/common/dataenable-signup: truehost: 0.0.0.0ollama-api-base-url: http://localhost:11434/apiopenai-api-base-url: https://api.openai.com/v1openai-api-key: (blank)port: 8080secret-key(randomized)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.