This repository has been archived by the owner on Oct 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from ollama-webui/dev
First merge to main
- Loading branch information
Showing
47 changed files
with
7,329 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: "" | ||
labels: "" | ||
assignees: "" | ||
--- | ||
|
||
# Bug Report | ||
|
||
## Description | ||
|
||
**Bug Summary:** | ||
[Provide a brief but clear summary of the bug] | ||
|
||
**Steps to Reproduce:** | ||
[Outline the steps to reproduce the bug. Be as detailed as possible.] | ||
|
||
**Expected Behavior:** | ||
[Describe what you expected to happen.] | ||
|
||
**Actual Behavior:** | ||
[Describe what actually happened.] | ||
|
||
## Environment | ||
|
||
- **Operating System:** [e.g., Windows 10, macOS Big Sur, Ubuntu 20.04] | ||
- **Browser (if applicable):** [e.g., Chrome 100.0, Firefox 98.0] | ||
|
||
## Reproduction Details | ||
|
||
**Confirmation:** | ||
|
||
- [ ] I have read and followed all the instructions provided in the README.md. | ||
- [ ] I have reviewed the troubleshooting.md document. | ||
- [ ] I have included the browser console logs. | ||
- [ ] I have included the Docker container logs. | ||
|
||
## Logs and Screenshots | ||
|
||
**Browser Console Logs:** | ||
[Include relevant browser console logs, if applicable] | ||
|
||
**Docker Container Logs:** | ||
[Include relevant Docker container logs, if applicable] | ||
|
||
**Screenshots (if applicable):** | ||
[Attach any relevant screenshots to help illustrate the issue] | ||
|
||
## Installation Method | ||
|
||
[Describe the method you used to install the project, e.g., manual installation, Docker, package manager, etc.] | ||
|
||
## Additional Information | ||
|
||
[Include any additional details that may help in understanding and reproducing the issue. This could include specific configurations, error messages, or anything else relevant to the bug.] | ||
|
||
## Note | ||
|
||
If the bug report is incomplete or does not follow the provided instructions, it may not be addressed. Please ensure that you have followed the steps outlined in the README.md and troubleshooting.md documents, and provide all necessary information for us to reproduce and address the issue. Thank you! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: "" | ||
labels: "" | ||
assignees: "" | ||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# | ||
name: Create and publish a Docker image | ||
|
||
# Configures this workflow to run every time a change is pushed to the branch called `release`. | ||
on: | ||
push: | ||
branches: ["main"] | ||
tags: | ||
- v* | ||
|
||
# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds. | ||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu. | ||
jobs: | ||
build-and-push-image: | ||
runs-on: ubuntu-latest | ||
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job. | ||
permissions: | ||
contents: read | ||
packages: write | ||
# | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
# Required for multi architecture build | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
# Required for multi architecture build | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
# Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here. | ||
- name: Log in to the Container registry | ||
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
# This step uses [docker/metadata-action](https://github.com/docker/metadata-action#about) to extract tags and labels that will be applied to the specified image. The `id` "meta" allows the output of this step to be referenced in a subsequent step. The `images` value provides the base name for the tags and labels. | ||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
# This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages. | ||
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository. | ||
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step. | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
push: true | ||
platforms: linux/amd64,linux/arm64 | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Node.js CI | ||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
jobs: | ||
build: | ||
name: "Fmt, Lint, & Build" | ||
env: | ||
PUBLIC_API_BASE_URL: "" | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: | ||
- latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- run: node --version | ||
- run: npm clean-install | ||
- run: npm run fmt | ||
#- run: npm run lint | ||
#- run: npm run lint:types | ||
- run: npm run build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.DS_Store | ||
node_modules | ||
/build | ||
/.svelte-kit | ||
/package | ||
.env | ||
.env.* | ||
!.env.example | ||
vite.config.js.timestamp-* | ||
vite.config.ts.timestamp-* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
.DS_Store | ||
node_modules | ||
/build | ||
/.svelte-kit | ||
/package | ||
.env | ||
.env.* | ||
!.env.example | ||
|
||
# Ignore files for PNPM, NPM and YARN | ||
pnpm-lock.yaml | ||
package-lock.json | ||
yarn.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"useTabs": true, | ||
"trailingComma": "none", | ||
"printWidth": 100, | ||
"plugins": ["prettier-plugin-svelte"], | ||
"pluginSearchDirs": ["."], | ||
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,67 @@ | ||
coming soon ❤️ | ||
# Ollama Web UI Lite 🦙 | ||
|
||
Ollama Web UI Lite is a streamlined version of [Ollama Web UI](https://github.com/ollama-webui/ollama-webui), designed to offer a simplified user interface with minimal features and reduced complexity. The primary focus of this project is on achieving cleaner code through a full TypeScript migration, adopting a more modular architecture, ensuring comprehensive test coverage, and implementing a robust CI/CD pipeline. | ||
|
||
## Features ⭐ | ||
|
||
The current version includes only the essential functionalities found in the full [Ollama Web UI](https://github.com/ollama-webui/ollama-webui), such as pulling and deleting models, engaging in conversations with one or multiple models, chat import/export, etc. | ||
|
||
We are committed to maintaining this repository and progressively working through our to-do list to enhance its capabilities. The planned improvements include: | ||
|
||
- **Code Cleanup:** Enhance readability and maintainability of the codebase. | ||
- **Architectural Refactoring:** Implement a more modular architecture with a focus on component separation. | ||
- **TypeScript Migration:** Fully migrate the codebase to TypeScript, providing complete type declarations. | ||
- **Test Implementation:** Introduce a comprehensive suite of tests to ensure code reliability. | ||
- **CI/CD Integration:** Establish a continuous integration and continuous deployment pipeline for automated testing and deployment. | ||
- **Additional Features:** Add new features based on user requests. | ||
|
||
## Installation 🚀 | ||
|
||
Before proceeding with the installation, ensure that you have the following prerequisites: | ||
|
||
- Docker | ||
- Node.js | ||
- npm | ||
|
||
If you are not using Docker, you can instead host your own Ollama server (see [here](https://ollama.ai/)) at http://localhost:11434/api. | ||
|
||
Follow these steps to set up Ollama-webui-lite: | ||
|
||
1. Clone the repository: | ||
|
||
```bash | ||
git clone https://github.com/ollama-webui/ollama-webui-lite.git | ||
cd ollama-webui-lite | ||
``` | ||
|
||
2. Start the Ollama Docker containers (or set up your Ollama server): | ||
|
||
```bash | ||
docker-compose up -d --build | ||
``` | ||
|
||
3. Install the dependencies: | ||
|
||
```bash | ||
npm ci | ||
``` | ||
|
||
4. Run the application in development mode: | ||
|
||
```bash | ||
npm run dev | ||
``` | ||
|
||
Ollama Web UI Lite now should be available at http://localhost:3000 | ||
|
||
![Preview](preview.png) | ||
|
||
## License 📜 | ||
|
||
This project is licensed under the [MIT License](LICENSE) - see the [LICENSE](LICENSE) file for details. 📄 | ||
|
||
## Support 💬 | ||
|
||
If you have any questions, suggestions, or need assistance, please open an issue or join our | ||
[Ollama Web UI Discord community](https://discord.gg/5rJgQTnV4s) or | ||
[Ollama Discord community](https://discord.gg/ollama) to connect with us! 🤝 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# Ollama Web UI Troubleshooting Guide | ||
|
||
## Connection Errors | ||
|
||
Make sure you have the **latest version of Ollama** installed before proceeding with the installation. You can find the latest version of Ollama at [https://ollama.ai/](https://ollama.ai/). | ||
|
||
If you encounter difficulties connecting to the Ollama server, please follow these steps to diagnose and resolve the issue: | ||
|
||
**1. Verify Ollama Server Configuration** | ||
|
||
Ensure that the Ollama server is properly configured to accept incoming connections from all origins. To do this, make sure the server is launched with the `OLLAMA_ORIGINS=*` environment variable, as shown in the following command: | ||
|
||
```bash | ||
OLLAMA_HOST=0.0.0.0 OLLAMA_ORIGINS=* ollama serve | ||
``` | ||
|
||
This configuration allows Ollama to accept connections from any source. | ||
|
||
**2. Check Ollama URL Format** | ||
|
||
Ensure that the Ollama URL is correctly formatted in the application settings. Follow these steps: | ||
|
||
- If your Ollama runs in a different host than Web UI make sure Ollama host address is provided when running Web UI container via `OLLAMA_API_BASE_URL` environment variable. [(e.g. OLLAMA_API_BASE_URL=http://192.168.1.1:11434/api)](https://github.com/ollama-webui/ollama-webui#accessing-external-ollama-on-a-different-server) | ||
- Go to "Settings" within the Ollama WebUI. | ||
- Navigate to the "General" section. | ||
- Verify that the Ollama Server URL is set to: `/ollama/api`. | ||
|
||
It is crucial to include the `/api` at the end of the URL to ensure that the Ollama Web UI can communicate with the server. | ||
|
||
By following these troubleshooting steps, you should be able to identify and resolve connection issues with your Ollama server configuration. If you require further assistance or have additional questions, please don't hesitate to reach out or refer to our documentation for comprehensive guidance. | ||
|
||
## Running ollama-webui as a container on Apple Silicon Mac | ||
|
||
If you are running Docker on a M{1..3} based Mac and have taken the steps to run an x86 container, add "--platform linux/amd64" to the docker run command to prevent a warning. | ||
|
||
Example: | ||
|
||
```bash | ||
docker run -d -p 3000:8080 -e OLLAMA_API_BASE_URL=http://example.com:11434/api --name ollama-webui --restart always ghcr.io/ollama-webui/ollama-webui:main | ||
``` | ||
|
||
Becomes | ||
|
||
``` | ||
docker run --platform linux/amd64 -d -p 3000:8080 -e OLLAMA_API_BASE_URL=http://example.com:11434/api --name ollama-webui --restart always ghcr.io/ollama-webui/ollama-webui:main | ||
``` | ||
|
||
## Running ollama-webui as a container on WSL Ubuntu | ||
|
||
If you're running ollama-webui via docker on WSL Ubuntu and have chosen to install webui and ollama separately, you might encounter connection issues. This is often due to the docker container being unable to reach the Ollama server at 127.0.0.1:11434. To resolve this, you can use the `--network=host` flag in the docker command. When done so port would be changed from 3000 to 8080, and the link would be: http://localhost:8080. | ||
|
||
Here's an example of the command you should run: | ||
|
||
```bash | ||
docker run -d --network=host -e OLLAMA_API_BASE_URL=http://127.0.0.1:11434/api --name ollama-webui --restart always ghcr.io/ollama-webui/ollama-webui:main | ||
``` | ||
|
||
## References | ||
|
||
[Change Docker Desktop Settings on Mac](https://docs.docker.com/desktop/settings/mac/) Search for "x86" in that page. | ||
[Run x86 (Intel) and ARM based images on Apple Silicon (M1) Macs?](https://forums.docker.com/t/run-x86-intel-and-arm-based-images-on-apple-silicon-m1-macs/117123) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
version: "3.8" | ||
|
||
services: | ||
ollama: | ||
# GPU support | ||
# deploy: | ||
# resources: | ||
# reservations: | ||
# devices: | ||
# - driver: nvidia | ||
# count: 1 | ||
# capabilities: [gpu] | ||
volumes: | ||
- ollama:/root/.ollama | ||
ports: | ||
- 11434:11434 | ||
restart: unless-stopped | ||
image: ollama/ollama:latest | ||
|
||
volumes: | ||
ollama: {} |
Oops, something went wrong.