Spaces:
Build error
Build error
Commit ·
960194f
0
Parent(s):
first commit
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- .dockerignore +20 -0
- .env.example +13 -0
- .eslintignore +13 -0
- .eslintrc.cjs +31 -0
- .gitattributes +1 -0
- .github/FUNDING.yml +1 -0
- .github/ISSUE_TEMPLATE/bug_report.md +80 -0
- .github/ISSUE_TEMPLATE/feature_request.md +35 -0
- .github/dependabot.yml +12 -0
- .github/pull_request_template.md +72 -0
- .github/workflows/build-release.yml +72 -0
- .github/workflows/codespell.disabled +25 -0
- .github/workflows/deploy-to-hf-spaces.yml +63 -0
- .github/workflows/docker-build.yaml +477 -0
- .github/workflows/format-backend.yaml +39 -0
- .github/workflows/format-build-frontend.yaml +57 -0
- .github/workflows/integration-test.disabled +255 -0
- .github/workflows/lint-backend.disabled +27 -0
- .github/workflows/lint-frontend.disabled +21 -0
- .github/workflows/release-pypi.yml +32 -0
- .gitignore +309 -0
- .npmrc +1 -0
- .prettierignore +316 -0
- .prettierrc +9 -0
- CHANGELOG.md +0 -0
- CODE_OF_CONDUCT.md +99 -0
- Caddyfile.localhost +64 -0
- Dockerfile +176 -0
- INSTALLATION.md +35 -0
- LICENSE +27 -0
- Makefile +33 -0
- README.md +228 -0
- TROUBLESHOOTING.md +36 -0
- confirm_remove.sh +13 -0
- cypress.config.ts +8 -0
- docker-compose.a1111-test.yaml +31 -0
- docker-compose.amdgpu.yaml +8 -0
- docker-compose.api.yaml +5 -0
- docker-compose.data.yaml +4 -0
- docker-compose.gpu.yaml +11 -0
- docker-compose.playwright.yaml +10 -0
- docker-compose.yaml +34 -0
- docs/CONTRIBUTING.md +73 -0
- docs/README.md +3 -0
- docs/SECURITY.md +44 -0
- docs/apache.md +205 -0
- hatch_build.py +23 -0
- i18next-parser.config.ts +38 -0
- kubernetes/helm/README.md +4 -0
- package-lock.json +0 -0
.dockerignore
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
.github
|
| 2 |
+
.DS_Store
|
| 3 |
+
docs
|
| 4 |
+
kubernetes
|
| 5 |
+
node_modules
|
| 6 |
+
/.svelte-kit
|
| 7 |
+
/package
|
| 8 |
+
.env
|
| 9 |
+
.env.*
|
| 10 |
+
vite.config.js.timestamp-*
|
| 11 |
+
vite.config.ts.timestamp-*
|
| 12 |
+
__pycache__
|
| 13 |
+
.idea
|
| 14 |
+
venv
|
| 15 |
+
_old
|
| 16 |
+
uploads
|
| 17 |
+
.ipynb_checkpoints
|
| 18 |
+
**/*.db
|
| 19 |
+
_test
|
| 20 |
+
backend/data/*
|
.env.example
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Ollama URL for the backend to connect
|
| 2 |
+
# The path '/ollama' will be redirected to the specified backend URL
|
| 3 |
+
OLLAMA_BASE_URL='http://localhost:11434'
|
| 4 |
+
|
| 5 |
+
OPENAI_API_BASE_URL=''
|
| 6 |
+
OPENAI_API_KEY=''
|
| 7 |
+
|
| 8 |
+
# AUTOMATIC1111_BASE_URL="http://localhost:7860"
|
| 9 |
+
|
| 10 |
+
# DO NOT TRACK
|
| 11 |
+
SCARF_NO_ANALYTICS=true
|
| 12 |
+
DO_NOT_TRACK=true
|
| 13 |
+
ANONYMIZED_TELEMETRY=false
|
.eslintignore
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
.DS_Store
|
| 2 |
+
node_modules
|
| 3 |
+
/build
|
| 4 |
+
/.svelte-kit
|
| 5 |
+
/package
|
| 6 |
+
.env
|
| 7 |
+
.env.*
|
| 8 |
+
!.env.example
|
| 9 |
+
|
| 10 |
+
# Ignore files for PNPM, NPM and YARN
|
| 11 |
+
pnpm-lock.yaml
|
| 12 |
+
package-lock.json
|
| 13 |
+
yarn.lock
|
.eslintrc.cjs
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
module.exports = {
|
| 2 |
+
root: true,
|
| 3 |
+
extends: [
|
| 4 |
+
'eslint:recommended',
|
| 5 |
+
'plugin:@typescript-eslint/recommended',
|
| 6 |
+
'plugin:svelte/recommended',
|
| 7 |
+
'plugin:cypress/recommended',
|
| 8 |
+
'prettier'
|
| 9 |
+
],
|
| 10 |
+
parser: '@typescript-eslint/parser',
|
| 11 |
+
plugins: ['@typescript-eslint'],
|
| 12 |
+
parserOptions: {
|
| 13 |
+
sourceType: 'module',
|
| 14 |
+
ecmaVersion: 2020,
|
| 15 |
+
extraFileExtensions: ['.svelte']
|
| 16 |
+
},
|
| 17 |
+
env: {
|
| 18 |
+
browser: true,
|
| 19 |
+
es2017: true,
|
| 20 |
+
node: true
|
| 21 |
+
},
|
| 22 |
+
overrides: [
|
| 23 |
+
{
|
| 24 |
+
files: ['*.svelte'],
|
| 25 |
+
parser: 'svelte-eslint-parser',
|
| 26 |
+
parserOptions: {
|
| 27 |
+
parser: '@typescript-eslint/parser'
|
| 28 |
+
}
|
| 29 |
+
}
|
| 30 |
+
]
|
| 31 |
+
};
|
.gitattributes
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
*.sh text eol=lf
|
.github/FUNDING.yml
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
github: tjbck
|
.github/ISSUE_TEMPLATE/bug_report.md
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
name: Bug report
|
| 3 |
+
about: Create a report to help us improve
|
| 4 |
+
title: ''
|
| 5 |
+
labels: ''
|
| 6 |
+
assignees: ''
|
| 7 |
+
---
|
| 8 |
+
|
| 9 |
+
# Bug Report
|
| 10 |
+
|
| 11 |
+
## Important Notes
|
| 12 |
+
|
| 13 |
+
- **Before submitting a bug report**: Please check the Issues or Discussions section to see if a similar issue or feature request has already been posted. It's likely we're already tracking it! If you’re unsure, start a discussion post first. This will help us efficiently focus on improving the project.
|
| 14 |
+
|
| 15 |
+
- **Collaborate respectfully**: We value a constructive attitude, so please be mindful of your communication. If negativity is part of your approach, our capacity to engage may be limited. We’re here to help if you’re open to learning and communicating positively. Remember, Open WebUI is a volunteer-driven project managed by a single maintainer and supported by contributors who also have full-time jobs. We appreciate your time and ask that you respect ours.
|
| 16 |
+
|
| 17 |
+
- **Contributing**: If you encounter an issue, we highly encourage you to submit a pull request or fork the project. We actively work to prevent contributor burnout to maintain the quality and continuity of Open WebUI.
|
| 18 |
+
|
| 19 |
+
- **Bug reproducibility**: If a bug cannot be reproduced with a `:main` or `:dev` Docker setup, or a pip install with Python 3.11, it may require additional help from the community. In such cases, we will move it to the "issues" Discussions section due to our limited resources. We encourage the community to assist with these issues. Remember, it’s not that the issue doesn’t exist; we need your help!
|
| 20 |
+
|
| 21 |
+
Note: Please remove the notes above when submitting your post. Thank you for your understanding and support!
|
| 22 |
+
|
| 23 |
+
---
|
| 24 |
+
|
| 25 |
+
## Installation Method
|
| 26 |
+
|
| 27 |
+
[Describe the method you used to install the project, e.g., git clone, Docker, pip, etc.]
|
| 28 |
+
|
| 29 |
+
## Environment
|
| 30 |
+
|
| 31 |
+
- **Open WebUI Version:** [e.g., v0.3.11]
|
| 32 |
+
- **Ollama (if applicable):** [e.g., v0.2.0, v0.1.32-rc1]
|
| 33 |
+
|
| 34 |
+
- **Operating System:** [e.g., Windows 10, macOS Big Sur, Ubuntu 20.04]
|
| 35 |
+
- **Browser (if applicable):** [e.g., Chrome 100.0, Firefox 98.0]
|
| 36 |
+
|
| 37 |
+
**Confirmation:**
|
| 38 |
+
|
| 39 |
+
- [ ] I have read and followed all the instructions provided in the README.md.
|
| 40 |
+
- [ ] I am on the latest version of both Open WebUI and Ollama.
|
| 41 |
+
- [ ] I have included the browser console logs.
|
| 42 |
+
- [ ] I have included the Docker container logs.
|
| 43 |
+
- [ ] I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below.
|
| 44 |
+
|
| 45 |
+
## Expected Behavior:
|
| 46 |
+
|
| 47 |
+
[Describe what you expected to happen.]
|
| 48 |
+
|
| 49 |
+
## Actual Behavior:
|
| 50 |
+
|
| 51 |
+
[Describe what actually happened.]
|
| 52 |
+
|
| 53 |
+
## Description
|
| 54 |
+
|
| 55 |
+
**Bug Summary:**
|
| 56 |
+
[Provide a brief but clear summary of the bug]
|
| 57 |
+
|
| 58 |
+
## Reproduction Details
|
| 59 |
+
|
| 60 |
+
**Steps to Reproduce:**
|
| 61 |
+
[Outline the steps to reproduce the bug. Be as detailed as possible.]
|
| 62 |
+
|
| 63 |
+
## Logs and Screenshots
|
| 64 |
+
|
| 65 |
+
**Browser Console Logs:**
|
| 66 |
+
[Include relevant browser console logs, if applicable]
|
| 67 |
+
|
| 68 |
+
**Docker Container Logs:**
|
| 69 |
+
[Include relevant Docker container logs, if applicable]
|
| 70 |
+
|
| 71 |
+
**Screenshots/Screen Recordings (if applicable):**
|
| 72 |
+
[Attach any relevant screenshots to help illustrate the issue]
|
| 73 |
+
|
| 74 |
+
## Additional Information
|
| 75 |
+
|
| 76 |
+
[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.]
|
| 77 |
+
|
| 78 |
+
## Note
|
| 79 |
+
|
| 80 |
+
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!
|
.github/ISSUE_TEMPLATE/feature_request.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
name: Feature request
|
| 3 |
+
about: Suggest an idea for this project
|
| 4 |
+
title: ''
|
| 5 |
+
labels: ''
|
| 6 |
+
assignees: ''
|
| 7 |
+
---
|
| 8 |
+
|
| 9 |
+
# Feature Request
|
| 10 |
+
|
| 11 |
+
## Important Notes
|
| 12 |
+
|
| 13 |
+
- **Before submitting a report**: Please check the Issues or Discussions section to see if a similar issue or feature request has already been posted. It's likely we're already tracking it! If you’re unsure, start a discussion post first. This will help us efficiently focus on improving the project.
|
| 14 |
+
|
| 15 |
+
- **Collaborate respectfully**: We value a constructive attitude, so please be mindful of your communication. If negativity is part of your approach, our capacity to engage may be limited. We’re here to help if you’re open to learning and communicating positively. Remember, Open WebUI is a volunteer-driven project managed by a single maintainer and supported by contributors who also have full-time jobs. We appreciate your time and ask that you respect ours.
|
| 16 |
+
|
| 17 |
+
- **Contributing**: If you encounter an issue, we highly encourage you to submit a pull request or fork the project. We actively work to prevent contributor burnout to maintain the quality and continuity of Open WebUI.
|
| 18 |
+
|
| 19 |
+
- **Bug reproducibility**: If a bug cannot be reproduced with a `:main` or `:dev` Docker setup, or a pip install with Python 3.11, it may require additional help from the community. In such cases, we will move it to the "issues" Discussions section due to our limited resources. We encourage the community to assist with these issues. Remember, it’s not that the issue doesn’t exist; we need your help!
|
| 20 |
+
|
| 21 |
+
Note: Please remove the notes above when submitting your post. Thank you for your understanding and support!
|
| 22 |
+
|
| 23 |
+
---
|
| 24 |
+
|
| 25 |
+
**Is your feature request related to a problem? Please describe.**
|
| 26 |
+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
| 27 |
+
|
| 28 |
+
**Describe the solution you'd like**
|
| 29 |
+
A clear and concise description of what you want to happen.
|
| 30 |
+
|
| 31 |
+
**Describe alternatives you've considered**
|
| 32 |
+
A clear and concise description of any alternative solutions or features you've considered.
|
| 33 |
+
|
| 34 |
+
**Additional context**
|
| 35 |
+
Add any other context or screenshots about the feature request here.
|
.github/dependabot.yml
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version: 2
|
| 2 |
+
updates:
|
| 3 |
+
- package-ecosystem: pip
|
| 4 |
+
directory: '/backend'
|
| 5 |
+
schedule:
|
| 6 |
+
interval: monthly
|
| 7 |
+
target-branch: 'dev'
|
| 8 |
+
- package-ecosystem: 'github-actions'
|
| 9 |
+
directory: '/'
|
| 10 |
+
schedule:
|
| 11 |
+
# Check for updates to GitHub Actions every week
|
| 12 |
+
interval: monthly
|
.github/pull_request_template.md
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Pull Request Checklist
|
| 2 |
+
|
| 3 |
+
### Note to first-time contributors: Please open a discussion post in [Discussions](https://github.com/open-webui/open-webui/discussions) and describe your changes before submitting a pull request.
|
| 4 |
+
|
| 5 |
+
**Before submitting, make sure you've checked the following:**
|
| 6 |
+
|
| 7 |
+
- [ ] **Target branch:** Please verify that the pull request targets the `dev` branch.
|
| 8 |
+
- [ ] **Description:** Provide a concise description of the changes made in this pull request.
|
| 9 |
+
- [ ] **Changelog:** Ensure a changelog entry following the format of [Keep a Changelog](https://keepachangelog.com/) is added at the bottom of the PR description.
|
| 10 |
+
- [ ] **Documentation:** Have you updated relevant documentation [Open WebUI Docs](https://github.com/open-webui/docs), or other documentation sources?
|
| 11 |
+
- [ ] **Dependencies:** Are there any new dependencies? Have you updated the dependency versions in the documentation?
|
| 12 |
+
- [ ] **Testing:** Have you written and run sufficient tests for validating the changes?
|
| 13 |
+
- [ ] **Code review:** Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards?
|
| 14 |
+
- [ ] **Prefix:** To cleary categorize this pull request, prefix the pull request title, using one of the following:
|
| 15 |
+
- **BREAKING CHANGE**: Significant changes that may affect compatibility
|
| 16 |
+
- **build**: Changes that affect the build system or external dependencies
|
| 17 |
+
- **ci**: Changes to our continuous integration processes or workflows
|
| 18 |
+
- **chore**: Refactor, cleanup, or other non-functional code changes
|
| 19 |
+
- **docs**: Documentation update or addition
|
| 20 |
+
- **feat**: Introduces a new feature or enhancement to the codebase
|
| 21 |
+
- **fix**: Bug fix or error correction
|
| 22 |
+
- **i18n**: Internationalization or localization changes
|
| 23 |
+
- **perf**: Performance improvement
|
| 24 |
+
- **refactor**: Code restructuring for better maintainability, readability, or scalability
|
| 25 |
+
- **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)
|
| 26 |
+
- **test**: Adding missing tests or correcting existing tests
|
| 27 |
+
- **WIP**: Work in progress, a temporary label for incomplete or ongoing work
|
| 28 |
+
|
| 29 |
+
# Changelog Entry
|
| 30 |
+
|
| 31 |
+
### Description
|
| 32 |
+
|
| 33 |
+
- [Concisely describe the changes made in this pull request, including any relevant motivation and impact (e.g., fixing a bug, adding a feature, or improving performance)]
|
| 34 |
+
|
| 35 |
+
### Added
|
| 36 |
+
|
| 37 |
+
- [List any new features, functionalities, or additions]
|
| 38 |
+
|
| 39 |
+
### Changed
|
| 40 |
+
|
| 41 |
+
- [List any changes, updates, refactorings, or optimizations]
|
| 42 |
+
|
| 43 |
+
### Deprecated
|
| 44 |
+
|
| 45 |
+
- [List any deprecated functionality or features that have been removed]
|
| 46 |
+
|
| 47 |
+
### Removed
|
| 48 |
+
|
| 49 |
+
- [List any removed features, files, or functionalities]
|
| 50 |
+
|
| 51 |
+
### Fixed
|
| 52 |
+
|
| 53 |
+
- [List any fixes, corrections, or bug fixes]
|
| 54 |
+
|
| 55 |
+
### Security
|
| 56 |
+
|
| 57 |
+
- [List any new or updated security-related changes, including vulnerability fixes]
|
| 58 |
+
|
| 59 |
+
### Breaking Changes
|
| 60 |
+
|
| 61 |
+
- **BREAKING CHANGE**: [List any breaking changes affecting compatibility or functionality]
|
| 62 |
+
|
| 63 |
+
---
|
| 64 |
+
|
| 65 |
+
### Additional Information
|
| 66 |
+
|
| 67 |
+
- [Insert any additional context, notes, or explanations for the changes]
|
| 68 |
+
- [Reference any related issues, commits, or other relevant information]
|
| 69 |
+
|
| 70 |
+
### Screenshots or Videos
|
| 71 |
+
|
| 72 |
+
- [Attach any relevant screenshots or videos demonstrating the changes]
|
.github/workflows/build-release.yml
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Release
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
push:
|
| 5 |
+
branches:
|
| 6 |
+
- main # or whatever branch you want to use
|
| 7 |
+
|
| 8 |
+
jobs:
|
| 9 |
+
release:
|
| 10 |
+
runs-on: ubuntu-latest
|
| 11 |
+
|
| 12 |
+
steps:
|
| 13 |
+
- name: Checkout repository
|
| 14 |
+
uses: actions/checkout@v4
|
| 15 |
+
|
| 16 |
+
- name: Check for changes in package.json
|
| 17 |
+
run: |
|
| 18 |
+
git diff --cached --diff-filter=d package.json || {
|
| 19 |
+
echo "No changes to package.json"
|
| 20 |
+
exit 1
|
| 21 |
+
}
|
| 22 |
+
|
| 23 |
+
- name: Get version number from package.json
|
| 24 |
+
id: get_version
|
| 25 |
+
run: |
|
| 26 |
+
VERSION=$(jq -r '.version' package.json)
|
| 27 |
+
echo "::set-output name=version::$VERSION"
|
| 28 |
+
|
| 29 |
+
- name: Extract latest CHANGELOG entry
|
| 30 |
+
id: changelog
|
| 31 |
+
run: |
|
| 32 |
+
CHANGELOG_CONTENT=$(awk 'BEGIN {print_section=0;} /^## \[/ {if (print_section == 0) {print_section=1;} else {exit;}} print_section {print;}' CHANGELOG.md)
|
| 33 |
+
CHANGELOG_ESCAPED=$(echo "$CHANGELOG_CONTENT" | sed ':a;N;$!ba;s/\n/%0A/g')
|
| 34 |
+
echo "Extracted latest release notes from CHANGELOG.md:"
|
| 35 |
+
echo -e "$CHANGELOG_CONTENT"
|
| 36 |
+
echo "::set-output name=content::$CHANGELOG_ESCAPED"
|
| 37 |
+
|
| 38 |
+
- name: Create GitHub release
|
| 39 |
+
uses: actions/github-script@v7
|
| 40 |
+
with:
|
| 41 |
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
| 42 |
+
script: |
|
| 43 |
+
const changelog = `${{ steps.changelog.outputs.content }}`;
|
| 44 |
+
const release = await github.rest.repos.createRelease({
|
| 45 |
+
owner: context.repo.owner,
|
| 46 |
+
repo: context.repo.repo,
|
| 47 |
+
tag_name: `v${{ steps.get_version.outputs.version }}`,
|
| 48 |
+
name: `v${{ steps.get_version.outputs.version }}`,
|
| 49 |
+
body: changelog,
|
| 50 |
+
})
|
| 51 |
+
console.log(`Created release ${release.data.html_url}`)
|
| 52 |
+
|
| 53 |
+
- name: Upload package to GitHub release
|
| 54 |
+
uses: actions/upload-artifact@v4
|
| 55 |
+
with:
|
| 56 |
+
name: package
|
| 57 |
+
path: |
|
| 58 |
+
.
|
| 59 |
+
!.git
|
| 60 |
+
env:
|
| 61 |
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
| 62 |
+
|
| 63 |
+
- name: Trigger Docker build workflow
|
| 64 |
+
uses: actions/github-script@v7
|
| 65 |
+
with:
|
| 66 |
+
script: |
|
| 67 |
+
github.rest.actions.createWorkflowDispatch({
|
| 68 |
+
owner: context.repo.owner,
|
| 69 |
+
repo: context.repo.repo,
|
| 70 |
+
workflow_id: 'docker-build.yaml',
|
| 71 |
+
ref: 'v${{ steps.get_version.outputs.version }}',
|
| 72 |
+
})
|
.github/workflows/codespell.disabled
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Codespell configuration is within pyproject.toml
|
| 2 |
+
---
|
| 3 |
+
name: Codespell
|
| 4 |
+
|
| 5 |
+
on:
|
| 6 |
+
push:
|
| 7 |
+
branches: [main]
|
| 8 |
+
pull_request:
|
| 9 |
+
branches: [main]
|
| 10 |
+
|
| 11 |
+
permissions:
|
| 12 |
+
contents: read
|
| 13 |
+
|
| 14 |
+
jobs:
|
| 15 |
+
codespell:
|
| 16 |
+
name: Check for spelling errors
|
| 17 |
+
runs-on: ubuntu-latest
|
| 18 |
+
|
| 19 |
+
steps:
|
| 20 |
+
- name: Checkout
|
| 21 |
+
uses: actions/checkout@v4
|
| 22 |
+
- name: Annotate locations with typos
|
| 23 |
+
uses: codespell-project/codespell-problem-matcher@v1
|
| 24 |
+
- name: Codespell
|
| 25 |
+
uses: codespell-project/actions-codespell@v2
|
.github/workflows/deploy-to-hf-spaces.yml
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Deploy to HuggingFace Spaces
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
push:
|
| 5 |
+
branches:
|
| 6 |
+
- dev
|
| 7 |
+
- main
|
| 8 |
+
workflow_dispatch:
|
| 9 |
+
|
| 10 |
+
jobs:
|
| 11 |
+
check-secret:
|
| 12 |
+
runs-on: ubuntu-latest
|
| 13 |
+
outputs:
|
| 14 |
+
token-set: ${{ steps.check-key.outputs.defined }}
|
| 15 |
+
steps:
|
| 16 |
+
- id: check-key
|
| 17 |
+
env:
|
| 18 |
+
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
| 19 |
+
if: "${{ env.HF_TOKEN != '' }}"
|
| 20 |
+
run: echo "defined=true" >> $GITHUB_OUTPUT
|
| 21 |
+
|
| 22 |
+
deploy:
|
| 23 |
+
runs-on: ubuntu-latest
|
| 24 |
+
needs: [check-secret]
|
| 25 |
+
if: needs.check-secret.outputs.token-set == 'true'
|
| 26 |
+
env:
|
| 27 |
+
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
| 28 |
+
steps:
|
| 29 |
+
- name: Checkout repository
|
| 30 |
+
uses: actions/checkout@v4
|
| 31 |
+
with:
|
| 32 |
+
lfs: true
|
| 33 |
+
|
| 34 |
+
- name: Remove git history
|
| 35 |
+
run: rm -rf .git
|
| 36 |
+
|
| 37 |
+
- name: Prepend YAML front matter to README.md
|
| 38 |
+
run: |
|
| 39 |
+
echo "---" > temp_readme.md
|
| 40 |
+
echo "title: Open WebUI" >> temp_readme.md
|
| 41 |
+
echo "emoji: 🐳" >> temp_readme.md
|
| 42 |
+
echo "colorFrom: purple" >> temp_readme.md
|
| 43 |
+
echo "colorTo: gray" >> temp_readme.md
|
| 44 |
+
echo "sdk: docker" >> temp_readme.md
|
| 45 |
+
echo "app_port: 8080" >> temp_readme.md
|
| 46 |
+
echo "---" >> temp_readme.md
|
| 47 |
+
cat README.md >> temp_readme.md
|
| 48 |
+
mv temp_readme.md README.md
|
| 49 |
+
|
| 50 |
+
- name: Configure git
|
| 51 |
+
run: |
|
| 52 |
+
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
| 53 |
+
git config --global user.name "github-actions[bot]"
|
| 54 |
+
- name: Set up Git and push to Space
|
| 55 |
+
run: |
|
| 56 |
+
git init --initial-branch=main
|
| 57 |
+
git lfs install
|
| 58 |
+
git lfs track "*.ttf"
|
| 59 |
+
git lfs track "*.jpg"
|
| 60 |
+
rm demo.gif
|
| 61 |
+
git add .
|
| 62 |
+
git commit -m "GitHub deploy: ${{ github.sha }}"
|
| 63 |
+
git push --force https://open-webui:${HF_TOKEN}@huggingface.co/spaces/open-webui/open-webui main
|
.github/workflows/docker-build.yaml
ADDED
|
@@ -0,0 +1,477 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Create and publish Docker images with specific build args
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
workflow_dispatch:
|
| 5 |
+
push:
|
| 6 |
+
branches:
|
| 7 |
+
- main
|
| 8 |
+
- dev
|
| 9 |
+
tags:
|
| 10 |
+
- v*
|
| 11 |
+
|
| 12 |
+
env:
|
| 13 |
+
REGISTRY: ghcr.io
|
| 14 |
+
|
| 15 |
+
jobs:
|
| 16 |
+
build-main-image:
|
| 17 |
+
runs-on: ubuntu-latest
|
| 18 |
+
permissions:
|
| 19 |
+
contents: read
|
| 20 |
+
packages: write
|
| 21 |
+
strategy:
|
| 22 |
+
fail-fast: false
|
| 23 |
+
matrix:
|
| 24 |
+
platform:
|
| 25 |
+
- linux/amd64
|
| 26 |
+
- linux/arm64
|
| 27 |
+
|
| 28 |
+
steps:
|
| 29 |
+
# GitHub Packages requires the entire repository name to be in lowercase
|
| 30 |
+
# although the repository owner has a lowercase username, this prevents some people from running actions after forking
|
| 31 |
+
- name: Set repository and image name to lowercase
|
| 32 |
+
run: |
|
| 33 |
+
echo "IMAGE_NAME=${IMAGE_NAME,,}" >>${GITHUB_ENV}
|
| 34 |
+
echo "FULL_IMAGE_NAME=ghcr.io/${IMAGE_NAME,,}" >>${GITHUB_ENV}
|
| 35 |
+
env:
|
| 36 |
+
IMAGE_NAME: '${{ github.repository }}'
|
| 37 |
+
|
| 38 |
+
- name: Prepare
|
| 39 |
+
run: |
|
| 40 |
+
platform=${{ matrix.platform }}
|
| 41 |
+
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
|
| 42 |
+
|
| 43 |
+
- name: Checkout repository
|
| 44 |
+
uses: actions/checkout@v4
|
| 45 |
+
|
| 46 |
+
- name: Set up QEMU
|
| 47 |
+
uses: docker/setup-qemu-action@v3
|
| 48 |
+
|
| 49 |
+
- name: Set up Docker Buildx
|
| 50 |
+
uses: docker/setup-buildx-action@v3
|
| 51 |
+
|
| 52 |
+
- name: Log in to the Container registry
|
| 53 |
+
uses: docker/login-action@v3
|
| 54 |
+
with:
|
| 55 |
+
registry: ${{ env.REGISTRY }}
|
| 56 |
+
username: ${{ github.actor }}
|
| 57 |
+
password: ${{ secrets.GITHUB_TOKEN }}
|
| 58 |
+
|
| 59 |
+
- name: Extract metadata for Docker images (default latest tag)
|
| 60 |
+
id: meta
|
| 61 |
+
uses: docker/metadata-action@v5
|
| 62 |
+
with:
|
| 63 |
+
images: ${{ env.FULL_IMAGE_NAME }}
|
| 64 |
+
tags: |
|
| 65 |
+
type=ref,event=branch
|
| 66 |
+
type=ref,event=tag
|
| 67 |
+
type=sha,prefix=git-
|
| 68 |
+
type=semver,pattern={{version}}
|
| 69 |
+
type=semver,pattern={{major}}.{{minor}}
|
| 70 |
+
flavor: |
|
| 71 |
+
latest=${{ github.ref == 'refs/heads/main' }}
|
| 72 |
+
|
| 73 |
+
- name: Extract metadata for Docker cache
|
| 74 |
+
id: cache-meta
|
| 75 |
+
uses: docker/metadata-action@v5
|
| 76 |
+
with:
|
| 77 |
+
images: ${{ env.FULL_IMAGE_NAME }}
|
| 78 |
+
tags: |
|
| 79 |
+
type=ref,event=branch
|
| 80 |
+
${{ github.ref_type == 'tag' && 'type=raw,value=main' || '' }}
|
| 81 |
+
flavor: |
|
| 82 |
+
prefix=cache-${{ matrix.platform }}-
|
| 83 |
+
latest=false
|
| 84 |
+
|
| 85 |
+
- name: Build Docker image (latest)
|
| 86 |
+
uses: docker/build-push-action@v5
|
| 87 |
+
id: build
|
| 88 |
+
with:
|
| 89 |
+
context: .
|
| 90 |
+
push: true
|
| 91 |
+
platforms: ${{ matrix.platform }}
|
| 92 |
+
labels: ${{ steps.meta.outputs.labels }}
|
| 93 |
+
outputs: type=image,name=${{ env.FULL_IMAGE_NAME }},push-by-digest=true,name-canonical=true,push=true
|
| 94 |
+
cache-from: type=registry,ref=${{ steps.cache-meta.outputs.tags }}
|
| 95 |
+
cache-to: type=registry,ref=${{ steps.cache-meta.outputs.tags }},mode=max
|
| 96 |
+
build-args: |
|
| 97 |
+
BUILD_HASH=${{ github.sha }}
|
| 98 |
+
|
| 99 |
+
- name: Export digest
|
| 100 |
+
run: |
|
| 101 |
+
mkdir -p /tmp/digests
|
| 102 |
+
digest="${{ steps.build.outputs.digest }}"
|
| 103 |
+
touch "/tmp/digests/${digest#sha256:}"
|
| 104 |
+
|
| 105 |
+
- name: Upload digest
|
| 106 |
+
uses: actions/upload-artifact@v4
|
| 107 |
+
with:
|
| 108 |
+
name: digests-main-${{ env.PLATFORM_PAIR }}
|
| 109 |
+
path: /tmp/digests/*
|
| 110 |
+
if-no-files-found: error
|
| 111 |
+
retention-days: 1
|
| 112 |
+
|
| 113 |
+
build-cuda-image:
|
| 114 |
+
runs-on: ubuntu-latest
|
| 115 |
+
permissions:
|
| 116 |
+
contents: read
|
| 117 |
+
packages: write
|
| 118 |
+
strategy:
|
| 119 |
+
fail-fast: false
|
| 120 |
+
matrix:
|
| 121 |
+
platform:
|
| 122 |
+
- linux/amd64
|
| 123 |
+
- linux/arm64
|
| 124 |
+
|
| 125 |
+
steps:
|
| 126 |
+
# GitHub Packages requires the entire repository name to be in lowercase
|
| 127 |
+
# although the repository owner has a lowercase username, this prevents some people from running actions after forking
|
| 128 |
+
- name: Set repository and image name to lowercase
|
| 129 |
+
run: |
|
| 130 |
+
echo "IMAGE_NAME=${IMAGE_NAME,,}" >>${GITHUB_ENV}
|
| 131 |
+
echo "FULL_IMAGE_NAME=ghcr.io/${IMAGE_NAME,,}" >>${GITHUB_ENV}
|
| 132 |
+
env:
|
| 133 |
+
IMAGE_NAME: '${{ github.repository }}'
|
| 134 |
+
|
| 135 |
+
- name: Prepare
|
| 136 |
+
run: |
|
| 137 |
+
platform=${{ matrix.platform }}
|
| 138 |
+
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
|
| 139 |
+
|
| 140 |
+
- name: Checkout repository
|
| 141 |
+
uses: actions/checkout@v4
|
| 142 |
+
|
| 143 |
+
- name: Set up QEMU
|
| 144 |
+
uses: docker/setup-qemu-action@v3
|
| 145 |
+
|
| 146 |
+
- name: Set up Docker Buildx
|
| 147 |
+
uses: docker/setup-buildx-action@v3
|
| 148 |
+
|
| 149 |
+
- name: Log in to the Container registry
|
| 150 |
+
uses: docker/login-action@v3
|
| 151 |
+
with:
|
| 152 |
+
registry: ${{ env.REGISTRY }}
|
| 153 |
+
username: ${{ github.actor }}
|
| 154 |
+
password: ${{ secrets.GITHUB_TOKEN }}
|
| 155 |
+
|
| 156 |
+
- name: Extract metadata for Docker images (cuda tag)
|
| 157 |
+
id: meta
|
| 158 |
+
uses: docker/metadata-action@v5
|
| 159 |
+
with:
|
| 160 |
+
images: ${{ env.FULL_IMAGE_NAME }}
|
| 161 |
+
tags: |
|
| 162 |
+
type=ref,event=branch
|
| 163 |
+
type=ref,event=tag
|
| 164 |
+
type=sha,prefix=git-
|
| 165 |
+
type=semver,pattern={{version}}
|
| 166 |
+
type=semver,pattern={{major}}.{{minor}}
|
| 167 |
+
type=raw,enable=${{ github.ref == 'refs/heads/main' }},prefix=,suffix=,value=cuda
|
| 168 |
+
flavor: |
|
| 169 |
+
latest=${{ github.ref == 'refs/heads/main' }}
|
| 170 |
+
suffix=-cuda,onlatest=true
|
| 171 |
+
|
| 172 |
+
- name: Extract metadata for Docker cache
|
| 173 |
+
id: cache-meta
|
| 174 |
+
uses: docker/metadata-action@v5
|
| 175 |
+
with:
|
| 176 |
+
images: ${{ env.FULL_IMAGE_NAME }}
|
| 177 |
+
tags: |
|
| 178 |
+
type=ref,event=branch
|
| 179 |
+
${{ github.ref_type == 'tag' && 'type=raw,value=main' || '' }}
|
| 180 |
+
flavor: |
|
| 181 |
+
prefix=cache-cuda-${{ matrix.platform }}-
|
| 182 |
+
latest=false
|
| 183 |
+
|
| 184 |
+
- name: Build Docker image (cuda)
|
| 185 |
+
uses: docker/build-push-action@v5
|
| 186 |
+
id: build
|
| 187 |
+
with:
|
| 188 |
+
context: .
|
| 189 |
+
push: true
|
| 190 |
+
platforms: ${{ matrix.platform }}
|
| 191 |
+
labels: ${{ steps.meta.outputs.labels }}
|
| 192 |
+
outputs: type=image,name=${{ env.FULL_IMAGE_NAME }},push-by-digest=true,name-canonical=true,push=true
|
| 193 |
+
cache-from: type=registry,ref=${{ steps.cache-meta.outputs.tags }}
|
| 194 |
+
cache-to: type=registry,ref=${{ steps.cache-meta.outputs.tags }},mode=max
|
| 195 |
+
build-args: |
|
| 196 |
+
BUILD_HASH=${{ github.sha }}
|
| 197 |
+
USE_CUDA=true
|
| 198 |
+
|
| 199 |
+
- name: Export digest
|
| 200 |
+
run: |
|
| 201 |
+
mkdir -p /tmp/digests
|
| 202 |
+
digest="${{ steps.build.outputs.digest }}"
|
| 203 |
+
touch "/tmp/digests/${digest#sha256:}"
|
| 204 |
+
|
| 205 |
+
- name: Upload digest
|
| 206 |
+
uses: actions/upload-artifact@v4
|
| 207 |
+
with:
|
| 208 |
+
name: digests-cuda-${{ env.PLATFORM_PAIR }}
|
| 209 |
+
path: /tmp/digests/*
|
| 210 |
+
if-no-files-found: error
|
| 211 |
+
retention-days: 1
|
| 212 |
+
|
| 213 |
+
build-ollama-image:
|
| 214 |
+
runs-on: ubuntu-latest
|
| 215 |
+
permissions:
|
| 216 |
+
contents: read
|
| 217 |
+
packages: write
|
| 218 |
+
strategy:
|
| 219 |
+
fail-fast: false
|
| 220 |
+
matrix:
|
| 221 |
+
platform:
|
| 222 |
+
- linux/amd64
|
| 223 |
+
- linux/arm64
|
| 224 |
+
|
| 225 |
+
steps:
|
| 226 |
+
# GitHub Packages requires the entire repository name to be in lowercase
|
| 227 |
+
# although the repository owner has a lowercase username, this prevents some people from running actions after forking
|
| 228 |
+
- name: Set repository and image name to lowercase
|
| 229 |
+
run: |
|
| 230 |
+
echo "IMAGE_NAME=${IMAGE_NAME,,}" >>${GITHUB_ENV}
|
| 231 |
+
echo "FULL_IMAGE_NAME=ghcr.io/${IMAGE_NAME,,}" >>${GITHUB_ENV}
|
| 232 |
+
env:
|
| 233 |
+
IMAGE_NAME: '${{ github.repository }}'
|
| 234 |
+
|
| 235 |
+
- name: Prepare
|
| 236 |
+
run: |
|
| 237 |
+
platform=${{ matrix.platform }}
|
| 238 |
+
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
|
| 239 |
+
|
| 240 |
+
- name: Checkout repository
|
| 241 |
+
uses: actions/checkout@v4
|
| 242 |
+
|
| 243 |
+
- name: Set up QEMU
|
| 244 |
+
uses: docker/setup-qemu-action@v3
|
| 245 |
+
|
| 246 |
+
- name: Set up Docker Buildx
|
| 247 |
+
uses: docker/setup-buildx-action@v3
|
| 248 |
+
|
| 249 |
+
- name: Log in to the Container registry
|
| 250 |
+
uses: docker/login-action@v3
|
| 251 |
+
with:
|
| 252 |
+
registry: ${{ env.REGISTRY }}
|
| 253 |
+
username: ${{ github.actor }}
|
| 254 |
+
password: ${{ secrets.GITHUB_TOKEN }}
|
| 255 |
+
|
| 256 |
+
- name: Extract metadata for Docker images (ollama tag)
|
| 257 |
+
id: meta
|
| 258 |
+
uses: docker/metadata-action@v5
|
| 259 |
+
with:
|
| 260 |
+
images: ${{ env.FULL_IMAGE_NAME }}
|
| 261 |
+
tags: |
|
| 262 |
+
type=ref,event=branch
|
| 263 |
+
type=ref,event=tag
|
| 264 |
+
type=sha,prefix=git-
|
| 265 |
+
type=semver,pattern={{version}}
|
| 266 |
+
type=semver,pattern={{major}}.{{minor}}
|
| 267 |
+
type=raw,enable=${{ github.ref == 'refs/heads/main' }},prefix=,suffix=,value=ollama
|
| 268 |
+
flavor: |
|
| 269 |
+
latest=${{ github.ref == 'refs/heads/main' }}
|
| 270 |
+
suffix=-ollama,onlatest=true
|
| 271 |
+
|
| 272 |
+
- name: Extract metadata for Docker cache
|
| 273 |
+
id: cache-meta
|
| 274 |
+
uses: docker/metadata-action@v5
|
| 275 |
+
with:
|
| 276 |
+
images: ${{ env.FULL_IMAGE_NAME }}
|
| 277 |
+
tags: |
|
| 278 |
+
type=ref,event=branch
|
| 279 |
+
${{ github.ref_type == 'tag' && 'type=raw,value=main' || '' }}
|
| 280 |
+
flavor: |
|
| 281 |
+
prefix=cache-ollama-${{ matrix.platform }}-
|
| 282 |
+
latest=false
|
| 283 |
+
|
| 284 |
+
- name: Build Docker image (ollama)
|
| 285 |
+
uses: docker/build-push-action@v5
|
| 286 |
+
id: build
|
| 287 |
+
with:
|
| 288 |
+
context: .
|
| 289 |
+
push: true
|
| 290 |
+
platforms: ${{ matrix.platform }}
|
| 291 |
+
labels: ${{ steps.meta.outputs.labels }}
|
| 292 |
+
outputs: type=image,name=${{ env.FULL_IMAGE_NAME }},push-by-digest=true,name-canonical=true,push=true
|
| 293 |
+
cache-from: type=registry,ref=${{ steps.cache-meta.outputs.tags }}
|
| 294 |
+
cache-to: type=registry,ref=${{ steps.cache-meta.outputs.tags }},mode=max
|
| 295 |
+
build-args: |
|
| 296 |
+
BUILD_HASH=${{ github.sha }}
|
| 297 |
+
USE_OLLAMA=true
|
| 298 |
+
|
| 299 |
+
- name: Export digest
|
| 300 |
+
run: |
|
| 301 |
+
mkdir -p /tmp/digests
|
| 302 |
+
digest="${{ steps.build.outputs.digest }}"
|
| 303 |
+
touch "/tmp/digests/${digest#sha256:}"
|
| 304 |
+
|
| 305 |
+
- name: Upload digest
|
| 306 |
+
uses: actions/upload-artifact@v4
|
| 307 |
+
with:
|
| 308 |
+
name: digests-ollama-${{ env.PLATFORM_PAIR }}
|
| 309 |
+
path: /tmp/digests/*
|
| 310 |
+
if-no-files-found: error
|
| 311 |
+
retention-days: 1
|
| 312 |
+
|
| 313 |
+
merge-main-images:
|
| 314 |
+
runs-on: ubuntu-latest
|
| 315 |
+
needs: [build-main-image]
|
| 316 |
+
steps:
|
| 317 |
+
# GitHub Packages requires the entire repository name to be in lowercase
|
| 318 |
+
# although the repository owner has a lowercase username, this prevents some people from running actions after forking
|
| 319 |
+
- name: Set repository and image name to lowercase
|
| 320 |
+
run: |
|
| 321 |
+
echo "IMAGE_NAME=${IMAGE_NAME,,}" >>${GITHUB_ENV}
|
| 322 |
+
echo "FULL_IMAGE_NAME=ghcr.io/${IMAGE_NAME,,}" >>${GITHUB_ENV}
|
| 323 |
+
env:
|
| 324 |
+
IMAGE_NAME: '${{ github.repository }}'
|
| 325 |
+
|
| 326 |
+
- name: Download digests
|
| 327 |
+
uses: actions/download-artifact@v4
|
| 328 |
+
with:
|
| 329 |
+
pattern: digests-main-*
|
| 330 |
+
path: /tmp/digests
|
| 331 |
+
merge-multiple: true
|
| 332 |
+
|
| 333 |
+
- name: Set up Docker Buildx
|
| 334 |
+
uses: docker/setup-buildx-action@v3
|
| 335 |
+
|
| 336 |
+
- name: Log in to the Container registry
|
| 337 |
+
uses: docker/login-action@v3
|
| 338 |
+
with:
|
| 339 |
+
registry: ${{ env.REGISTRY }}
|
| 340 |
+
username: ${{ github.actor }}
|
| 341 |
+
password: ${{ secrets.GITHUB_TOKEN }}
|
| 342 |
+
|
| 343 |
+
- name: Extract metadata for Docker images (default latest tag)
|
| 344 |
+
id: meta
|
| 345 |
+
uses: docker/metadata-action@v5
|
| 346 |
+
with:
|
| 347 |
+
images: ${{ env.FULL_IMAGE_NAME }}
|
| 348 |
+
tags: |
|
| 349 |
+
type=ref,event=branch
|
| 350 |
+
type=ref,event=tag
|
| 351 |
+
type=sha,prefix=git-
|
| 352 |
+
type=semver,pattern={{version}}
|
| 353 |
+
type=semver,pattern={{major}}.{{minor}}
|
| 354 |
+
flavor: |
|
| 355 |
+
latest=${{ github.ref == 'refs/heads/main' }}
|
| 356 |
+
|
| 357 |
+
- name: Create manifest list and push
|
| 358 |
+
working-directory: /tmp/digests
|
| 359 |
+
run: |
|
| 360 |
+
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
|
| 361 |
+
$(printf '${{ env.FULL_IMAGE_NAME }}@sha256:%s ' *)
|
| 362 |
+
|
| 363 |
+
- name: Inspect image
|
| 364 |
+
run: |
|
| 365 |
+
docker buildx imagetools inspect ${{ env.FULL_IMAGE_NAME }}:${{ steps.meta.outputs.version }}
|
| 366 |
+
|
| 367 |
+
merge-cuda-images:
|
| 368 |
+
runs-on: ubuntu-latest
|
| 369 |
+
needs: [build-cuda-image]
|
| 370 |
+
steps:
|
| 371 |
+
# GitHub Packages requires the entire repository name to be in lowercase
|
| 372 |
+
# although the repository owner has a lowercase username, this prevents some people from running actions after forking
|
| 373 |
+
- name: Set repository and image name to lowercase
|
| 374 |
+
run: |
|
| 375 |
+
echo "IMAGE_NAME=${IMAGE_NAME,,}" >>${GITHUB_ENV}
|
| 376 |
+
echo "FULL_IMAGE_NAME=ghcr.io/${IMAGE_NAME,,}" >>${GITHUB_ENV}
|
| 377 |
+
env:
|
| 378 |
+
IMAGE_NAME: '${{ github.repository }}'
|
| 379 |
+
|
| 380 |
+
- name: Download digests
|
| 381 |
+
uses: actions/download-artifact@v4
|
| 382 |
+
with:
|
| 383 |
+
pattern: digests-cuda-*
|
| 384 |
+
path: /tmp/digests
|
| 385 |
+
merge-multiple: true
|
| 386 |
+
|
| 387 |
+
- name: Set up Docker Buildx
|
| 388 |
+
uses: docker/setup-buildx-action@v3
|
| 389 |
+
|
| 390 |
+
- name: Log in to the Container registry
|
| 391 |
+
uses: docker/login-action@v3
|
| 392 |
+
with:
|
| 393 |
+
registry: ${{ env.REGISTRY }}
|
| 394 |
+
username: ${{ github.actor }}
|
| 395 |
+
password: ${{ secrets.GITHUB_TOKEN }}
|
| 396 |
+
|
| 397 |
+
- name: Extract metadata for Docker images (default latest tag)
|
| 398 |
+
id: meta
|
| 399 |
+
uses: docker/metadata-action@v5
|
| 400 |
+
with:
|
| 401 |
+
images: ${{ env.FULL_IMAGE_NAME }}
|
| 402 |
+
tags: |
|
| 403 |
+
type=ref,event=branch
|
| 404 |
+
type=ref,event=tag
|
| 405 |
+
type=sha,prefix=git-
|
| 406 |
+
type=semver,pattern={{version}}
|
| 407 |
+
type=semver,pattern={{major}}.{{minor}}
|
| 408 |
+
type=raw,enable=${{ github.ref == 'refs/heads/main' }},prefix=,suffix=,value=cuda
|
| 409 |
+
flavor: |
|
| 410 |
+
latest=${{ github.ref == 'refs/heads/main' }}
|
| 411 |
+
suffix=-cuda,onlatest=true
|
| 412 |
+
|
| 413 |
+
- name: Create manifest list and push
|
| 414 |
+
working-directory: /tmp/digests
|
| 415 |
+
run: |
|
| 416 |
+
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
|
| 417 |
+
$(printf '${{ env.FULL_IMAGE_NAME }}@sha256:%s ' *)
|
| 418 |
+
|
| 419 |
+
- name: Inspect image
|
| 420 |
+
run: |
|
| 421 |
+
docker buildx imagetools inspect ${{ env.FULL_IMAGE_NAME }}:${{ steps.meta.outputs.version }}
|
| 422 |
+
|
| 423 |
+
merge-ollama-images:
|
| 424 |
+
runs-on: ubuntu-latest
|
| 425 |
+
needs: [build-ollama-image]
|
| 426 |
+
steps:
|
| 427 |
+
# GitHub Packages requires the entire repository name to be in lowercase
|
| 428 |
+
# although the repository owner has a lowercase username, this prevents some people from running actions after forking
|
| 429 |
+
- name: Set repository and image name to lowercase
|
| 430 |
+
run: |
|
| 431 |
+
echo "IMAGE_NAME=${IMAGE_NAME,,}" >>${GITHUB_ENV}
|
| 432 |
+
echo "FULL_IMAGE_NAME=ghcr.io/${IMAGE_NAME,,}" >>${GITHUB_ENV}
|
| 433 |
+
env:
|
| 434 |
+
IMAGE_NAME: '${{ github.repository }}'
|
| 435 |
+
|
| 436 |
+
- name: Download digests
|
| 437 |
+
uses: actions/download-artifact@v4
|
| 438 |
+
with:
|
| 439 |
+
pattern: digests-ollama-*
|
| 440 |
+
path: /tmp/digests
|
| 441 |
+
merge-multiple: true
|
| 442 |
+
|
| 443 |
+
- name: Set up Docker Buildx
|
| 444 |
+
uses: docker/setup-buildx-action@v3
|
| 445 |
+
|
| 446 |
+
- name: Log in to the Container registry
|
| 447 |
+
uses: docker/login-action@v3
|
| 448 |
+
with:
|
| 449 |
+
registry: ${{ env.REGISTRY }}
|
| 450 |
+
username: ${{ github.actor }}
|
| 451 |
+
password: ${{ secrets.GITHUB_TOKEN }}
|
| 452 |
+
|
| 453 |
+
- name: Extract metadata for Docker images (default ollama tag)
|
| 454 |
+
id: meta
|
| 455 |
+
uses: docker/metadata-action@v5
|
| 456 |
+
with:
|
| 457 |
+
images: ${{ env.FULL_IMAGE_NAME }}
|
| 458 |
+
tags: |
|
| 459 |
+
type=ref,event=branch
|
| 460 |
+
type=ref,event=tag
|
| 461 |
+
type=sha,prefix=git-
|
| 462 |
+
type=semver,pattern={{version}}
|
| 463 |
+
type=semver,pattern={{major}}.{{minor}}
|
| 464 |
+
type=raw,enable=${{ github.ref == 'refs/heads/main' }},prefix=,suffix=,value=ollama
|
| 465 |
+
flavor: |
|
| 466 |
+
latest=${{ github.ref == 'refs/heads/main' }}
|
| 467 |
+
suffix=-ollama,onlatest=true
|
| 468 |
+
|
| 469 |
+
- name: Create manifest list and push
|
| 470 |
+
working-directory: /tmp/digests
|
| 471 |
+
run: |
|
| 472 |
+
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
|
| 473 |
+
$(printf '${{ env.FULL_IMAGE_NAME }}@sha256:%s ' *)
|
| 474 |
+
|
| 475 |
+
- name: Inspect image
|
| 476 |
+
run: |
|
| 477 |
+
docker buildx imagetools inspect ${{ env.FULL_IMAGE_NAME }}:${{ steps.meta.outputs.version }}
|
.github/workflows/format-backend.yaml
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Python CI
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
push:
|
| 5 |
+
branches:
|
| 6 |
+
- main
|
| 7 |
+
- dev
|
| 8 |
+
pull_request:
|
| 9 |
+
branches:
|
| 10 |
+
- main
|
| 11 |
+
- dev
|
| 12 |
+
|
| 13 |
+
jobs:
|
| 14 |
+
build:
|
| 15 |
+
name: 'Format Backend'
|
| 16 |
+
runs-on: ubuntu-latest
|
| 17 |
+
|
| 18 |
+
strategy:
|
| 19 |
+
matrix:
|
| 20 |
+
python-version: [3.11]
|
| 21 |
+
|
| 22 |
+
steps:
|
| 23 |
+
- uses: actions/checkout@v4
|
| 24 |
+
|
| 25 |
+
- name: Set up Python
|
| 26 |
+
uses: actions/setup-python@v5
|
| 27 |
+
with:
|
| 28 |
+
python-version: ${{ matrix.python-version }}
|
| 29 |
+
|
| 30 |
+
- name: Install dependencies
|
| 31 |
+
run: |
|
| 32 |
+
python -m pip install --upgrade pip
|
| 33 |
+
pip install black
|
| 34 |
+
|
| 35 |
+
- name: Format backend
|
| 36 |
+
run: npm run format:backend
|
| 37 |
+
|
| 38 |
+
- name: Check for changes after format
|
| 39 |
+
run: git diff --exit-code
|
.github/workflows/format-build-frontend.yaml
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Frontend Build
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
push:
|
| 5 |
+
branches:
|
| 6 |
+
- main
|
| 7 |
+
- dev
|
| 8 |
+
pull_request:
|
| 9 |
+
branches:
|
| 10 |
+
- main
|
| 11 |
+
- dev
|
| 12 |
+
|
| 13 |
+
jobs:
|
| 14 |
+
build:
|
| 15 |
+
name: 'Format & Build Frontend'
|
| 16 |
+
runs-on: ubuntu-latest
|
| 17 |
+
steps:
|
| 18 |
+
- name: Checkout Repository
|
| 19 |
+
uses: actions/checkout@v4
|
| 20 |
+
|
| 21 |
+
- name: Setup Node.js
|
| 22 |
+
uses: actions/setup-node@v4
|
| 23 |
+
with:
|
| 24 |
+
node-version: '22' # Or specify any other version you want to use
|
| 25 |
+
|
| 26 |
+
- name: Install Dependencies
|
| 27 |
+
run: npm install
|
| 28 |
+
|
| 29 |
+
- name: Format Frontend
|
| 30 |
+
run: npm run format
|
| 31 |
+
|
| 32 |
+
- name: Run i18next
|
| 33 |
+
run: npm run i18n:parse
|
| 34 |
+
|
| 35 |
+
- name: Check for Changes After Format
|
| 36 |
+
run: git diff --exit-code
|
| 37 |
+
|
| 38 |
+
- name: Build Frontend
|
| 39 |
+
run: npm run build
|
| 40 |
+
|
| 41 |
+
test-frontend:
|
| 42 |
+
name: 'Frontend Unit Tests'
|
| 43 |
+
runs-on: ubuntu-latest
|
| 44 |
+
steps:
|
| 45 |
+
- name: Checkout Repository
|
| 46 |
+
uses: actions/checkout@v4
|
| 47 |
+
|
| 48 |
+
- name: Setup Node.js
|
| 49 |
+
uses: actions/setup-node@v4
|
| 50 |
+
with:
|
| 51 |
+
node-version: '22'
|
| 52 |
+
|
| 53 |
+
- name: Install Dependencies
|
| 54 |
+
run: npm ci
|
| 55 |
+
|
| 56 |
+
- name: Run vitest
|
| 57 |
+
run: npm run test:frontend
|
.github/workflows/integration-test.disabled
ADDED
|
@@ -0,0 +1,255 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Integration Test
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
push:
|
| 5 |
+
branches:
|
| 6 |
+
- main
|
| 7 |
+
- dev
|
| 8 |
+
pull_request:
|
| 9 |
+
branches:
|
| 10 |
+
- main
|
| 11 |
+
- dev
|
| 12 |
+
|
| 13 |
+
jobs:
|
| 14 |
+
cypress-run:
|
| 15 |
+
name: Run Cypress Integration Tests
|
| 16 |
+
runs-on: ubuntu-latest
|
| 17 |
+
steps:
|
| 18 |
+
- name: Maximize build space
|
| 19 |
+
uses: AdityaGarg8/remove-unwanted-software@v4.1
|
| 20 |
+
with:
|
| 21 |
+
remove-android: 'true'
|
| 22 |
+
remove-haskell: 'true'
|
| 23 |
+
remove-codeql: 'true'
|
| 24 |
+
|
| 25 |
+
- name: Checkout Repository
|
| 26 |
+
uses: actions/checkout@v4
|
| 27 |
+
|
| 28 |
+
- name: Build and run Compose Stack
|
| 29 |
+
run: |
|
| 30 |
+
docker compose \
|
| 31 |
+
--file docker-compose.yaml \
|
| 32 |
+
--file docker-compose.api.yaml \
|
| 33 |
+
--file docker-compose.a1111-test.yaml \
|
| 34 |
+
up --detach --build
|
| 35 |
+
|
| 36 |
+
- name: Delete Docker build cache
|
| 37 |
+
run: |
|
| 38 |
+
docker builder prune --all --force
|
| 39 |
+
|
| 40 |
+
- name: Wait for Ollama to be up
|
| 41 |
+
timeout-minutes: 5
|
| 42 |
+
run: |
|
| 43 |
+
until curl --output /dev/null --silent --fail http://localhost:11434; do
|
| 44 |
+
printf '.'
|
| 45 |
+
sleep 1
|
| 46 |
+
done
|
| 47 |
+
echo "Service is up!"
|
| 48 |
+
|
| 49 |
+
- name: Preload Ollama model
|
| 50 |
+
run: |
|
| 51 |
+
docker exec ollama ollama pull qwen:0.5b-chat-v1.5-q2_K
|
| 52 |
+
|
| 53 |
+
- name: Cypress run
|
| 54 |
+
uses: cypress-io/github-action@v6
|
| 55 |
+
env:
|
| 56 |
+
LIBGL_ALWAYS_SOFTWARE: 1
|
| 57 |
+
with:
|
| 58 |
+
browser: chrome
|
| 59 |
+
wait-on: 'http://localhost:3000'
|
| 60 |
+
config: baseUrl=http://localhost:3000
|
| 61 |
+
|
| 62 |
+
- uses: actions/upload-artifact@v4
|
| 63 |
+
if: always()
|
| 64 |
+
name: Upload Cypress videos
|
| 65 |
+
with:
|
| 66 |
+
name: cypress-videos
|
| 67 |
+
path: cypress/videos
|
| 68 |
+
if-no-files-found: ignore
|
| 69 |
+
|
| 70 |
+
- name: Extract Compose logs
|
| 71 |
+
if: always()
|
| 72 |
+
run: |
|
| 73 |
+
docker compose logs > compose-logs.txt
|
| 74 |
+
|
| 75 |
+
- uses: actions/upload-artifact@v4
|
| 76 |
+
if: always()
|
| 77 |
+
name: Upload Compose logs
|
| 78 |
+
with:
|
| 79 |
+
name: compose-logs
|
| 80 |
+
path: compose-logs.txt
|
| 81 |
+
if-no-files-found: ignore
|
| 82 |
+
|
| 83 |
+
# pytest:
|
| 84 |
+
# name: Run Backend Tests
|
| 85 |
+
# runs-on: ubuntu-latest
|
| 86 |
+
# steps:
|
| 87 |
+
# - uses: actions/checkout@v4
|
| 88 |
+
|
| 89 |
+
# - name: Set up Python
|
| 90 |
+
# uses: actions/setup-python@v5
|
| 91 |
+
# with:
|
| 92 |
+
# python-version: ${{ matrix.python-version }}
|
| 93 |
+
|
| 94 |
+
# - name: Install dependencies
|
| 95 |
+
# run: |
|
| 96 |
+
# python -m pip install --upgrade pip
|
| 97 |
+
# pip install -r backend/requirements.txt
|
| 98 |
+
|
| 99 |
+
# - name: pytest run
|
| 100 |
+
# run: |
|
| 101 |
+
# ls -al
|
| 102 |
+
# cd backend
|
| 103 |
+
# PYTHONPATH=. pytest . -o log_cli=true -o log_cli_level=INFO
|
| 104 |
+
|
| 105 |
+
migration_test:
|
| 106 |
+
name: Run Migration Tests
|
| 107 |
+
runs-on: ubuntu-latest
|
| 108 |
+
services:
|
| 109 |
+
postgres:
|
| 110 |
+
image: postgres
|
| 111 |
+
env:
|
| 112 |
+
POSTGRES_PASSWORD: postgres
|
| 113 |
+
options: >-
|
| 114 |
+
--health-cmd pg_isready
|
| 115 |
+
--health-interval 10s
|
| 116 |
+
--health-timeout 5s
|
| 117 |
+
--health-retries 5
|
| 118 |
+
ports:
|
| 119 |
+
- 5432:5432
|
| 120 |
+
# mysql:
|
| 121 |
+
# image: mysql
|
| 122 |
+
# env:
|
| 123 |
+
# MYSQL_ROOT_PASSWORD: mysql
|
| 124 |
+
# MYSQL_DATABASE: mysql
|
| 125 |
+
# options: >-
|
| 126 |
+
# --health-cmd "mysqladmin ping -h localhost"
|
| 127 |
+
# --health-interval 10s
|
| 128 |
+
# --health-timeout 5s
|
| 129 |
+
# --health-retries 5
|
| 130 |
+
# ports:
|
| 131 |
+
# - 3306:3306
|
| 132 |
+
steps:
|
| 133 |
+
- name: Checkout Repository
|
| 134 |
+
uses: actions/checkout@v4
|
| 135 |
+
|
| 136 |
+
- name: Set up Python
|
| 137 |
+
uses: actions/setup-python@v5
|
| 138 |
+
with:
|
| 139 |
+
python-version: ${{ matrix.python-version }}
|
| 140 |
+
|
| 141 |
+
- name: Set up uv
|
| 142 |
+
uses: yezz123/setup-uv@v4
|
| 143 |
+
with:
|
| 144 |
+
uv-venv: venv
|
| 145 |
+
|
| 146 |
+
- name: Activate virtualenv
|
| 147 |
+
run: |
|
| 148 |
+
. venv/bin/activate
|
| 149 |
+
echo PATH=$PATH >> $GITHUB_ENV
|
| 150 |
+
|
| 151 |
+
- name: Install dependencies
|
| 152 |
+
run: |
|
| 153 |
+
uv pip install -r backend/requirements.txt
|
| 154 |
+
|
| 155 |
+
- name: Test backend with SQLite
|
| 156 |
+
id: sqlite
|
| 157 |
+
env:
|
| 158 |
+
WEBUI_SECRET_KEY: secret-key
|
| 159 |
+
GLOBAL_LOG_LEVEL: debug
|
| 160 |
+
run: |
|
| 161 |
+
cd backend
|
| 162 |
+
uvicorn open_webui.main:app --port "8080" --forwarded-allow-ips '*' &
|
| 163 |
+
UVICORN_PID=$!
|
| 164 |
+
# Wait up to 40 seconds for the server to start
|
| 165 |
+
for i in {1..40}; do
|
| 166 |
+
curl -s http://localhost:8080/api/config > /dev/null && break
|
| 167 |
+
sleep 1
|
| 168 |
+
if [ $i -eq 40 ]; then
|
| 169 |
+
echo "Server failed to start"
|
| 170 |
+
kill -9 $UVICORN_PID
|
| 171 |
+
exit 1
|
| 172 |
+
fi
|
| 173 |
+
done
|
| 174 |
+
# Check that the server is still running after 5 seconds
|
| 175 |
+
sleep 5
|
| 176 |
+
if ! kill -0 $UVICORN_PID; then
|
| 177 |
+
echo "Server has stopped"
|
| 178 |
+
exit 1
|
| 179 |
+
fi
|
| 180 |
+
|
| 181 |
+
- name: Test backend with Postgres
|
| 182 |
+
if: success() || steps.sqlite.conclusion == 'failure'
|
| 183 |
+
env:
|
| 184 |
+
WEBUI_SECRET_KEY: secret-key
|
| 185 |
+
GLOBAL_LOG_LEVEL: debug
|
| 186 |
+
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/postgres
|
| 187 |
+
DATABASE_POOL_SIZE: 10
|
| 188 |
+
DATABASE_POOL_MAX_OVERFLOW: 10
|
| 189 |
+
DATABASE_POOL_TIMEOUT: 30
|
| 190 |
+
run: |
|
| 191 |
+
cd backend
|
| 192 |
+
uvicorn open_webui.main:app --port "8081" --forwarded-allow-ips '*' &
|
| 193 |
+
UVICORN_PID=$!
|
| 194 |
+
# Wait up to 20 seconds for the server to start
|
| 195 |
+
for i in {1..20}; do
|
| 196 |
+
curl -s http://localhost:8081/api/config > /dev/null && break
|
| 197 |
+
sleep 1
|
| 198 |
+
if [ $i -eq 20 ]; then
|
| 199 |
+
echo "Server failed to start"
|
| 200 |
+
kill -9 $UVICORN_PID
|
| 201 |
+
exit 1
|
| 202 |
+
fi
|
| 203 |
+
done
|
| 204 |
+
# Check that the server is still running after 5 seconds
|
| 205 |
+
sleep 5
|
| 206 |
+
if ! kill -0 $UVICORN_PID; then
|
| 207 |
+
echo "Server has stopped"
|
| 208 |
+
exit 1
|
| 209 |
+
fi
|
| 210 |
+
|
| 211 |
+
# Check that service will reconnect to postgres when connection will be closed
|
| 212 |
+
status_code=$(curl --write-out %{http_code} -s --output /dev/null http://localhost:8081/health/db)
|
| 213 |
+
if [[ "$status_code" -ne 200 ]] ; then
|
| 214 |
+
echo "Server has failed before postgres reconnect check"
|
| 215 |
+
exit 1
|
| 216 |
+
fi
|
| 217 |
+
|
| 218 |
+
echo "Terminating all connections to postgres..."
|
| 219 |
+
python -c "import os, psycopg2 as pg2; \
|
| 220 |
+
conn = pg2.connect(dsn=os.environ['DATABASE_URL'].replace('+pool', '')); \
|
| 221 |
+
cur = conn.cursor(); \
|
| 222 |
+
cur.execute('SELECT pg_terminate_backend(psa.pid) FROM pg_stat_activity psa WHERE datname = current_database() AND pid <> pg_backend_pid();')"
|
| 223 |
+
|
| 224 |
+
status_code=$(curl --write-out %{http_code} -s --output /dev/null http://localhost:8081/health/db)
|
| 225 |
+
if [[ "$status_code" -ne 200 ]] ; then
|
| 226 |
+
echo "Server has not reconnected to postgres after connection was closed: returned status $status_code"
|
| 227 |
+
exit 1
|
| 228 |
+
fi
|
| 229 |
+
|
| 230 |
+
# - name: Test backend with MySQL
|
| 231 |
+
# if: success() || steps.sqlite.conclusion == 'failure' || steps.postgres.conclusion == 'failure'
|
| 232 |
+
# env:
|
| 233 |
+
# WEBUI_SECRET_KEY: secret-key
|
| 234 |
+
# GLOBAL_LOG_LEVEL: debug
|
| 235 |
+
# DATABASE_URL: mysql://root:mysql@localhost:3306/mysql
|
| 236 |
+
# run: |
|
| 237 |
+
# cd backend
|
| 238 |
+
# uvicorn open_webui.main:app --port "8083" --forwarded-allow-ips '*' &
|
| 239 |
+
# UVICORN_PID=$!
|
| 240 |
+
# # Wait up to 20 seconds for the server to start
|
| 241 |
+
# for i in {1..20}; do
|
| 242 |
+
# curl -s http://localhost:8083/api/config > /dev/null && break
|
| 243 |
+
# sleep 1
|
| 244 |
+
# if [ $i -eq 20 ]; then
|
| 245 |
+
# echo "Server failed to start"
|
| 246 |
+
# kill -9 $UVICORN_PID
|
| 247 |
+
# exit 1
|
| 248 |
+
# fi
|
| 249 |
+
# done
|
| 250 |
+
# # Check that the server is still running after 5 seconds
|
| 251 |
+
# sleep 5
|
| 252 |
+
# if ! kill -0 $UVICORN_PID; then
|
| 253 |
+
# echo "Server has stopped"
|
| 254 |
+
# exit 1
|
| 255 |
+
# fi
|
.github/workflows/lint-backend.disabled
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Python CI
|
| 2 |
+
on:
|
| 3 |
+
push:
|
| 4 |
+
branches: ['main']
|
| 5 |
+
pull_request:
|
| 6 |
+
jobs:
|
| 7 |
+
build:
|
| 8 |
+
name: 'Lint Backend'
|
| 9 |
+
env:
|
| 10 |
+
PUBLIC_API_BASE_URL: ''
|
| 11 |
+
runs-on: ubuntu-latest
|
| 12 |
+
strategy:
|
| 13 |
+
matrix:
|
| 14 |
+
node-version:
|
| 15 |
+
- latest
|
| 16 |
+
steps:
|
| 17 |
+
- uses: actions/checkout@v4
|
| 18 |
+
- name: Use Python
|
| 19 |
+
uses: actions/setup-python@v5
|
| 20 |
+
- name: Use Bun
|
| 21 |
+
uses: oven-sh/setup-bun@v1
|
| 22 |
+
- name: Install dependencies
|
| 23 |
+
run: |
|
| 24 |
+
python -m pip install --upgrade pip
|
| 25 |
+
pip install pylint
|
| 26 |
+
- name: Lint backend
|
| 27 |
+
run: bun run lint:backend
|
.github/workflows/lint-frontend.disabled
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Bun CI
|
| 2 |
+
on:
|
| 3 |
+
push:
|
| 4 |
+
branches: ['main']
|
| 5 |
+
pull_request:
|
| 6 |
+
jobs:
|
| 7 |
+
build:
|
| 8 |
+
name: 'Lint Frontend'
|
| 9 |
+
env:
|
| 10 |
+
PUBLIC_API_BASE_URL: ''
|
| 11 |
+
runs-on: ubuntu-latest
|
| 12 |
+
steps:
|
| 13 |
+
- uses: actions/checkout@v4
|
| 14 |
+
- name: Use Bun
|
| 15 |
+
uses: oven-sh/setup-bun@v1
|
| 16 |
+
- run: bun --version
|
| 17 |
+
- name: Install frontend dependencies
|
| 18 |
+
run: bun install --frozen-lockfile
|
| 19 |
+
- run: bun run lint:frontend
|
| 20 |
+
- run: bun run lint:types
|
| 21 |
+
if: success() || failure()
|
.github/workflows/release-pypi.yml
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Release to PyPI
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
push:
|
| 5 |
+
branches:
|
| 6 |
+
- main # or whatever branch you want to use
|
| 7 |
+
- pypi-release
|
| 8 |
+
|
| 9 |
+
jobs:
|
| 10 |
+
release:
|
| 11 |
+
runs-on: ubuntu-latest
|
| 12 |
+
environment:
|
| 13 |
+
name: pypi
|
| 14 |
+
url: https://pypi.org/p/open-webui
|
| 15 |
+
permissions:
|
| 16 |
+
id-token: write
|
| 17 |
+
steps:
|
| 18 |
+
- name: Checkout repository
|
| 19 |
+
uses: actions/checkout@v4
|
| 20 |
+
- uses: actions/setup-node@v4
|
| 21 |
+
with:
|
| 22 |
+
node-version: 22
|
| 23 |
+
- uses: actions/setup-python@v5
|
| 24 |
+
with:
|
| 25 |
+
python-version: 3.11
|
| 26 |
+
- name: Build
|
| 27 |
+
run: |
|
| 28 |
+
python -m pip install --upgrade pip
|
| 29 |
+
pip install build
|
| 30 |
+
python -m build .
|
| 31 |
+
- name: Publish package distributions to PyPI
|
| 32 |
+
uses: pypa/gh-action-pypi-publish@release/v1
|
.gitignore
ADDED
|
@@ -0,0 +1,309 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
.DS_Store
|
| 2 |
+
node_modules
|
| 3 |
+
/build
|
| 4 |
+
/.svelte-kit
|
| 5 |
+
/package
|
| 6 |
+
.env
|
| 7 |
+
.env.*
|
| 8 |
+
!.env.example
|
| 9 |
+
vite.config.js.timestamp-*
|
| 10 |
+
vite.config.ts.timestamp-*
|
| 11 |
+
# Byte-compiled / optimized / DLL files
|
| 12 |
+
__pycache__/
|
| 13 |
+
*.py[cod]
|
| 14 |
+
*$py.class
|
| 15 |
+
|
| 16 |
+
# C extensions
|
| 17 |
+
*.so
|
| 18 |
+
|
| 19 |
+
# Pyodide distribution
|
| 20 |
+
static/pyodide/*
|
| 21 |
+
!static/pyodide/pyodide-lock.json
|
| 22 |
+
|
| 23 |
+
# Distribution / packaging
|
| 24 |
+
.Python
|
| 25 |
+
build/
|
| 26 |
+
develop-eggs/
|
| 27 |
+
dist/
|
| 28 |
+
downloads/
|
| 29 |
+
eggs/
|
| 30 |
+
.eggs/
|
| 31 |
+
lib64/
|
| 32 |
+
parts/
|
| 33 |
+
sdist/
|
| 34 |
+
var/
|
| 35 |
+
wheels/
|
| 36 |
+
share/python-wheels/
|
| 37 |
+
*.egg-info/
|
| 38 |
+
.installed.cfg
|
| 39 |
+
*.egg
|
| 40 |
+
MANIFEST
|
| 41 |
+
|
| 42 |
+
# PyInstaller
|
| 43 |
+
# Usually these files are written by a python script from a template
|
| 44 |
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
| 45 |
+
*.manifest
|
| 46 |
+
*.spec
|
| 47 |
+
|
| 48 |
+
# Installer logs
|
| 49 |
+
pip-log.txt
|
| 50 |
+
pip-delete-this-directory.txt
|
| 51 |
+
|
| 52 |
+
# Unit test / coverage reports
|
| 53 |
+
htmlcov/
|
| 54 |
+
.tox/
|
| 55 |
+
.nox/
|
| 56 |
+
.coverage
|
| 57 |
+
.coverage.*
|
| 58 |
+
.cache
|
| 59 |
+
nosetests.xml
|
| 60 |
+
coverage.xml
|
| 61 |
+
*.cover
|
| 62 |
+
*.py,cover
|
| 63 |
+
.hypothesis/
|
| 64 |
+
.pytest_cache/
|
| 65 |
+
cover/
|
| 66 |
+
|
| 67 |
+
# Translations
|
| 68 |
+
*.mo
|
| 69 |
+
*.pot
|
| 70 |
+
|
| 71 |
+
# Django stuff:
|
| 72 |
+
*.log
|
| 73 |
+
local_settings.py
|
| 74 |
+
db.sqlite3
|
| 75 |
+
db.sqlite3-journal
|
| 76 |
+
|
| 77 |
+
# Flask stuff:
|
| 78 |
+
instance/
|
| 79 |
+
.webassets-cache
|
| 80 |
+
|
| 81 |
+
# Scrapy stuff:
|
| 82 |
+
.scrapy
|
| 83 |
+
|
| 84 |
+
# Sphinx documentation
|
| 85 |
+
docs/_build/
|
| 86 |
+
|
| 87 |
+
# PyBuilder
|
| 88 |
+
.pybuilder/
|
| 89 |
+
target/
|
| 90 |
+
|
| 91 |
+
# Jupyter Notebook
|
| 92 |
+
.ipynb_checkpoints
|
| 93 |
+
|
| 94 |
+
# IPython
|
| 95 |
+
profile_default/
|
| 96 |
+
ipython_config.py
|
| 97 |
+
|
| 98 |
+
# pyenv
|
| 99 |
+
# For a library or package, you might want to ignore these files since the code is
|
| 100 |
+
# intended to run in multiple environments; otherwise, check them in:
|
| 101 |
+
# .python-version
|
| 102 |
+
|
| 103 |
+
# pipenv
|
| 104 |
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
| 105 |
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
| 106 |
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
| 107 |
+
# install all needed dependencies.
|
| 108 |
+
#Pipfile.lock
|
| 109 |
+
|
| 110 |
+
# poetry
|
| 111 |
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
| 112 |
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
| 113 |
+
# commonly ignored for libraries.
|
| 114 |
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
| 115 |
+
#poetry.lock
|
| 116 |
+
|
| 117 |
+
# pdm
|
| 118 |
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
| 119 |
+
#pdm.lock
|
| 120 |
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
| 121 |
+
# in version control.
|
| 122 |
+
# https://pdm.fming.dev/#use-with-ide
|
| 123 |
+
.pdm.toml
|
| 124 |
+
|
| 125 |
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
| 126 |
+
__pypackages__/
|
| 127 |
+
|
| 128 |
+
# Celery stuff
|
| 129 |
+
celerybeat-schedule
|
| 130 |
+
celerybeat.pid
|
| 131 |
+
|
| 132 |
+
# SageMath parsed files
|
| 133 |
+
*.sage.py
|
| 134 |
+
|
| 135 |
+
# Environments
|
| 136 |
+
.env
|
| 137 |
+
.venv
|
| 138 |
+
env/
|
| 139 |
+
venv/
|
| 140 |
+
ENV/
|
| 141 |
+
env.bak/
|
| 142 |
+
venv.bak/
|
| 143 |
+
|
| 144 |
+
# Spyder project settings
|
| 145 |
+
.spyderproject
|
| 146 |
+
.spyproject
|
| 147 |
+
|
| 148 |
+
# Rope project settings
|
| 149 |
+
.ropeproject
|
| 150 |
+
|
| 151 |
+
# mkdocs documentation
|
| 152 |
+
/site
|
| 153 |
+
|
| 154 |
+
# mypy
|
| 155 |
+
.mypy_cache/
|
| 156 |
+
.dmypy.json
|
| 157 |
+
dmypy.json
|
| 158 |
+
|
| 159 |
+
# Pyre type checker
|
| 160 |
+
.pyre/
|
| 161 |
+
|
| 162 |
+
# pytype static type analyzer
|
| 163 |
+
.pytype/
|
| 164 |
+
|
| 165 |
+
# Cython debug symbols
|
| 166 |
+
cython_debug/
|
| 167 |
+
|
| 168 |
+
# PyCharm
|
| 169 |
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
| 170 |
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
| 171 |
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
| 172 |
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
| 173 |
+
.idea/
|
| 174 |
+
|
| 175 |
+
# Logs
|
| 176 |
+
logs
|
| 177 |
+
*.log
|
| 178 |
+
npm-debug.log*
|
| 179 |
+
yarn-debug.log*
|
| 180 |
+
yarn-error.log*
|
| 181 |
+
lerna-debug.log*
|
| 182 |
+
.pnpm-debug.log*
|
| 183 |
+
|
| 184 |
+
# Diagnostic reports (https://nodejs.org/api/report.html)
|
| 185 |
+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
| 186 |
+
|
| 187 |
+
# Runtime data
|
| 188 |
+
pids
|
| 189 |
+
*.pid
|
| 190 |
+
*.seed
|
| 191 |
+
*.pid.lock
|
| 192 |
+
|
| 193 |
+
# Directory for instrumented libs generated by jscoverage/JSCover
|
| 194 |
+
lib-cov
|
| 195 |
+
|
| 196 |
+
# Coverage directory used by tools like istanbul
|
| 197 |
+
coverage
|
| 198 |
+
*.lcov
|
| 199 |
+
|
| 200 |
+
# nyc test coverage
|
| 201 |
+
.nyc_output
|
| 202 |
+
|
| 203 |
+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
|
| 204 |
+
.grunt
|
| 205 |
+
|
| 206 |
+
# Bower dependency directory (https://bower.io/)
|
| 207 |
+
bower_components
|
| 208 |
+
|
| 209 |
+
# node-waf configuration
|
| 210 |
+
.lock-wscript
|
| 211 |
+
|
| 212 |
+
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
| 213 |
+
build/Release
|
| 214 |
+
|
| 215 |
+
# Dependency directories
|
| 216 |
+
node_modules/
|
| 217 |
+
jspm_packages/
|
| 218 |
+
|
| 219 |
+
# Snowpack dependency directory (https://snowpack.dev/)
|
| 220 |
+
web_modules/
|
| 221 |
+
|
| 222 |
+
# TypeScript cache
|
| 223 |
+
*.tsbuildinfo
|
| 224 |
+
|
| 225 |
+
# Optional npm cache directory
|
| 226 |
+
.npm
|
| 227 |
+
|
| 228 |
+
# Optional eslint cache
|
| 229 |
+
.eslintcache
|
| 230 |
+
|
| 231 |
+
# Optional stylelint cache
|
| 232 |
+
.stylelintcache
|
| 233 |
+
|
| 234 |
+
# Microbundle cache
|
| 235 |
+
.rpt2_cache/
|
| 236 |
+
.rts2_cache_cjs/
|
| 237 |
+
.rts2_cache_es/
|
| 238 |
+
.rts2_cache_umd/
|
| 239 |
+
|
| 240 |
+
# Optional REPL history
|
| 241 |
+
.node_repl_history
|
| 242 |
+
|
| 243 |
+
# Output of 'npm pack'
|
| 244 |
+
*.tgz
|
| 245 |
+
|
| 246 |
+
# Yarn Integrity file
|
| 247 |
+
.yarn-integrity
|
| 248 |
+
|
| 249 |
+
# dotenv environment variable files
|
| 250 |
+
.env
|
| 251 |
+
.env.development.local
|
| 252 |
+
.env.test.local
|
| 253 |
+
.env.production.local
|
| 254 |
+
.env.local
|
| 255 |
+
|
| 256 |
+
# parcel-bundler cache (https://parceljs.org/)
|
| 257 |
+
.cache
|
| 258 |
+
.parcel-cache
|
| 259 |
+
|
| 260 |
+
# Next.js build output
|
| 261 |
+
.next
|
| 262 |
+
out
|
| 263 |
+
|
| 264 |
+
# Nuxt.js build / generate output
|
| 265 |
+
.nuxt
|
| 266 |
+
dist
|
| 267 |
+
|
| 268 |
+
# Gatsby files
|
| 269 |
+
.cache/
|
| 270 |
+
# Comment in the public line in if your project uses Gatsby and not Next.js
|
| 271 |
+
# https://nextjs.org/blog/next-9-1#public-directory-support
|
| 272 |
+
# public
|
| 273 |
+
|
| 274 |
+
# vuepress build output
|
| 275 |
+
.vuepress/dist
|
| 276 |
+
|
| 277 |
+
# vuepress v2.x temp and cache directory
|
| 278 |
+
.temp
|
| 279 |
+
.cache
|
| 280 |
+
|
| 281 |
+
# Docusaurus cache and generated files
|
| 282 |
+
.docusaurus
|
| 283 |
+
|
| 284 |
+
# Serverless directories
|
| 285 |
+
.serverless/
|
| 286 |
+
|
| 287 |
+
# FuseBox cache
|
| 288 |
+
.fusebox/
|
| 289 |
+
|
| 290 |
+
# DynamoDB Local files
|
| 291 |
+
.dynamodb/
|
| 292 |
+
|
| 293 |
+
# TernJS port file
|
| 294 |
+
.tern-port
|
| 295 |
+
|
| 296 |
+
# Stores VSCode versions used for testing VSCode extensions
|
| 297 |
+
.vscode-test
|
| 298 |
+
|
| 299 |
+
# yarn v2
|
| 300 |
+
.yarn/cache
|
| 301 |
+
.yarn/unplugged
|
| 302 |
+
.yarn/build-state.yml
|
| 303 |
+
.yarn/install-state.gz
|
| 304 |
+
.pnp.*
|
| 305 |
+
|
| 306 |
+
# cypress artifacts
|
| 307 |
+
cypress/videos
|
| 308 |
+
cypress/screenshots
|
| 309 |
+
.vscode/settings.json
|
.npmrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
engine-strict=true
|
.prettierignore
ADDED
|
@@ -0,0 +1,316 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Ignore files for PNPM, NPM and YARN
|
| 2 |
+
pnpm-lock.yaml
|
| 3 |
+
package-lock.json
|
| 4 |
+
yarn.lock
|
| 5 |
+
|
| 6 |
+
kubernetes/
|
| 7 |
+
|
| 8 |
+
# Copy of .gitignore
|
| 9 |
+
.DS_Store
|
| 10 |
+
node_modules
|
| 11 |
+
/build
|
| 12 |
+
/.svelte-kit
|
| 13 |
+
/package
|
| 14 |
+
.env
|
| 15 |
+
.env.*
|
| 16 |
+
!.env.example
|
| 17 |
+
vite.config.js.timestamp-*
|
| 18 |
+
vite.config.ts.timestamp-*
|
| 19 |
+
# Byte-compiled / optimized / DLL files
|
| 20 |
+
__pycache__/
|
| 21 |
+
*.py[cod]
|
| 22 |
+
*$py.class
|
| 23 |
+
|
| 24 |
+
# C extensions
|
| 25 |
+
*.so
|
| 26 |
+
|
| 27 |
+
# Distribution / packaging
|
| 28 |
+
.Python
|
| 29 |
+
build/
|
| 30 |
+
develop-eggs/
|
| 31 |
+
dist/
|
| 32 |
+
downloads/
|
| 33 |
+
eggs/
|
| 34 |
+
.eggs/
|
| 35 |
+
lib64/
|
| 36 |
+
parts/
|
| 37 |
+
sdist/
|
| 38 |
+
var/
|
| 39 |
+
wheels/
|
| 40 |
+
share/python-wheels/
|
| 41 |
+
*.egg-info/
|
| 42 |
+
.installed.cfg
|
| 43 |
+
*.egg
|
| 44 |
+
MANIFEST
|
| 45 |
+
|
| 46 |
+
# PyInstaller
|
| 47 |
+
# Usually these files are written by a python script from a template
|
| 48 |
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
| 49 |
+
*.manifest
|
| 50 |
+
*.spec
|
| 51 |
+
|
| 52 |
+
# Installer logs
|
| 53 |
+
pip-log.txt
|
| 54 |
+
pip-delete-this-directory.txt
|
| 55 |
+
|
| 56 |
+
# Unit test / coverage reports
|
| 57 |
+
htmlcov/
|
| 58 |
+
.tox/
|
| 59 |
+
.nox/
|
| 60 |
+
.coverage
|
| 61 |
+
.coverage.*
|
| 62 |
+
.cache
|
| 63 |
+
nosetests.xml
|
| 64 |
+
coverage.xml
|
| 65 |
+
*.cover
|
| 66 |
+
*.py,cover
|
| 67 |
+
.hypothesis/
|
| 68 |
+
.pytest_cache/
|
| 69 |
+
cover/
|
| 70 |
+
|
| 71 |
+
# Translations
|
| 72 |
+
*.mo
|
| 73 |
+
*.pot
|
| 74 |
+
|
| 75 |
+
# Django stuff:
|
| 76 |
+
*.log
|
| 77 |
+
local_settings.py
|
| 78 |
+
db.sqlite3
|
| 79 |
+
db.sqlite3-journal
|
| 80 |
+
|
| 81 |
+
# Flask stuff:
|
| 82 |
+
instance/
|
| 83 |
+
.webassets-cache
|
| 84 |
+
|
| 85 |
+
# Scrapy stuff:
|
| 86 |
+
.scrapy
|
| 87 |
+
|
| 88 |
+
# Sphinx documentation
|
| 89 |
+
docs/_build/
|
| 90 |
+
|
| 91 |
+
# PyBuilder
|
| 92 |
+
.pybuilder/
|
| 93 |
+
target/
|
| 94 |
+
|
| 95 |
+
# Jupyter Notebook
|
| 96 |
+
.ipynb_checkpoints
|
| 97 |
+
|
| 98 |
+
# IPython
|
| 99 |
+
profile_default/
|
| 100 |
+
ipython_config.py
|
| 101 |
+
|
| 102 |
+
# pyenv
|
| 103 |
+
# For a library or package, you might want to ignore these files since the code is
|
| 104 |
+
# intended to run in multiple environments; otherwise, check them in:
|
| 105 |
+
# .python-version
|
| 106 |
+
|
| 107 |
+
# pipenv
|
| 108 |
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
| 109 |
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
| 110 |
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
| 111 |
+
# install all needed dependencies.
|
| 112 |
+
#Pipfile.lock
|
| 113 |
+
|
| 114 |
+
# poetry
|
| 115 |
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
| 116 |
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
| 117 |
+
# commonly ignored for libraries.
|
| 118 |
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
| 119 |
+
#poetry.lock
|
| 120 |
+
|
| 121 |
+
# pdm
|
| 122 |
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
| 123 |
+
#pdm.lock
|
| 124 |
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
| 125 |
+
# in version control.
|
| 126 |
+
# https://pdm.fming.dev/#use-with-ide
|
| 127 |
+
.pdm.toml
|
| 128 |
+
|
| 129 |
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
| 130 |
+
__pypackages__/
|
| 131 |
+
|
| 132 |
+
# Celery stuff
|
| 133 |
+
celerybeat-schedule
|
| 134 |
+
celerybeat.pid
|
| 135 |
+
|
| 136 |
+
# SageMath parsed files
|
| 137 |
+
*.sage.py
|
| 138 |
+
|
| 139 |
+
# Environments
|
| 140 |
+
.env
|
| 141 |
+
.venv
|
| 142 |
+
env/
|
| 143 |
+
venv/
|
| 144 |
+
ENV/
|
| 145 |
+
env.bak/
|
| 146 |
+
venv.bak/
|
| 147 |
+
|
| 148 |
+
# Spyder project settings
|
| 149 |
+
.spyderproject
|
| 150 |
+
.spyproject
|
| 151 |
+
|
| 152 |
+
# Rope project settings
|
| 153 |
+
.ropeproject
|
| 154 |
+
|
| 155 |
+
# mkdocs documentation
|
| 156 |
+
/site
|
| 157 |
+
|
| 158 |
+
# mypy
|
| 159 |
+
.mypy_cache/
|
| 160 |
+
.dmypy.json
|
| 161 |
+
dmypy.json
|
| 162 |
+
|
| 163 |
+
# Pyre type checker
|
| 164 |
+
.pyre/
|
| 165 |
+
|
| 166 |
+
# pytype static type analyzer
|
| 167 |
+
.pytype/
|
| 168 |
+
|
| 169 |
+
# Cython debug symbols
|
| 170 |
+
cython_debug/
|
| 171 |
+
|
| 172 |
+
# PyCharm
|
| 173 |
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
| 174 |
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
| 175 |
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
| 176 |
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
| 177 |
+
.idea/
|
| 178 |
+
|
| 179 |
+
# Logs
|
| 180 |
+
logs
|
| 181 |
+
*.log
|
| 182 |
+
npm-debug.log*
|
| 183 |
+
yarn-debug.log*
|
| 184 |
+
yarn-error.log*
|
| 185 |
+
lerna-debug.log*
|
| 186 |
+
.pnpm-debug.log*
|
| 187 |
+
|
| 188 |
+
# Diagnostic reports (https://nodejs.org/api/report.html)
|
| 189 |
+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
| 190 |
+
|
| 191 |
+
# Runtime data
|
| 192 |
+
pids
|
| 193 |
+
*.pid
|
| 194 |
+
*.seed
|
| 195 |
+
*.pid.lock
|
| 196 |
+
|
| 197 |
+
# Directory for instrumented libs generated by jscoverage/JSCover
|
| 198 |
+
lib-cov
|
| 199 |
+
|
| 200 |
+
# Coverage directory used by tools like istanbul
|
| 201 |
+
coverage
|
| 202 |
+
*.lcov
|
| 203 |
+
|
| 204 |
+
# nyc test coverage
|
| 205 |
+
.nyc_output
|
| 206 |
+
|
| 207 |
+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
|
| 208 |
+
.grunt
|
| 209 |
+
|
| 210 |
+
# Bower dependency directory (https://bower.io/)
|
| 211 |
+
bower_components
|
| 212 |
+
|
| 213 |
+
# node-waf configuration
|
| 214 |
+
.lock-wscript
|
| 215 |
+
|
| 216 |
+
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
| 217 |
+
build/Release
|
| 218 |
+
|
| 219 |
+
# Dependency directories
|
| 220 |
+
node_modules/
|
| 221 |
+
jspm_packages/
|
| 222 |
+
|
| 223 |
+
# Snowpack dependency directory (https://snowpack.dev/)
|
| 224 |
+
web_modules/
|
| 225 |
+
|
| 226 |
+
# TypeScript cache
|
| 227 |
+
*.tsbuildinfo
|
| 228 |
+
|
| 229 |
+
# Optional npm cache directory
|
| 230 |
+
.npm
|
| 231 |
+
|
| 232 |
+
# Optional eslint cache
|
| 233 |
+
.eslintcache
|
| 234 |
+
|
| 235 |
+
# Optional stylelint cache
|
| 236 |
+
.stylelintcache
|
| 237 |
+
|
| 238 |
+
# Microbundle cache
|
| 239 |
+
.rpt2_cache/
|
| 240 |
+
.rts2_cache_cjs/
|
| 241 |
+
.rts2_cache_es/
|
| 242 |
+
.rts2_cache_umd/
|
| 243 |
+
|
| 244 |
+
# Optional REPL history
|
| 245 |
+
.node_repl_history
|
| 246 |
+
|
| 247 |
+
# Output of 'npm pack'
|
| 248 |
+
*.tgz
|
| 249 |
+
|
| 250 |
+
# Yarn Integrity file
|
| 251 |
+
.yarn-integrity
|
| 252 |
+
|
| 253 |
+
# dotenv environment variable files
|
| 254 |
+
.env
|
| 255 |
+
.env.development.local
|
| 256 |
+
.env.test.local
|
| 257 |
+
.env.production.local
|
| 258 |
+
.env.local
|
| 259 |
+
|
| 260 |
+
# parcel-bundler cache (https://parceljs.org/)
|
| 261 |
+
.cache
|
| 262 |
+
.parcel-cache
|
| 263 |
+
|
| 264 |
+
# Next.js build output
|
| 265 |
+
.next
|
| 266 |
+
out
|
| 267 |
+
|
| 268 |
+
# Nuxt.js build / generate output
|
| 269 |
+
.nuxt
|
| 270 |
+
dist
|
| 271 |
+
|
| 272 |
+
# Gatsby files
|
| 273 |
+
.cache/
|
| 274 |
+
# Comment in the public line in if your project uses Gatsby and not Next.js
|
| 275 |
+
# https://nextjs.org/blog/next-9-1#public-directory-support
|
| 276 |
+
# public
|
| 277 |
+
|
| 278 |
+
# vuepress build output
|
| 279 |
+
.vuepress/dist
|
| 280 |
+
|
| 281 |
+
# vuepress v2.x temp and cache directory
|
| 282 |
+
.temp
|
| 283 |
+
.cache
|
| 284 |
+
|
| 285 |
+
# Docusaurus cache and generated files
|
| 286 |
+
.docusaurus
|
| 287 |
+
|
| 288 |
+
# Serverless directories
|
| 289 |
+
.serverless/
|
| 290 |
+
|
| 291 |
+
# FuseBox cache
|
| 292 |
+
.fusebox/
|
| 293 |
+
|
| 294 |
+
# DynamoDB Local files
|
| 295 |
+
.dynamodb/
|
| 296 |
+
|
| 297 |
+
# TernJS port file
|
| 298 |
+
.tern-port
|
| 299 |
+
|
| 300 |
+
# Stores VSCode versions used for testing VSCode extensions
|
| 301 |
+
.vscode-test
|
| 302 |
+
|
| 303 |
+
# yarn v2
|
| 304 |
+
.yarn/cache
|
| 305 |
+
.yarn/unplugged
|
| 306 |
+
.yarn/build-state.yml
|
| 307 |
+
.yarn/install-state.gz
|
| 308 |
+
.pnp.*
|
| 309 |
+
|
| 310 |
+
# cypress artifacts
|
| 311 |
+
cypress/videos
|
| 312 |
+
cypress/screenshots
|
| 313 |
+
|
| 314 |
+
|
| 315 |
+
|
| 316 |
+
/static/*
|
.prettierrc
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"useTabs": true,
|
| 3 |
+
"singleQuote": true,
|
| 4 |
+
"trailingComma": "none",
|
| 5 |
+
"printWidth": 100,
|
| 6 |
+
"plugins": ["prettier-plugin-svelte"],
|
| 7 |
+
"pluginSearchDirs": ["."],
|
| 8 |
+
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
|
| 9 |
+
}
|
CHANGELOG.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
CODE_OF_CONDUCT.md
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Contributor Covenant Code of Conduct
|
| 2 |
+
|
| 3 |
+
## Our Pledge
|
| 4 |
+
|
| 5 |
+
As members, contributors, and leaders of this community, we pledge to make participation in our open-source project a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socioeconomic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
| 6 |
+
|
| 7 |
+
We are committed to creating and maintaining an open, respectful, and professional environment where positive contributions and meaningful discussions can flourish. By participating in this project, you agree to uphold these values and align your behavior to the standards outlined in this Code of Conduct.
|
| 8 |
+
|
| 9 |
+
## Why These Standards Are Important
|
| 10 |
+
|
| 11 |
+
Open-source projects rely on a community of volunteers dedicating their time, expertise, and effort toward a shared goal. These projects are inherently collaborative but also fragile, as the success of the project depends on the goodwill, energy, and productivity of those involved.
|
| 12 |
+
|
| 13 |
+
Maintaining a positive and respectful environment is essential to safeguarding the integrity of this project and protecting contributors' efforts. Behavior that disrupts this atmosphere—whether through hostility, entitlement, or unprofessional conduct—can severely harm the morale and productivity of the community. **Strict enforcement of these standards ensures a safe and supportive space for meaningful collaboration.**
|
| 14 |
+
|
| 15 |
+
This is a community where **respect and professionalism are mandatory.** Violations of these standards will result in **zero tolerance** and immediate enforcement to prevent disruption and ensure the well-being of all participants.
|
| 16 |
+
|
| 17 |
+
## Our Standards
|
| 18 |
+
|
| 19 |
+
Examples of behavior that contribute to a positive and professional community include:
|
| 20 |
+
|
| 21 |
+
- **Respecting others.** Be considerate, listen actively, and engage with empathy toward others' viewpoints and experiences.
|
| 22 |
+
- **Constructive feedback.** Provide actionable, thoughtful, and respectful feedback that helps improve the project and encourages collaboration. Avoid unproductive negativity or hypercriticism.
|
| 23 |
+
- **Recognizing volunteer contributions.** Appreciate that contributors dedicate their free time and resources selflessly. Approach them with gratitude and patience.
|
| 24 |
+
- **Focusing on shared goals.** Collaborate in ways that prioritize the health, success, and sustainability of the community over individual agendas.
|
| 25 |
+
|
| 26 |
+
Examples of unacceptable behavior include:
|
| 27 |
+
|
| 28 |
+
- The use of discriminatory, demeaning, or sexualized language or behavior.
|
| 29 |
+
- Personal attacks, derogatory comments, trolling, or inflammatory political or ideological arguments.
|
| 30 |
+
- Harassment, intimidation, or any behavior intended to create a hostile, uncomfortable, or unsafe environment.
|
| 31 |
+
- Publishing others' private information (e.g., physical or email addresses) without explicit permission.
|
| 32 |
+
- **Entitlement, demand, or aggression toward contributors.** Volunteers are under no obligation to provide immediate or personalized support. Rude or dismissive behavior will not be tolerated.
|
| 33 |
+
- **Unproductive or destructive behavior.** This includes venting frustration as hostility ("tantrums"), hypercriticism, attention-seeking negativity, or anything that distracts from the project's goals.
|
| 34 |
+
- **Spamming and promotional exploitation.** Sharing irrelevant product promotions or self-promotion in the community is not allowed unless it directly contributes value to the discussion.
|
| 35 |
+
|
| 36 |
+
### Feedback and Community Engagement
|
| 37 |
+
|
| 38 |
+
- **Constructive feedback is encouraged, but hostile or entitled behavior will result in immediate action.** If you disagree with elements of the project, we encourage you to offer meaningful improvements or fork the project if necessary. Healthy discussions and technical disagreements are welcome only when handled with professionalism.
|
| 39 |
+
- **Respect contributors' time and efforts.** No one is entitled to personalized or on-demand assistance. This is a community built on collaboration and shared effort; demanding or demeaning behavior undermines that trust and will not be allowed.
|
| 40 |
+
|
| 41 |
+
### Zero Tolerance: No Warnings, Immediate Action
|
| 42 |
+
|
| 43 |
+
This community operates under a **zero-tolerance policy.** Any behavior deemed unacceptable under this Code of Conduct will result in **immediate enforcement, without prior warning.**
|
| 44 |
+
|
| 45 |
+
We employ this approach to ensure that unproductive or disruptive behavior does not escalate further or cause unnecessary harm to other contributors. The standards are clear, and violations of any kind—whether mild or severe—will be addressed decisively to protect the community.
|
| 46 |
+
|
| 47 |
+
## Enforcement Responsibilities
|
| 48 |
+
|
| 49 |
+
Community leaders are responsible for upholding and enforcing these standards. They are empowered to take **immediate and appropriate action** to address any behaviors they deem unacceptable under this Code of Conduct. These actions are taken with the goal of protecting the community and preserving its safe, positive, and productive environment.
|
| 50 |
+
|
| 51 |
+
## Scope
|
| 52 |
+
|
| 53 |
+
This Code of Conduct applies to all community spaces, including forums, repositories, social media accounts, and in-person events. It also applies when an individual represents the community in public settings, such as conferences or official communications.
|
| 54 |
+
|
| 55 |
+
Additionally, any behavior outside of these defined spaces that negatively impacts the community or its members may fall within the scope of this Code of Conduct.
|
| 56 |
+
|
| 57 |
+
## Reporting Violations
|
| 58 |
+
|
| 59 |
+
Instances of unacceptable behavior can be reported to the leadership team at **hello@openwebui.com**. Reports will be handled promptly, confidentially, and with consideration for the safety and well-being of the reporter.
|
| 60 |
+
|
| 61 |
+
All community leaders are required to uphold confidentiality and impartiality when addressing reports of violations.
|
| 62 |
+
|
| 63 |
+
## Enforcement Guidelines
|
| 64 |
+
|
| 65 |
+
### Ban
|
| 66 |
+
|
| 67 |
+
**Community Impact**: Community leaders will issue a ban to any participant whose behavior is deemed unacceptable according to this Code of Conduct. Bans are enforced immediately and without prior notice.
|
| 68 |
+
|
| 69 |
+
A ban may be temporary or permanent, depending on the severity of the violation. This includes—but is not limited to—behavior such as:
|
| 70 |
+
|
| 71 |
+
- Harassment or abusive behavior toward contributors.
|
| 72 |
+
- Persistent negativity or hostility that disrupts the collaborative environment.
|
| 73 |
+
- Disrespectful, demanding, or aggressive interactions with others.
|
| 74 |
+
- Attempts to cause harm or sabotage the community.
|
| 75 |
+
|
| 76 |
+
**Consequence**: A banned individual is immediately removed from access to all community spaces, communication channels, and events. Community leaders reserve the right to enforce either a time-limited suspension or a permanent ban based on the specific circumstances of the violation.
|
| 77 |
+
|
| 78 |
+
This approach ensures that disruptive behaviors are addressed swiftly and decisively in order to maintain the integrity and productivity of the community.
|
| 79 |
+
|
| 80 |
+
## Why Zero Tolerance Is Necessary
|
| 81 |
+
|
| 82 |
+
Open-source projects thrive on collaboration, goodwill, and mutual respect. Toxic behaviors—such as entitlement, hostility, or persistent negativity—threaten not just individual contributors but the health of the project as a whole. Allowing such behaviors to persist robs contributors of their time, energy, and enthusiasm for the work they do.
|
| 83 |
+
|
| 84 |
+
By enforcing a zero-tolerance policy, we ensure that the community remains a safe, welcoming space for all participants. These measures are not about harshness—they are about protecting contributors and fostering a productive environment where innovation can thrive.
|
| 85 |
+
|
| 86 |
+
Our expectations are clear, and our enforcement reflects our commitment to this project's long-term success.
|
| 87 |
+
|
| 88 |
+
## Attribution
|
| 89 |
+
|
| 90 |
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0, available at
|
| 91 |
+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
| 92 |
+
|
| 93 |
+
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
|
| 94 |
+
|
| 95 |
+
[homepage]: https://www.contributor-covenant.org
|
| 96 |
+
|
| 97 |
+
For answers to common questions about this code of conduct, see the FAQ at
|
| 98 |
+
https://www.contributor-covenant.org/faq. Translations are available at
|
| 99 |
+
https://www.contributor-covenant.org/translations.
|
Caddyfile.localhost
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Run with
|
| 2 |
+
# caddy run --envfile ./example.env --config ./Caddyfile.localhost
|
| 3 |
+
#
|
| 4 |
+
# This is configured for
|
| 5 |
+
# - Automatic HTTPS (even for localhost)
|
| 6 |
+
# - Reverse Proxying to Ollama API Base URL (http://localhost:11434/api)
|
| 7 |
+
# - CORS
|
| 8 |
+
# - HTTP Basic Auth API Tokens (uncomment basicauth section)
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
# CORS Preflight (OPTIONS) + Request (GET, POST, PATCH, PUT, DELETE)
|
| 12 |
+
(cors-api) {
|
| 13 |
+
@match-cors-api-preflight method OPTIONS
|
| 14 |
+
handle @match-cors-api-preflight {
|
| 15 |
+
header {
|
| 16 |
+
Access-Control-Allow-Origin "{http.request.header.origin}"
|
| 17 |
+
Access-Control-Allow-Methods "GET, POST, PUT, PATCH, DELETE, OPTIONS"
|
| 18 |
+
Access-Control-Allow-Headers "Origin, Accept, Authorization, Content-Type, X-Requested-With"
|
| 19 |
+
Access-Control-Allow-Credentials "true"
|
| 20 |
+
Access-Control-Max-Age "3600"
|
| 21 |
+
defer
|
| 22 |
+
}
|
| 23 |
+
respond "" 204
|
| 24 |
+
}
|
| 25 |
+
|
| 26 |
+
@match-cors-api-request {
|
| 27 |
+
not {
|
| 28 |
+
header Origin "{http.request.scheme}://{http.request.host}"
|
| 29 |
+
}
|
| 30 |
+
header Origin "{http.request.header.origin}"
|
| 31 |
+
}
|
| 32 |
+
handle @match-cors-api-request {
|
| 33 |
+
header {
|
| 34 |
+
Access-Control-Allow-Origin "{http.request.header.origin}"
|
| 35 |
+
Access-Control-Allow-Methods "GET, POST, PUT, PATCH, DELETE, OPTIONS"
|
| 36 |
+
Access-Control-Allow-Headers "Origin, Accept, Authorization, Content-Type, X-Requested-With"
|
| 37 |
+
Access-Control-Allow-Credentials "true"
|
| 38 |
+
Access-Control-Max-Age "3600"
|
| 39 |
+
defer
|
| 40 |
+
}
|
| 41 |
+
}
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
# replace localhost with example.com or whatever
|
| 45 |
+
localhost {
|
| 46 |
+
## HTTP Basic Auth
|
| 47 |
+
## (uncomment to enable)
|
| 48 |
+
# basicauth {
|
| 49 |
+
# # see .example.env for how to generate tokens
|
| 50 |
+
# {env.OLLAMA_API_ID} {env.OLLAMA_API_TOKEN_DIGEST}
|
| 51 |
+
# }
|
| 52 |
+
|
| 53 |
+
handle /api/* {
|
| 54 |
+
# Comment to disable CORS
|
| 55 |
+
import cors-api
|
| 56 |
+
|
| 57 |
+
reverse_proxy localhost:11434
|
| 58 |
+
}
|
| 59 |
+
|
| 60 |
+
# Same-Origin Static Web Server
|
| 61 |
+
file_server {
|
| 62 |
+
root ./build/
|
| 63 |
+
}
|
| 64 |
+
}
|
Dockerfile
ADDED
|
@@ -0,0 +1,176 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# syntax=docker/dockerfile:1
|
| 2 |
+
# Initialize device type args
|
| 3 |
+
# use build args in the docker build command with --build-arg="BUILDARG=true"
|
| 4 |
+
ARG USE_CUDA=false
|
| 5 |
+
ARG USE_OLLAMA=false
|
| 6 |
+
# Tested with cu117 for CUDA 11 and cu121 for CUDA 12 (default)
|
| 7 |
+
ARG USE_CUDA_VER=cu121
|
| 8 |
+
# any sentence transformer model; models to use can be found at https://huggingface.co/models?library=sentence-transformers
|
| 9 |
+
# Leaderboard: https://huggingface.co/spaces/mteb/leaderboard
|
| 10 |
+
# for better performance and multilangauge support use "intfloat/multilingual-e5-large" (~2.5GB) or "intfloat/multilingual-e5-base" (~1.5GB)
|
| 11 |
+
# IMPORTANT: If you change the embedding model (sentence-transformers/all-MiniLM-L6-v2) and vice versa, you aren't able to use RAG Chat with your previous documents loaded in the WebUI! You need to re-embed them.
|
| 12 |
+
ARG USE_EMBEDDING_MODEL=sentence-transformers/all-MiniLM-L6-v2
|
| 13 |
+
ARG USE_RERANKING_MODEL=""
|
| 14 |
+
|
| 15 |
+
# Tiktoken encoding name; models to use can be found at https://huggingface.co/models?library=tiktoken
|
| 16 |
+
ARG USE_TIKTOKEN_ENCODING_NAME="cl100k_base"
|
| 17 |
+
|
| 18 |
+
ARG BUILD_HASH=dev-build
|
| 19 |
+
# Override at your own risk - non-root configurations are untested
|
| 20 |
+
ARG UID=0
|
| 21 |
+
ARG GID=0
|
| 22 |
+
|
| 23 |
+
######## WebUI frontend ########
|
| 24 |
+
FROM --platform=$BUILDPLATFORM node:22-alpine3.20 AS build
|
| 25 |
+
ARG BUILD_HASH
|
| 26 |
+
|
| 27 |
+
WORKDIR /app
|
| 28 |
+
|
| 29 |
+
COPY package.json package-lock.json ./
|
| 30 |
+
RUN npm ci
|
| 31 |
+
|
| 32 |
+
COPY . .
|
| 33 |
+
ENV APP_BUILD_HASH=${BUILD_HASH}
|
| 34 |
+
RUN npm run build
|
| 35 |
+
|
| 36 |
+
######## WebUI backend ########
|
| 37 |
+
FROM python:3.11-slim-bookworm AS base
|
| 38 |
+
|
| 39 |
+
# Use args
|
| 40 |
+
ARG USE_CUDA
|
| 41 |
+
ARG USE_OLLAMA
|
| 42 |
+
ARG USE_CUDA_VER
|
| 43 |
+
ARG USE_EMBEDDING_MODEL
|
| 44 |
+
ARG USE_RERANKING_MODEL
|
| 45 |
+
ARG UID
|
| 46 |
+
ARG GID
|
| 47 |
+
|
| 48 |
+
## Basis ##
|
| 49 |
+
ENV ENV=prod \
|
| 50 |
+
PORT=8080 \
|
| 51 |
+
# pass build args to the build
|
| 52 |
+
USE_OLLAMA_DOCKER=${USE_OLLAMA} \
|
| 53 |
+
USE_CUDA_DOCKER=${USE_CUDA} \
|
| 54 |
+
USE_CUDA_DOCKER_VER=${USE_CUDA_VER} \
|
| 55 |
+
USE_EMBEDDING_MODEL_DOCKER=${USE_EMBEDDING_MODEL} \
|
| 56 |
+
USE_RERANKING_MODEL_DOCKER=${USE_RERANKING_MODEL}
|
| 57 |
+
|
| 58 |
+
## Basis URL Config ##
|
| 59 |
+
ENV OLLAMA_BASE_URL="/ollama" \
|
| 60 |
+
OPENAI_API_BASE_URL=""
|
| 61 |
+
|
| 62 |
+
## API Key and Security Config ##
|
| 63 |
+
ENV OPENAI_API_KEY="" \
|
| 64 |
+
WEBUI_SECRET_KEY="" \
|
| 65 |
+
SCARF_NO_ANALYTICS=true \
|
| 66 |
+
DO_NOT_TRACK=true \
|
| 67 |
+
ANONYMIZED_TELEMETRY=false
|
| 68 |
+
|
| 69 |
+
#### Other models #########################################################
|
| 70 |
+
## whisper TTS model settings ##
|
| 71 |
+
ENV WHISPER_MODEL="base" \
|
| 72 |
+
WHISPER_MODEL_DIR="/app/backend/data/cache/whisper/models"
|
| 73 |
+
|
| 74 |
+
## RAG Embedding model settings ##
|
| 75 |
+
ENV RAG_EMBEDDING_MODEL="$USE_EMBEDDING_MODEL_DOCKER" \
|
| 76 |
+
RAG_RERANKING_MODEL="$USE_RERANKING_MODEL_DOCKER" \
|
| 77 |
+
SENTENCE_TRANSFORMERS_HOME="/app/backend/data/cache/embedding/models"
|
| 78 |
+
|
| 79 |
+
## Tiktoken model settings ##
|
| 80 |
+
ENV TIKTOKEN_ENCODING_NAME="cl100k_base" \
|
| 81 |
+
TIKTOKEN_CACHE_DIR="/app/backend/data/cache/tiktoken"
|
| 82 |
+
|
| 83 |
+
## Hugging Face download cache ##
|
| 84 |
+
ENV HF_HOME="/app/backend/data/cache/embedding/models"
|
| 85 |
+
|
| 86 |
+
## Torch Extensions ##
|
| 87 |
+
# ENV TORCH_EXTENSIONS_DIR="/.cache/torch_extensions"
|
| 88 |
+
|
| 89 |
+
#### Other models ##########################################################
|
| 90 |
+
|
| 91 |
+
WORKDIR /app/backend
|
| 92 |
+
|
| 93 |
+
ENV HOME=/root
|
| 94 |
+
# Create user and group if not root
|
| 95 |
+
RUN if [ $UID -ne 0 ]; then \
|
| 96 |
+
if [ $GID -ne 0 ]; then \
|
| 97 |
+
addgroup --gid $GID app; \
|
| 98 |
+
fi; \
|
| 99 |
+
adduser --uid $UID --gid $GID --home $HOME --disabled-password --no-create-home app; \
|
| 100 |
+
fi
|
| 101 |
+
|
| 102 |
+
RUN mkdir -p $HOME/.cache/chroma
|
| 103 |
+
RUN echo -n 00000000-0000-0000-0000-000000000000 > $HOME/.cache/chroma/telemetry_user_id
|
| 104 |
+
|
| 105 |
+
# Make sure the user has access to the app and root directory
|
| 106 |
+
RUN chown -R $UID:$GID /app $HOME
|
| 107 |
+
|
| 108 |
+
RUN if [ "$USE_OLLAMA" = "true" ]; then \
|
| 109 |
+
apt-get update && \
|
| 110 |
+
# Install pandoc and netcat
|
| 111 |
+
apt-get install -y --no-install-recommends git build-essential pandoc netcat-openbsd curl && \
|
| 112 |
+
apt-get install -y --no-install-recommends gcc python3-dev && \
|
| 113 |
+
# for RAG OCR
|
| 114 |
+
apt-get install -y --no-install-recommends ffmpeg libsm6 libxext6 && \
|
| 115 |
+
# install helper tools
|
| 116 |
+
apt-get install -y --no-install-recommends curl jq && \
|
| 117 |
+
# install ollama
|
| 118 |
+
curl -fsSL https://ollama.com/install.sh | sh && \
|
| 119 |
+
# cleanup
|
| 120 |
+
rm -rf /var/lib/apt/lists/*; \
|
| 121 |
+
else \
|
| 122 |
+
apt-get update && \
|
| 123 |
+
# Install pandoc, netcat and gcc
|
| 124 |
+
apt-get install -y --no-install-recommends git build-essential pandoc gcc netcat-openbsd curl jq && \
|
| 125 |
+
apt-get install -y --no-install-recommends gcc python3-dev && \
|
| 126 |
+
# for RAG OCR
|
| 127 |
+
apt-get install -y --no-install-recommends ffmpeg libsm6 libxext6 && \
|
| 128 |
+
# cleanup
|
| 129 |
+
rm -rf /var/lib/apt/lists/*; \
|
| 130 |
+
fi
|
| 131 |
+
|
| 132 |
+
# install python dependencies
|
| 133 |
+
COPY --chown=$UID:$GID ./backend/requirements.txt ./requirements.txt
|
| 134 |
+
|
| 135 |
+
RUN pip3 install uv && \
|
| 136 |
+
if [ "$USE_CUDA" = "true" ]; then \
|
| 137 |
+
# If you use CUDA the whisper and embedding model will be downloaded on first use
|
| 138 |
+
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/$USE_CUDA_DOCKER_VER --no-cache-dir && \
|
| 139 |
+
uv pip install --system -r requirements.txt --no-cache-dir && \
|
| 140 |
+
python -c "import os; from sentence_transformers import SentenceTransformer; SentenceTransformer(os.environ['RAG_EMBEDDING_MODEL'], device='cpu')" && \
|
| 141 |
+
python -c "import os; from faster_whisper import WhisperModel; WhisperModel(os.environ['WHISPER_MODEL'], device='cpu', compute_type='int8', download_root=os.environ['WHISPER_MODEL_DIR'])"; \
|
| 142 |
+
python -c "import os; import tiktoken; tiktoken.get_encoding(os.environ['TIKTOKEN_ENCODING_NAME'])"; \
|
| 143 |
+
else \
|
| 144 |
+
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu --no-cache-dir && \
|
| 145 |
+
uv pip install --system -r requirements.txt --no-cache-dir && \
|
| 146 |
+
python -c "import os; from sentence_transformers import SentenceTransformer; SentenceTransformer(os.environ['RAG_EMBEDDING_MODEL'], device='cpu')" && \
|
| 147 |
+
python -c "import os; from faster_whisper import WhisperModel; WhisperModel(os.environ['WHISPER_MODEL'], device='cpu', compute_type='int8', download_root=os.environ['WHISPER_MODEL_DIR'])"; \
|
| 148 |
+
python -c "import os; import tiktoken; tiktoken.get_encoding(os.environ['TIKTOKEN_ENCODING_NAME'])"; \
|
| 149 |
+
fi; \
|
| 150 |
+
chown -R $UID:$GID /app/backend/data/
|
| 151 |
+
|
| 152 |
+
|
| 153 |
+
|
| 154 |
+
# copy embedding weight from build
|
| 155 |
+
# RUN mkdir -p /root/.cache/chroma/onnx_models/all-MiniLM-L6-v2
|
| 156 |
+
# COPY --from=build /app/onnx /root/.cache/chroma/onnx_models/all-MiniLM-L6-v2/onnx
|
| 157 |
+
|
| 158 |
+
# copy built frontend files
|
| 159 |
+
COPY --chown=$UID:$GID --from=build /app/build /app/build
|
| 160 |
+
COPY --chown=$UID:$GID --from=build /app/CHANGELOG.md /app/CHANGELOG.md
|
| 161 |
+
COPY --chown=$UID:$GID --from=build /app/package.json /app/package.json
|
| 162 |
+
|
| 163 |
+
# copy backend files
|
| 164 |
+
COPY --chown=$UID:$GID ./backend .
|
| 165 |
+
|
| 166 |
+
EXPOSE 8080
|
| 167 |
+
|
| 168 |
+
HEALTHCHECK CMD curl --silent --fail http://localhost:${PORT:-8080}/health | jq -ne 'input.status == true' || exit 1
|
| 169 |
+
|
| 170 |
+
USER $UID:$GID
|
| 171 |
+
|
| 172 |
+
ARG BUILD_HASH
|
| 173 |
+
ENV WEBUI_BUILD_VERSION=${BUILD_HASH}
|
| 174 |
+
ENV DOCKER=true
|
| 175 |
+
|
| 176 |
+
CMD [ "bash", "start.sh"]
|
INSTALLATION.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
### Installing Both Ollama and Open WebUI Using Kustomize
|
| 2 |
+
|
| 3 |
+
For cpu-only pod
|
| 4 |
+
|
| 5 |
+
```bash
|
| 6 |
+
kubectl apply -f ./kubernetes/manifest/base
|
| 7 |
+
```
|
| 8 |
+
|
| 9 |
+
For gpu-enabled pod
|
| 10 |
+
|
| 11 |
+
```bash
|
| 12 |
+
kubectl apply -k ./kubernetes/manifest
|
| 13 |
+
```
|
| 14 |
+
|
| 15 |
+
### Installing Both Ollama and Open WebUI Using Helm
|
| 16 |
+
|
| 17 |
+
Package Helm file first
|
| 18 |
+
|
| 19 |
+
```bash
|
| 20 |
+
helm package ./kubernetes/helm/
|
| 21 |
+
```
|
| 22 |
+
|
| 23 |
+
For cpu-only pod
|
| 24 |
+
|
| 25 |
+
```bash
|
| 26 |
+
helm install ollama-webui ./ollama-webui-*.tgz
|
| 27 |
+
```
|
| 28 |
+
|
| 29 |
+
For gpu-enabled pod
|
| 30 |
+
|
| 31 |
+
```bash
|
| 32 |
+
helm install ollama-webui ./ollama-webui-*.tgz --set ollama.resources.limits.nvidia.com/gpu="1"
|
| 33 |
+
```
|
| 34 |
+
|
| 35 |
+
Check the `kubernetes/helm/values.yaml` file to know which parameters are available for customization
|
LICENSE
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Copyright (c) 2023-2025 Timothy Jaeryang Baek
|
| 2 |
+
All rights reserved.
|
| 3 |
+
|
| 4 |
+
Redistribution and use in source and binary forms, with or without
|
| 5 |
+
modification, are permitted provided that the following conditions are met:
|
| 6 |
+
|
| 7 |
+
1. Redistributions of source code must retain the above copyright notice, this
|
| 8 |
+
list of conditions and the following disclaimer.
|
| 9 |
+
|
| 10 |
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
| 11 |
+
this list of conditions and the following disclaimer in the documentation
|
| 12 |
+
and/or other materials provided with the distribution.
|
| 13 |
+
|
| 14 |
+
3. Neither the name of the copyright holder nor the names of its
|
| 15 |
+
contributors may be used to endorse or promote products derived from
|
| 16 |
+
this software without specific prior written permission.
|
| 17 |
+
|
| 18 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
| 19 |
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
| 20 |
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
| 21 |
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
| 22 |
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
| 23 |
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
| 24 |
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
| 25 |
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
| 26 |
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| 27 |
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
Makefile
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
ifneq ($(shell which docker-compose 2>/dev/null),)
|
| 3 |
+
DOCKER_COMPOSE := docker-compose
|
| 4 |
+
else
|
| 5 |
+
DOCKER_COMPOSE := docker compose
|
| 6 |
+
endif
|
| 7 |
+
|
| 8 |
+
install:
|
| 9 |
+
$(DOCKER_COMPOSE) up -d
|
| 10 |
+
|
| 11 |
+
remove:
|
| 12 |
+
@chmod +x confirm_remove.sh
|
| 13 |
+
@./confirm_remove.sh
|
| 14 |
+
|
| 15 |
+
start:
|
| 16 |
+
$(DOCKER_COMPOSE) start
|
| 17 |
+
startAndBuild:
|
| 18 |
+
$(DOCKER_COMPOSE) up -d --build
|
| 19 |
+
|
| 20 |
+
stop:
|
| 21 |
+
$(DOCKER_COMPOSE) stop
|
| 22 |
+
|
| 23 |
+
update:
|
| 24 |
+
# Calls the LLM update script
|
| 25 |
+
chmod +x update_ollama_models.sh
|
| 26 |
+
@./update_ollama_models.sh
|
| 27 |
+
@git pull
|
| 28 |
+
$(DOCKER_COMPOSE) down
|
| 29 |
+
# Make sure the ollama-webui container is stopped before rebuilding
|
| 30 |
+
@docker stop open-webui || true
|
| 31 |
+
$(DOCKER_COMPOSE) up --build -d
|
| 32 |
+
$(DOCKER_COMPOSE) start
|
| 33 |
+
|
README.md
ADDED
|
@@ -0,0 +1,228 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Open WebUI 👋
|
| 2 |
+
|
| 3 |
+

|
| 4 |
+

|
| 5 |
+

|
| 6 |
+

|
| 7 |
+

|
| 8 |
+

|
| 9 |
+

|
| 10 |
+

|
| 11 |
+
[](https://discord.gg/5rJgQTnV4s)
|
| 12 |
+
[](https://github.com/sponsors/tjbck)
|
| 13 |
+
|
| 14 |
+
**Open WebUI is an [extensible](https://docs.openwebui.com/features/plugin/), feature-rich, and user-friendly self-hosted AI platform designed to operate entirely offline.** It supports various LLM runners like **Ollama** and **OpenAI-compatible APIs**, with **built-in inference engine** for RAG, making it a **powerful AI deployment solution**.
|
| 15 |
+
|
| 16 |
+

|
| 17 |
+
|
| 18 |
+
> [!TIP]
|
| 19 |
+
> **Looking for an [Enterprise Plan](https://docs.openwebui.com/enterprise)?** – **[Speak with Our Sales Team Today!](mailto:sales@openwebui.com)**
|
| 20 |
+
>
|
| 21 |
+
> Get **enhanced capabilities**, including **custom theming and branding**, **Service Level Agreement (SLA) support**, **Long-Term Support (LTS) versions**, and **more!**
|
| 22 |
+
|
| 23 |
+
For more information, be sure to check out our [Open WebUI Documentation](https://docs.openwebui.com/).
|
| 24 |
+
|
| 25 |
+
## Key Features of Open WebUI ⭐
|
| 26 |
+
|
| 27 |
+
- 🚀 **Effortless Setup**: Install seamlessly using Docker or Kubernetes (kubectl, kustomize or helm) for a hassle-free experience with support for both `:ollama` and `:cuda` tagged images.
|
| 28 |
+
|
| 29 |
+
- 🤝 **Ollama/OpenAI API Integration**: Effortlessly integrate OpenAI-compatible APIs for versatile conversations alongside Ollama models. Customize the OpenAI API URL to link with **LMStudio, GroqCloud, Mistral, OpenRouter, and more**.
|
| 30 |
+
|
| 31 |
+
- 🛡️ **Granular Permissions and User Groups**: By allowing administrators to create detailed user roles and permissions, we ensure a secure user environment. This granularity not only enhances security but also allows for customized user experiences, fostering a sense of ownership and responsibility amongst users.
|
| 32 |
+
|
| 33 |
+
- 📱 **Responsive Design**: Enjoy a seamless experience across Desktop PC, Laptop, and Mobile devices.
|
| 34 |
+
|
| 35 |
+
- 📱 **Progressive Web App (PWA) for Mobile**: Enjoy a native app-like experience on your mobile device with our PWA, providing offline access on localhost and a seamless user interface.
|
| 36 |
+
|
| 37 |
+
- ✒️🔢 **Full Markdown and LaTeX Support**: Elevate your LLM experience with comprehensive Markdown and LaTeX capabilities for enriched interaction.
|
| 38 |
+
|
| 39 |
+
- 🎤📹 **Hands-Free Voice/Video Call**: Experience seamless communication with integrated hands-free voice and video call features, allowing for a more dynamic and interactive chat environment.
|
| 40 |
+
|
| 41 |
+
- 🛠️ **Model Builder**: Easily create Ollama models via the Web UI. Create and add custom characters/agents, customize chat elements, and import models effortlessly through [Open WebUI Community](https://openwebui.com/) integration.
|
| 42 |
+
|
| 43 |
+
- 🐍 **Native Python Function Calling Tool**: Enhance your LLMs with built-in code editor support in the tools workspace. Bring Your Own Function (BYOF) by simply adding your pure Python functions, enabling seamless integration with LLMs.
|
| 44 |
+
|
| 45 |
+
- 📚 **Local RAG Integration**: Dive into the future of chat interactions with groundbreaking Retrieval Augmented Generation (RAG) support. This feature seamlessly integrates document interactions into your chat experience. You can load documents directly into the chat or add files to your document library, effortlessly accessing them using the `#` command before a query.
|
| 46 |
+
|
| 47 |
+
- 🔍 **Web Search for RAG**: Perform web searches using providers like `SearXNG`, `Google PSE`, `Brave Search`, `serpstack`, `serper`, `Serply`, `DuckDuckGo`, `TavilySearch`, `SearchApi` and `Bing` and inject the results directly into your chat experience.
|
| 48 |
+
|
| 49 |
+
- 🌐 **Web Browsing Capability**: Seamlessly integrate websites into your chat experience using the `#` command followed by a URL. This feature allows you to incorporate web content directly into your conversations, enhancing the richness and depth of your interactions.
|
| 50 |
+
|
| 51 |
+
- 🎨 **Image Generation Integration**: Seamlessly incorporate image generation capabilities using options such as AUTOMATIC1111 API or ComfyUI (local), and OpenAI's DALL-E (external), enriching your chat experience with dynamic visual content.
|
| 52 |
+
|
| 53 |
+
- ⚙️ **Many Models Conversations**: Effortlessly engage with various models simultaneously, harnessing their unique strengths for optimal responses. Enhance your experience by leveraging a diverse set of models in parallel.
|
| 54 |
+
|
| 55 |
+
- 🔐 **Role-Based Access Control (RBAC)**: Ensure secure access with restricted permissions; only authorized individuals can access your Ollama, and exclusive model creation/pulling rights are reserved for administrators.
|
| 56 |
+
|
| 57 |
+
- 🌐🌍 **Multilingual Support**: Experience Open WebUI in your preferred language with our internationalization (i18n) support. Join us in expanding our supported languages! We're actively seeking contributors!
|
| 58 |
+
|
| 59 |
+
- 🧩 **Pipelines, Open WebUI Plugin Support**: Seamlessly integrate custom logic and Python libraries into Open WebUI using [Pipelines Plugin Framework](https://github.com/open-webui/pipelines). Launch your Pipelines instance, set the OpenAI URL to the Pipelines URL, and explore endless possibilities. [Examples](https://github.com/open-webui/pipelines/tree/main/examples) include **Function Calling**, User **Rate Limiting** to control access, **Usage Monitoring** with tools like Langfuse, **Live Translation with LibreTranslate** for multilingual support, **Toxic Message Filtering** and much more.
|
| 60 |
+
|
| 61 |
+
- 🌟 **Continuous Updates**: We are committed to improving Open WebUI with regular updates, fixes, and new features.
|
| 62 |
+
|
| 63 |
+
Want to learn more about Open WebUI's features? Check out our [Open WebUI documentation](https://docs.openwebui.com/features) for a comprehensive overview!
|
| 64 |
+
|
| 65 |
+
## 🔗 Also Check Out Open WebUI Community!
|
| 66 |
+
|
| 67 |
+
Don't forget to explore our sibling project, [Open WebUI Community](https://openwebui.com/), where you can discover, download, and explore customized Modelfiles. Open WebUI Community offers a wide range of exciting possibilities for enhancing your chat interactions with Open WebUI! 🚀
|
| 68 |
+
|
| 69 |
+
## How to Install 🚀
|
| 70 |
+
|
| 71 |
+
### Installation via Python pip 🐍
|
| 72 |
+
|
| 73 |
+
Open WebUI can be installed using pip, the Python package installer. Before proceeding, ensure you're using **Python 3.11** to avoid compatibility issues.
|
| 74 |
+
|
| 75 |
+
1. **Install Open WebUI**:
|
| 76 |
+
Open your terminal and run the following command to install Open WebUI:
|
| 77 |
+
|
| 78 |
+
```bash
|
| 79 |
+
pip install open-webui
|
| 80 |
+
```
|
| 81 |
+
|
| 82 |
+
2. **Running Open WebUI**:
|
| 83 |
+
After installation, you can start Open WebUI by executing:
|
| 84 |
+
|
| 85 |
+
```bash
|
| 86 |
+
open-webui serve
|
| 87 |
+
```
|
| 88 |
+
|
| 89 |
+
This will start the Open WebUI server, which you can access at [http://localhost:8080](http://localhost:8080)
|
| 90 |
+
|
| 91 |
+
### Quick Start with Docker 🐳
|
| 92 |
+
|
| 93 |
+
> [!NOTE]
|
| 94 |
+
> Please note that for certain Docker environments, additional configurations might be needed. If you encounter any connection issues, our detailed guide on [Open WebUI Documentation](https://docs.openwebui.com/) is ready to assist you.
|
| 95 |
+
|
| 96 |
+
> [!WARNING]
|
| 97 |
+
> When using Docker to install Open WebUI, make sure to include the `-v open-webui:/app/backend/data` in your Docker command. This step is crucial as it ensures your database is properly mounted and prevents any loss of data.
|
| 98 |
+
|
| 99 |
+
> [!TIP]
|
| 100 |
+
> If you wish to utilize Open WebUI with Ollama included or CUDA acceleration, we recommend utilizing our official images tagged with either `:cuda` or `:ollama`. To enable CUDA, you must install the [Nvidia CUDA container toolkit](https://docs.nvidia.com/dgx/nvidia-container-runtime-upgrade/) on your Linux/WSL system.
|
| 101 |
+
|
| 102 |
+
### Installation with Default Configuration
|
| 103 |
+
|
| 104 |
+
- **If Ollama is on your computer**, use this command:
|
| 105 |
+
|
| 106 |
+
```bash
|
| 107 |
+
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
|
| 108 |
+
```
|
| 109 |
+
|
| 110 |
+
- **If Ollama is on a Different Server**, use this command:
|
| 111 |
+
|
| 112 |
+
To connect to Ollama on another server, change the `OLLAMA_BASE_URL` to the server's URL:
|
| 113 |
+
|
| 114 |
+
```bash
|
| 115 |
+
docker run -d -p 3000:8080 -e OLLAMA_BASE_URL=https://example.com -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main
|
| 116 |
+
```
|
| 117 |
+
|
| 118 |
+
- **To run Open WebUI with Nvidia GPU support**, use this command:
|
| 119 |
+
|
| 120 |
+
```bash
|
| 121 |
+
docker run -d -p 3000:8080 --gpus all --add-host=host.docker.internal:host-gateway -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:cuda
|
| 122 |
+
```
|
| 123 |
+
|
| 124 |
+
### Installation for OpenAI API Usage Only
|
| 125 |
+
|
| 126 |
+
- **If you're only using OpenAI API**, use this command:
|
| 127 |
+
|
| 128 |
+
```bash
|
| 129 |
+
docker run -d -p 3000:8080 -e OPENAI_API_KEY=your_secret_key -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main
|
| 130 |
+
```
|
| 131 |
+
|
| 132 |
+
### Installing Open WebUI with Bundled Ollama Support
|
| 133 |
+
|
| 134 |
+
This installation method uses a single container image that bundles Open WebUI with Ollama, allowing for a streamlined setup via a single command. Choose the appropriate command based on your hardware setup:
|
| 135 |
+
|
| 136 |
+
- **With GPU Support**:
|
| 137 |
+
Utilize GPU resources by running the following command:
|
| 138 |
+
|
| 139 |
+
```bash
|
| 140 |
+
docker run -d -p 3000:8080 --gpus=all -v ollama:/root/.ollama -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:ollama
|
| 141 |
+
```
|
| 142 |
+
|
| 143 |
+
- **For CPU Only**:
|
| 144 |
+
If you're not using a GPU, use this command instead:
|
| 145 |
+
|
| 146 |
+
```bash
|
| 147 |
+
docker run -d -p 3000:8080 -v ollama:/root/.ollama -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:ollama
|
| 148 |
+
```
|
| 149 |
+
|
| 150 |
+
Both commands facilitate a built-in, hassle-free installation of both Open WebUI and Ollama, ensuring that you can get everything up and running swiftly.
|
| 151 |
+
|
| 152 |
+
After installation, you can access Open WebUI at [http://localhost:3000](http://localhost:3000). Enjoy! 😄
|
| 153 |
+
|
| 154 |
+
### Other Installation Methods
|
| 155 |
+
|
| 156 |
+
We offer various installation alternatives, including non-Docker native installation methods, Docker Compose, Kustomize, and Helm. Visit our [Open WebUI Documentation](https://docs.openwebui.com/getting-started/) or join our [Discord community](https://discord.gg/5rJgQTnV4s) for comprehensive guidance.
|
| 157 |
+
|
| 158 |
+
### Troubleshooting
|
| 159 |
+
|
| 160 |
+
Encountering connection issues? Our [Open WebUI Documentation](https://docs.openwebui.com/troubleshooting/) has got you covered. For further assistance and to join our vibrant community, visit the [Open WebUI Discord](https://discord.gg/5rJgQTnV4s).
|
| 161 |
+
|
| 162 |
+
#### Open WebUI: Server Connection Error
|
| 163 |
+
|
| 164 |
+
If you're experiencing connection issues, it’s often due to the WebUI docker container not being able to reach the Ollama server at 127.0.0.1:11434 (host.docker.internal:11434) inside the container . Use the `--network=host` flag in your docker command to resolve this. Note that the port changes from 3000 to 8080, resulting in the link: `http://localhost:8080`.
|
| 165 |
+
|
| 166 |
+
**Example Docker Command**:
|
| 167 |
+
|
| 168 |
+
```bash
|
| 169 |
+
docker run -d --network=host -v open-webui:/app/backend/data -e OLLAMA_BASE_URL=http://127.0.0.1:11434 --name open-webui --restart always ghcr.io/open-webui/open-webui:main
|
| 170 |
+
```
|
| 171 |
+
|
| 172 |
+
### Keeping Your Docker Installation Up-to-Date
|
| 173 |
+
|
| 174 |
+
In case you want to update your local Docker installation to the latest version, you can do it with [Watchtower](https://containrrr.dev/watchtower/):
|
| 175 |
+
|
| 176 |
+
```bash
|
| 177 |
+
docker run --rm --volume /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower --run-once open-webui
|
| 178 |
+
```
|
| 179 |
+
|
| 180 |
+
In the last part of the command, replace `open-webui` with your container name if it is different.
|
| 181 |
+
|
| 182 |
+
Check our Updating Guide available in our [Open WebUI Documentation](https://docs.openwebui.com/getting-started/updating).
|
| 183 |
+
|
| 184 |
+
### Using the Dev Branch 🌙
|
| 185 |
+
|
| 186 |
+
> [!WARNING]
|
| 187 |
+
> The `:dev` branch contains the latest unstable features and changes. Use it at your own risk as it may have bugs or incomplete features.
|
| 188 |
+
|
| 189 |
+
If you want to try out the latest bleeding-edge features and are okay with occasional instability, you can use the `:dev` tag like this:
|
| 190 |
+
|
| 191 |
+
```bash
|
| 192 |
+
docker run -d -p 3000:8080 -v open-webui:/app/backend/data --name open-webui --add-host=host.docker.internal:host-gateway --restart always ghcr.io/open-webui/open-webui:dev
|
| 193 |
+
```
|
| 194 |
+
|
| 195 |
+
### Offline Mode
|
| 196 |
+
|
| 197 |
+
If you are running Open WebUI in an offline environment, you can set the `HF_HUB_OFFLINE` environment variable to `1` to prevent attempts to download models from the internet.
|
| 198 |
+
|
| 199 |
+
```bash
|
| 200 |
+
export HF_HUB_OFFLINE=1
|
| 201 |
+
```
|
| 202 |
+
|
| 203 |
+
## What's Next? 🌟
|
| 204 |
+
|
| 205 |
+
Discover upcoming features on our roadmap in the [Open WebUI Documentation](https://docs.openwebui.com/roadmap/).
|
| 206 |
+
|
| 207 |
+
## License 📜
|
| 208 |
+
|
| 209 |
+
This project is licensed under the [BSD-3-Clause License](LICENSE) - see the [LICENSE](LICENSE) file for details. 📄
|
| 210 |
+
|
| 211 |
+
## Support 💬
|
| 212 |
+
|
| 213 |
+
If you have any questions, suggestions, or need assistance, please open an issue or join our
|
| 214 |
+
[Open WebUI Discord community](https://discord.gg/5rJgQTnV4s) to connect with us! 🤝
|
| 215 |
+
|
| 216 |
+
## Star History
|
| 217 |
+
|
| 218 |
+
<a href="https://star-history.com/#open-webui/open-webui&Date">
|
| 219 |
+
<picture>
|
| 220 |
+
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=open-webui/open-webui&type=Date&theme=dark" />
|
| 221 |
+
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=open-webui/open-webui&type=Date" />
|
| 222 |
+
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=open-webui/open-webui&type=Date" />
|
| 223 |
+
</picture>
|
| 224 |
+
</a>
|
| 225 |
+
|
| 226 |
+
---
|
| 227 |
+
|
| 228 |
+
Created by [Timothy Jaeryang Baek](https://github.com/tjbck) - Let's make Open WebUI even more amazing together! 💪
|
TROUBLESHOOTING.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Open WebUI Troubleshooting Guide
|
| 2 |
+
|
| 3 |
+
## Understanding the Open WebUI Architecture
|
| 4 |
+
|
| 5 |
+
The Open WebUI system is designed to streamline interactions between the client (your browser) and the Ollama API. At the heart of this design is a backend reverse proxy, enhancing security and resolving CORS issues.
|
| 6 |
+
|
| 7 |
+
- **How it Works**: The Open WebUI is designed to interact with the Ollama API through a specific route. When a request is made from the WebUI to Ollama, it is not directly sent to the Ollama API. Initially, the request is sent to the Open WebUI backend via `/ollama` route. From there, the backend is responsible for forwarding the request to the Ollama API. This forwarding is accomplished by using the route specified in the `OLLAMA_BASE_URL` environment variable. Therefore, a request made to `/ollama` in the WebUI is effectively the same as making a request to `OLLAMA_BASE_URL` in the backend. For instance, a request to `/ollama/api/tags` in the WebUI is equivalent to `OLLAMA_BASE_URL/api/tags` in the backend.
|
| 8 |
+
|
| 9 |
+
- **Security Benefits**: This design prevents direct exposure of the Ollama API to the frontend, safeguarding against potential CORS (Cross-Origin Resource Sharing) issues and unauthorized access. Requiring authentication to access the Ollama API further enhances this security layer.
|
| 10 |
+
|
| 11 |
+
## Open WebUI: Server Connection Error
|
| 12 |
+
|
| 13 |
+
If you're experiencing connection issues, it’s often due to the WebUI docker container not being able to reach the Ollama server at 127.0.0.1:11434 (host.docker.internal:11434) inside the container . Use the `--network=host` flag in your docker command to resolve this. Note that the port changes from 3000 to 8080, resulting in the link: `http://localhost:8080`.
|
| 14 |
+
|
| 15 |
+
**Example Docker Command**:
|
| 16 |
+
|
| 17 |
+
```bash
|
| 18 |
+
docker run -d --network=host -v open-webui:/app/backend/data -e OLLAMA_BASE_URL=http://127.0.0.1:11434 --name open-webui --restart always ghcr.io/open-webui/open-webui:main
|
| 19 |
+
```
|
| 20 |
+
|
| 21 |
+
### Error on Slow Responses for Ollama
|
| 22 |
+
|
| 23 |
+
Open WebUI has a default timeout of 5 minutes for Ollama to finish generating the response. If needed, this can be adjusted via the environment variable AIOHTTP_CLIENT_TIMEOUT, which sets the timeout in seconds.
|
| 24 |
+
|
| 25 |
+
### General Connection Errors
|
| 26 |
+
|
| 27 |
+
**Ensure Ollama Version is Up-to-Date**: Always start by checking that you have the latest version of Ollama. Visit [Ollama's official site](https://ollama.com/) for the latest updates.
|
| 28 |
+
|
| 29 |
+
**Troubleshooting Steps**:
|
| 30 |
+
|
| 31 |
+
1. **Verify Ollama URL Format**:
|
| 32 |
+
- When running the Web UI container, ensure the `OLLAMA_BASE_URL` is correctly set. (e.g., `http://192.168.1.1:11434` for different host setups).
|
| 33 |
+
- In the Open WebUI, navigate to "Settings" > "General".
|
| 34 |
+
- Confirm that the Ollama Server URL is correctly set to `[OLLAMA URL]` (e.g., `http://localhost:11434`).
|
| 35 |
+
|
| 36 |
+
By following these enhanced troubleshooting steps, connection issues should be effectively resolved. For further assistance or queries, feel free to reach out to us on our community Discord.
|
confirm_remove.sh
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
echo "Warning: This will remove all containers and volumes, including persistent data. Do you want to continue? [Y/N]"
|
| 3 |
+
read ans
|
| 4 |
+
if [ "$ans" == "Y" ] || [ "$ans" == "y" ]; then
|
| 5 |
+
command docker-compose 2>/dev/null
|
| 6 |
+
if [ "$?" == "0" ]; then
|
| 7 |
+
docker-compose down -v
|
| 8 |
+
else
|
| 9 |
+
docker compose down -v
|
| 10 |
+
fi
|
| 11 |
+
else
|
| 12 |
+
echo "Operation cancelled."
|
| 13 |
+
fi
|
cypress.config.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { defineConfig } from 'cypress';
|
| 2 |
+
|
| 3 |
+
export default defineConfig({
|
| 4 |
+
e2e: {
|
| 5 |
+
baseUrl: 'http://localhost:8080'
|
| 6 |
+
},
|
| 7 |
+
video: true
|
| 8 |
+
});
|
docker-compose.a1111-test.yaml
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# This is an overlay that spins up stable-diffusion-webui for integration testing
|
| 2 |
+
# This is not designed to be used in production
|
| 3 |
+
services:
|
| 4 |
+
stable-diffusion-webui:
|
| 5 |
+
# Not built for ARM64
|
| 6 |
+
platform: linux/amd64
|
| 7 |
+
image: ghcr.io/neggles/sd-webui-docker:latest
|
| 8 |
+
restart: unless-stopped
|
| 9 |
+
environment:
|
| 10 |
+
CLI_ARGS: "--api --use-cpu all --precision full --no-half --skip-torch-cuda-test --ckpt /empty.pt --do-not-download-clip --disable-nan-check --disable-opt-split-attention"
|
| 11 |
+
PYTHONUNBUFFERED: "1"
|
| 12 |
+
TERM: "vt100"
|
| 13 |
+
SD_WEBUI_VARIANT: "default"
|
| 14 |
+
# Hack to get container working on Apple Silicon
|
| 15 |
+
# Rosetta creates a conflict ${HOME}/.cache folder
|
| 16 |
+
entrypoint: /bin/bash
|
| 17 |
+
command:
|
| 18 |
+
- -c
|
| 19 |
+
- |
|
| 20 |
+
export HOME=/root-home
|
| 21 |
+
rm -rf $${HOME}/.cache
|
| 22 |
+
/docker/entrypoint.sh python -u webui.py --listen --port $${WEBUI_PORT} --skip-version-check $${CLI_ARGS}
|
| 23 |
+
volumes:
|
| 24 |
+
- ./test/test_files/image_gen/sd-empty.pt:/empty.pt
|
| 25 |
+
|
| 26 |
+
open-webui:
|
| 27 |
+
environment:
|
| 28 |
+
ENABLE_IMAGE_GENERATION: "true"
|
| 29 |
+
AUTOMATIC1111_BASE_URL: http://stable-diffusion-webui:7860
|
| 30 |
+
IMAGE_SIZE: "64x64"
|
| 31 |
+
IMAGE_STEPS: "3"
|
docker-compose.amdgpu.yaml
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
services:
|
| 2 |
+
ollama:
|
| 3 |
+
devices:
|
| 4 |
+
- /dev/kfd:/dev/kfd
|
| 5 |
+
- /dev/dri:/dev/dri
|
| 6 |
+
image: ollama/ollama:${OLLAMA_DOCKER_TAG-rocm}
|
| 7 |
+
environment:
|
| 8 |
+
- 'HSA_OVERRIDE_GFX_VERSION=${HSA_OVERRIDE_GFX_VERSION-11.0.0}'
|
docker-compose.api.yaml
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
services:
|
| 2 |
+
ollama:
|
| 3 |
+
# Expose Ollama API outside the container stack
|
| 4 |
+
ports:
|
| 5 |
+
- ${OLLAMA_WEBAPI_PORT-11434}:11434
|
docker-compose.data.yaml
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
services:
|
| 2 |
+
ollama:
|
| 3 |
+
volumes:
|
| 4 |
+
- ${OLLAMA_DATA_DIR-./ollama-data}:/root/.ollama
|
docker-compose.gpu.yaml
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
services:
|
| 2 |
+
ollama:
|
| 3 |
+
# GPU support
|
| 4 |
+
deploy:
|
| 5 |
+
resources:
|
| 6 |
+
reservations:
|
| 7 |
+
devices:
|
| 8 |
+
- driver: ${OLLAMA_GPU_DRIVER-nvidia}
|
| 9 |
+
count: ${OLLAMA_GPU_COUNT-1}
|
| 10 |
+
capabilities:
|
| 11 |
+
- gpu
|
docker-compose.playwright.yaml
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
services:
|
| 2 |
+
playwright:
|
| 3 |
+
image: mcr.microsoft.com/playwright:v1.49.1-noble # Version must match requirements.txt
|
| 4 |
+
container_name: playwright
|
| 5 |
+
command: npx -y playwright@1.49.1 run-server --port 3000 --host 0.0.0.0
|
| 6 |
+
|
| 7 |
+
open-webui:
|
| 8 |
+
environment:
|
| 9 |
+
- 'RAG_WEB_LOADER_ENGINE=playwright'
|
| 10 |
+
- 'PLAYWRIGHT_WS_URI=ws://playwright:3000'
|
docker-compose.yaml
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
services:
|
| 2 |
+
ollama:
|
| 3 |
+
volumes:
|
| 4 |
+
- ollama:/root/.ollama
|
| 5 |
+
container_name: ollama
|
| 6 |
+
pull_policy: always
|
| 7 |
+
tty: true
|
| 8 |
+
restart: unless-stopped
|
| 9 |
+
image: ollama/ollama:${OLLAMA_DOCKER_TAG-latest}
|
| 10 |
+
|
| 11 |
+
open-webui:
|
| 12 |
+
build:
|
| 13 |
+
context: .
|
| 14 |
+
args:
|
| 15 |
+
OLLAMA_BASE_URL: '/ollama'
|
| 16 |
+
dockerfile: Dockerfile
|
| 17 |
+
image: ghcr.io/open-webui/open-webui:${WEBUI_DOCKER_TAG-main}
|
| 18 |
+
container_name: open-webui
|
| 19 |
+
volumes:
|
| 20 |
+
- open-webui:/app/backend/data
|
| 21 |
+
depends_on:
|
| 22 |
+
- ollama
|
| 23 |
+
ports:
|
| 24 |
+
- ${OPEN_WEBUI_PORT-3000}:8080
|
| 25 |
+
environment:
|
| 26 |
+
- 'OLLAMA_BASE_URL=http://ollama:11434'
|
| 27 |
+
- 'WEBUI_SECRET_KEY='
|
| 28 |
+
extra_hosts:
|
| 29 |
+
- host.docker.internal:host-gateway
|
| 30 |
+
restart: unless-stopped
|
| 31 |
+
|
| 32 |
+
volumes:
|
| 33 |
+
ollama: {}
|
| 34 |
+
open-webui: {}
|
docs/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Contributing to Open WebUI
|
| 2 |
+
|
| 3 |
+
🚀 **Welcome, Contributors!** 🚀
|
| 4 |
+
|
| 5 |
+
Your interest in contributing to Open WebUI is greatly appreciated. This document is here to guide you through the process, ensuring your contributions enhance the project effectively. Let's make Open WebUI even better, together!
|
| 6 |
+
|
| 7 |
+
## 📌 Key Points
|
| 8 |
+
|
| 9 |
+
### 🦙 Ollama vs. Open WebUI
|
| 10 |
+
|
| 11 |
+
It's crucial to distinguish between Ollama and Open WebUI:
|
| 12 |
+
|
| 13 |
+
- **Open WebUI** focuses on providing an intuitive and responsive web interface for chat interactions.
|
| 14 |
+
- **Ollama** is the underlying technology that powers these interactions.
|
| 15 |
+
|
| 16 |
+
If your issue or contribution pertains directly to the core Ollama technology, please direct it to the appropriate [Ollama project repository](https://ollama.com/). Open WebUI's repository is dedicated to the web interface aspect only.
|
| 17 |
+
|
| 18 |
+
### 🚨 Reporting Issues
|
| 19 |
+
|
| 20 |
+
Noticed something off? Have an idea? Check our [Issues tab](https://github.com/open-webui/open-webui/issues) to see if it's already been reported or suggested. If not, feel free to open a new issue. When reporting an issue, please follow our issue templates. These templates are designed to ensure that all necessary details are provided from the start, enabling us to address your concerns more efficiently.
|
| 21 |
+
|
| 22 |
+
> [!IMPORTANT]
|
| 23 |
+
>
|
| 24 |
+
> - **Template Compliance:** Please be aware that failure to follow the provided issue template, or not providing the requested information at all, will likely result in your issue being closed without further consideration. This approach is critical for maintaining the manageability and integrity of issue tracking.
|
| 25 |
+
> - **Detail is Key:** To ensure your issue is understood and can be effectively addressed, it's imperative to include comprehensive details. Descriptions should be clear, including steps to reproduce, expected outcomes, and actual results. Lack of sufficient detail may hinder our ability to resolve your issue.
|
| 26 |
+
|
| 27 |
+
### 🧭 Scope of Support
|
| 28 |
+
|
| 29 |
+
We've noticed an uptick in issues not directly related to Open WebUI but rather to the environment it's run in, especially Docker setups. While we strive to support Docker deployment, understanding Docker fundamentals is crucial for a smooth experience.
|
| 30 |
+
|
| 31 |
+
- **Docker Deployment Support**: Open WebUI supports Docker deployment. Familiarity with Docker is assumed. For Docker basics, please refer to the [official Docker documentation](https://docs.docker.com/get-started/overview/).
|
| 32 |
+
|
| 33 |
+
- **Advanced Configurations**: Setting up reverse proxies for HTTPS and managing Docker deployments requires foundational knowledge. There are numerous online resources available to learn these skills. Ensuring you have this knowledge will greatly enhance your experience with Open WebUI and similar projects.
|
| 34 |
+
|
| 35 |
+
## 💡 Contributing
|
| 36 |
+
|
| 37 |
+
Looking to contribute? Great! Here's how you can help:
|
| 38 |
+
|
| 39 |
+
### 🛠 Pull Requests
|
| 40 |
+
|
| 41 |
+
We welcome pull requests. Before submitting one, please:
|
| 42 |
+
|
| 43 |
+
1. Open a discussion regarding your ideas [here](https://github.com/open-webui/open-webui/discussions/new/choose).
|
| 44 |
+
2. Follow the project's coding standards and include tests for new features.
|
| 45 |
+
3. Update documentation as necessary.
|
| 46 |
+
4. Write clear, descriptive commit messages.
|
| 47 |
+
5. It's essential to complete your pull request in a timely manner. We move fast, and having PRs hang around too long is not feasible. If you can't get it done within a reasonable time frame, we may have to close it to keep the project moving forward.
|
| 48 |
+
|
| 49 |
+
### 📚 Documentation & Tutorials
|
| 50 |
+
|
| 51 |
+
Help us make Open WebUI more accessible by improving documentation, writing tutorials, or creating guides on setting up and optimizing the web UI.
|
| 52 |
+
|
| 53 |
+
### 🌐 Translations and Internationalization
|
| 54 |
+
|
| 55 |
+
Help us make Open WebUI available to a wider audience. In this section, we'll guide you through the process of adding new translations to the project.
|
| 56 |
+
|
| 57 |
+
We use JSON files to store translations. You can find the existing translation files in the `src/lib/i18n/locales` directory. Each directory corresponds to a specific language, for example, `en-US` for English (US), `fr-FR` for French (France) and so on. You can refer to [ISO 639 Language Codes](http://www.lingoes.net/en/translator/langcode.htm) to find the appropriate code for a specific language.
|
| 58 |
+
|
| 59 |
+
To add a new language:
|
| 60 |
+
|
| 61 |
+
- Create a new directory in the `src/lib/i18n/locales` path with the appropriate language code as its name. For instance, if you're adding translations for Spanish (Spain), create a new directory named `es-ES`.
|
| 62 |
+
- Copy the American English translation file(s) (from `en-US` directory in `src/lib/i18n/locale`) to this new directory and update the string values in JSON format according to your language. Make sure to preserve the structure of the JSON object.
|
| 63 |
+
- Add the language code and its respective title to languages file at `src/lib/i18n/locales/languages.json`.
|
| 64 |
+
|
| 65 |
+
### 🤔 Questions & Feedback
|
| 66 |
+
|
| 67 |
+
Got questions or feedback? Join our [Discord community](https://discord.gg/5rJgQTnV4s) or open an issue. We're here to help!
|
| 68 |
+
|
| 69 |
+
## 🙏 Thank You!
|
| 70 |
+
|
| 71 |
+
Your contributions, big or small, make a significant impact on Open WebUI. We're excited to see what you bring to the project!
|
| 72 |
+
|
| 73 |
+
Together, let's create an even more powerful tool for the community. 🌟
|
docs/README.md
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Project workflow
|
| 2 |
+
|
| 3 |
+
[](https://mermaid.live/edit#pako:eNq1k01rAjEQhv_KkFNLFe1N9iAUevFSRVl6Cci4Gd1ANtlmsmtF_O_N7iqtHxR76ClhMu87zwyZvcicIpEIpo-KbEavGjceC2lL9EFnukQbIGXygNye5y9TY7DAZTpZLsjXXVYXg3dapRM4hh9mu5A7-3hTfSXtAtJK21Tsj8dPl3USmJZkGVbebWNKD2rNOjAYl6HJHYdkNBwNpb3U9aNZvzFNYE6h8tFiSyZzBUGJG4K1dwVwTSYQrCptlLRvLt5dA5i2la5Ruk51Ux0VKQjuxPVbAwuyiuFlNgHfzJ5DoxtgqQf1813gnZRLZ5lAYcD7WT1lpGtiQKug9C4jZrrp-Fd-1-Y1bdzo4dvnZDLz7lPHyj8sOgfg4x84E7RTuEaZt8yRZqtDfgT_rwG2u3Dv_ERPFOQL1Cqu2F5aAClCTgVJkcSrojVWJkgh7SGmYhXcYmczkQRfUU9UZfQ4baRI1miYDl_QqlPg)
|
docs/SECURITY.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Security Policy
|
| 2 |
+
|
| 3 |
+
Our primary goal is to ensure the protection and confidentiality of sensitive data stored by users on open-webui.
|
| 4 |
+
|
| 5 |
+
## Supported Versions
|
| 6 |
+
|
| 7 |
+
| Version | Supported |
|
| 8 |
+
| ------- | ------------------ |
|
| 9 |
+
| main | :white_check_mark: |
|
| 10 |
+
| others | :x: |
|
| 11 |
+
|
| 12 |
+
## Zero Tolerance for External Platforms
|
| 13 |
+
|
| 14 |
+
Based on a precedent of an unacceptable degree of spamming and unsolicited communications from third-party platforms, we forcefully reaffirm our stance. **We refuse to engage with, join, or monitor any platforms outside of GitHub for vulnerability reporting.** Our reasons are not just procedural but are deep-seated in the ethos of our project, which champions transparency and direct community interaction inherent in the open-source culture. Any attempts to divert our processes to external platforms will be met with outright rejection. This policy is non-negotiable and understands no exceptions.
|
| 15 |
+
|
| 16 |
+
Any reports or solicitations arriving from sources other than our designated GitHub repository will be dismissed without consideration. We’ve seen how external engagements can dilute and compromise the integrity of community-driven projects, and we’re not here to gamble with the security and privacy of our user community.
|
| 17 |
+
|
| 18 |
+
## Reporting a Vulnerability
|
| 19 |
+
|
| 20 |
+
We appreciate the community's interest in identifying potential vulnerabilities. However, effective immediately, we will **not** accept low-effort vulnerability reports. To ensure that submissions are constructive and actionable, please adhere to the following guidelines:
|
| 21 |
+
|
| 22 |
+
Reports not submitted through our designated GitHub repository will be disregarded, and we will categorically reject invitations to collaborate on external platforms. Our aggressive stance on this matter underscores our commitment to a secure, transparent, and open community where all operations are visible and contributors are accountable.
|
| 23 |
+
|
| 24 |
+
1. **No Vague Reports**: Submissions such as "I found a vulnerability" without any details will be treated as spam and will not be accepted.
|
| 25 |
+
|
| 26 |
+
2. **In-Depth Understanding Required**: Reports must reflect a clear understanding of the codebase and provide specific details about the vulnerability, including the affected components and potential impacts.
|
| 27 |
+
|
| 28 |
+
3. **Proof of Concept (PoC) is Mandatory**: Each submission must include a well-documented proof of concept (PoC) that demonstrates the vulnerability. If confidentiality is a concern, reporters are encouraged to create a private fork of the repository and share access with the maintainers. Reports lacking valid evidence will be disregarded.
|
| 29 |
+
|
| 30 |
+
4. **Required Patch Submission**: Along with the PoC, reporters must provide a patch or actionable steps to remediate the identified vulnerability. This helps us evaluate and implement fixes rapidly.
|
| 31 |
+
|
| 32 |
+
5. **Streamlined Merging Process**: When vulnerability reports meet the above criteria, we can consider them for immediate merging, similar to regular pull requests. Well-structured and thorough submissions will expedite the process of enhancing our security.
|
| 33 |
+
|
| 34 |
+
**Non-compliant submissions will be closed, and repeat violators may be banned.** Our goal is to foster a constructive reporting environment where quality submissions promote better security for all users.
|
| 35 |
+
|
| 36 |
+
## Product Security
|
| 37 |
+
|
| 38 |
+
We regularly audit our internal processes and system architecture for vulnerabilities using a combination of automated and manual testing techniques. We are also planning to implement SAST and SCA scans in our project soon.
|
| 39 |
+
|
| 40 |
+
For immediate concerns or detailed reports that meet our guidelines, please create an issue in our [issue tracker](/open-webui/open-webui/issues) or contact us on [Discord](https://discord.gg/5rJgQTnV4s).
|
| 41 |
+
|
| 42 |
+
---
|
| 43 |
+
|
| 44 |
+
_Last updated on **2024-08-19**._
|
docs/apache.md
ADDED
|
@@ -0,0 +1,205 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Hosting UI and Models separately
|
| 2 |
+
|
| 3 |
+
Sometimes, its beneficial to host Ollama, separate from the UI, but retain the RAG and RBAC support features shared across users:
|
| 4 |
+
|
| 5 |
+
# Open WebUI Configuration
|
| 6 |
+
|
| 7 |
+
## UI Configuration
|
| 8 |
+
|
| 9 |
+
For the UI configuration, you can set up the Apache VirtualHost as follows:
|
| 10 |
+
|
| 11 |
+
```
|
| 12 |
+
# Assuming you have a website hosting this UI at "server.com"
|
| 13 |
+
<VirtualHost 192.168.1.100:80>
|
| 14 |
+
ServerName server.com
|
| 15 |
+
DocumentRoot /home/server/public_html
|
| 16 |
+
|
| 17 |
+
ProxyPass / http://server.com:3000/ nocanon
|
| 18 |
+
ProxyPassReverse / http://server.com:3000/
|
| 19 |
+
# Needed after 0.5
|
| 20 |
+
ProxyPass / ws://server.com:3000/ nocanon
|
| 21 |
+
ProxyPassReverse / ws://server.com:3000/
|
| 22 |
+
|
| 23 |
+
</VirtualHost>
|
| 24 |
+
```
|
| 25 |
+
|
| 26 |
+
Enable the site first before you can request SSL:
|
| 27 |
+
|
| 28 |
+
`a2ensite server.com.conf` # this will enable the site. a2ensite is short for "Apache 2 Enable Site"
|
| 29 |
+
|
| 30 |
+
```
|
| 31 |
+
# For SSL
|
| 32 |
+
<VirtualHost 192.168.1.100:443>
|
| 33 |
+
ServerName server.com
|
| 34 |
+
DocumentRoot /home/server/public_html
|
| 35 |
+
|
| 36 |
+
ProxyPass / http://server.com:3000/ nocanon
|
| 37 |
+
ProxyPassReverse / http://server.com:3000/
|
| 38 |
+
# Needed after 0.5
|
| 39 |
+
ProxyPass / ws://server.com:3000/ nocanon
|
| 40 |
+
ProxyPassReverse / ws://server.com:3000/
|
| 41 |
+
|
| 42 |
+
SSLEngine on
|
| 43 |
+
SSLCertificateFile /etc/ssl/virtualmin/170514456861234/ssl.cert
|
| 44 |
+
SSLCertificateKeyFile /etc/ssl/virtualmin/170514456861234/ssl.key
|
| 45 |
+
SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
|
| 46 |
+
|
| 47 |
+
SSLProxyEngine on
|
| 48 |
+
SSLCACertificateFile /etc/ssl/virtualmin/170514456865864/ssl.ca
|
| 49 |
+
</VirtualHost>
|
| 50 |
+
|
| 51 |
+
```
|
| 52 |
+
|
| 53 |
+
I'm using virtualmin here for my SSL clusters, but you can also use certbot directly or your preferred SSL method. To use SSL:
|
| 54 |
+
|
| 55 |
+
### Prerequisites.
|
| 56 |
+
|
| 57 |
+
Run the following commands:
|
| 58 |
+
|
| 59 |
+
`snap install certbot --classic`
|
| 60 |
+
`snap apt install python3-certbot-apache` (this will install the apache plugin).
|
| 61 |
+
|
| 62 |
+
Navigate to the apache sites-available directory:
|
| 63 |
+
|
| 64 |
+
`cd /etc/apache2/sites-available/`
|
| 65 |
+
|
| 66 |
+
Create server.com.conf if it is not yet already created, containing the above `<virtualhost>` configuration (it should match your case. Modify as necessary). Use the one without the SSL:
|
| 67 |
+
|
| 68 |
+
Once it's created, run `certbot --apache -d server.com`, this will request and add/create an SSL keys for you as well as create the server.com.le-ssl.conf
|
| 69 |
+
|
| 70 |
+
# Configuring Ollama Server
|
| 71 |
+
|
| 72 |
+
On your latest installation of Ollama, make sure that you have setup your api server from the official Ollama reference:
|
| 73 |
+
|
| 74 |
+
[Ollama FAQ](https://github.com/jmorganca/ollama/blob/main/docs/faq.md)
|
| 75 |
+
|
| 76 |
+
### TL;DR
|
| 77 |
+
|
| 78 |
+
The guide doesn't seem to match the current updated service file on linux. So, we will address it here:
|
| 79 |
+
|
| 80 |
+
Unless when you're compiling Ollama from source, installing with the standard install `curl https://ollama.com/install.sh | sh` creates a file called `ollama.service` in /etc/systemd/system. You can use nano to edit the file:
|
| 81 |
+
|
| 82 |
+
```
|
| 83 |
+
sudo nano /etc/systemd/system/ollama.service
|
| 84 |
+
```
|
| 85 |
+
|
| 86 |
+
Add the following lines:
|
| 87 |
+
|
| 88 |
+
```
|
| 89 |
+
Environment="OLLAMA_HOST=0.0.0.0:11434" # this line is mandatory. You can also specify
|
| 90 |
+
```
|
| 91 |
+
|
| 92 |
+
For instance:
|
| 93 |
+
|
| 94 |
+
```
|
| 95 |
+
[Unit]
|
| 96 |
+
Description=Ollama Service
|
| 97 |
+
After=network-online.target
|
| 98 |
+
|
| 99 |
+
[Service]
|
| 100 |
+
ExecStart=/usr/local/bin/ollama serve
|
| 101 |
+
Environment="OLLAMA_HOST=0.0.0.0:11434" # this line is mandatory. You can also specify 192.168.254.109:DIFFERENT_PORT, format
|
| 102 |
+
Environment="OLLAMA_ORIGINS=http://192.168.254.106:11434,https://models.server.city" # this line is optional
|
| 103 |
+
User=ollama
|
| 104 |
+
Group=ollama
|
| 105 |
+
Restart=always
|
| 106 |
+
RestartSec=3
|
| 107 |
+
Environment="PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/s>
|
| 108 |
+
|
| 109 |
+
[Install]
|
| 110 |
+
WantedBy=default.target
|
| 111 |
+
```
|
| 112 |
+
|
| 113 |
+
Save the file by pressing CTRL+S, then press CTRL+X
|
| 114 |
+
|
| 115 |
+
When your computer restarts, the Ollama server will now be listening on the IP:PORT you specified, in this case 0.0.0.0:11434, or 192.168.254.106:11434 (whatever your local IP address is). Make sure that your router is correctly configured to serve pages from that local IP by forwarding 11434 to your local IP server.
|
| 116 |
+
|
| 117 |
+
# Ollama Model Configuration
|
| 118 |
+
|
| 119 |
+
## For the Ollama model configuration, use the following Apache VirtualHost setup:
|
| 120 |
+
|
| 121 |
+
Navigate to the apache sites-available directory:
|
| 122 |
+
|
| 123 |
+
`cd /etc/apache2/sites-available/`
|
| 124 |
+
|
| 125 |
+
`nano models.server.city.conf` # match this with your ollama server domain
|
| 126 |
+
|
| 127 |
+
Add the following virtualhost containing this example (modify as needed):
|
| 128 |
+
|
| 129 |
+
```
|
| 130 |
+
|
| 131 |
+
# Assuming you have a website hosting this UI at "models.server.city"
|
| 132 |
+
<IfModule mod_ssl.c>
|
| 133 |
+
<VirtualHost 192.168.254.109:443>
|
| 134 |
+
DocumentRoot "/var/www/html/"
|
| 135 |
+
ServerName models.server.city
|
| 136 |
+
<Directory "/var/www/html/">
|
| 137 |
+
Options None
|
| 138 |
+
Require all granted
|
| 139 |
+
</Directory>
|
| 140 |
+
|
| 141 |
+
ProxyRequests Off
|
| 142 |
+
ProxyPreserveHost On
|
| 143 |
+
ProxyAddHeaders On
|
| 144 |
+
SSLProxyEngine on
|
| 145 |
+
|
| 146 |
+
ProxyPass / http://server.city:1000/ nocanon # or port 11434
|
| 147 |
+
ProxyPassReverse / http://server.city:1000/ # or port 11434
|
| 148 |
+
|
| 149 |
+
SSLCertificateFile /etc/letsencrypt/live/models.server.city/fullchain.pem
|
| 150 |
+
SSLCertificateKeyFile /etc/letsencrypt/live/models.server.city/privkey.pem
|
| 151 |
+
Include /etc/letsencrypt/options-ssl-apache.conf
|
| 152 |
+
</VirtualHost>
|
| 153 |
+
</IfModule>
|
| 154 |
+
```
|
| 155 |
+
|
| 156 |
+
You may need to enable the site first (if you haven't done so yet) before you can request SSL:
|
| 157 |
+
|
| 158 |
+
`a2ensite models.server.city.conf`
|
| 159 |
+
|
| 160 |
+
#### For the SSL part of Ollama server
|
| 161 |
+
|
| 162 |
+
Run the following commands:
|
| 163 |
+
|
| 164 |
+
Navigate to the apache sites-available directory:
|
| 165 |
+
|
| 166 |
+
`cd /etc/apache2/sites-available/`
|
| 167 |
+
`certbot --apache -d server.com`
|
| 168 |
+
|
| 169 |
+
```
|
| 170 |
+
<VirtualHost 192.168.254.109:80>
|
| 171 |
+
DocumentRoot "/var/www/html/"
|
| 172 |
+
ServerName models.server.city
|
| 173 |
+
<Directory "/var/www/html/">
|
| 174 |
+
Options None
|
| 175 |
+
Require all granted
|
| 176 |
+
</Directory>
|
| 177 |
+
|
| 178 |
+
ProxyRequests Off
|
| 179 |
+
ProxyPreserveHost On
|
| 180 |
+
ProxyAddHeaders On
|
| 181 |
+
SSLProxyEngine on
|
| 182 |
+
|
| 183 |
+
ProxyPass / http://server.city:1000/ nocanon # or port 11434
|
| 184 |
+
ProxyPassReverse / http://server.city:1000/ # or port 11434
|
| 185 |
+
|
| 186 |
+
RewriteEngine on
|
| 187 |
+
RewriteCond %{SERVER_NAME} =models.server.city
|
| 188 |
+
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
|
| 189 |
+
</VirtualHost>
|
| 190 |
+
|
| 191 |
+
```
|
| 192 |
+
|
| 193 |
+
Don't forget to restart/reload Apache with `systemctl reload apache2`
|
| 194 |
+
|
| 195 |
+
Open your site at https://server.com!
|
| 196 |
+
|
| 197 |
+
**Congratulations**, your _**Open-AI-like Chat-GPT style UI**_ is now serving AI with RAG, RBAC and multimodal features! Download Ollama models if you haven't yet done so!
|
| 198 |
+
|
| 199 |
+
If you encounter any misconfiguration or errors, please file an issue or engage with our discussion. There are a lot of friendly developers here to assist you.
|
| 200 |
+
|
| 201 |
+
Let's make this UI much more user friendly for everyone!
|
| 202 |
+
|
| 203 |
+
Thanks for making open-webui your UI Choice for AI!
|
| 204 |
+
|
| 205 |
+
This doc is made by **Bob Reyes**, your **Open-WebUI** fan from the Philippines.
|
hatch_build.py
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# noqa: INP001
|
| 2 |
+
import os
|
| 3 |
+
import shutil
|
| 4 |
+
import subprocess
|
| 5 |
+
from sys import stderr
|
| 6 |
+
|
| 7 |
+
from hatchling.builders.hooks.plugin.interface import BuildHookInterface
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
class CustomBuildHook(BuildHookInterface):
|
| 11 |
+
def initialize(self, version, build_data):
|
| 12 |
+
super().initialize(version, build_data)
|
| 13 |
+
stderr.write(">>> Building Open Webui frontend\n")
|
| 14 |
+
npm = shutil.which("npm")
|
| 15 |
+
if npm is None:
|
| 16 |
+
raise RuntimeError(
|
| 17 |
+
"NodeJS `npm` is required for building Open Webui but it was not found"
|
| 18 |
+
)
|
| 19 |
+
stderr.write("### npm install\n")
|
| 20 |
+
subprocess.run([npm, "install"], check=True) # noqa: S603
|
| 21 |
+
stderr.write("\n### npm run build\n")
|
| 22 |
+
os.environ["APP_BUILD_HASH"] = version
|
| 23 |
+
subprocess.run([npm, "run", "build"], check=True) # noqa: S603
|
i18next-parser.config.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// i18next-parser.config.ts
|
| 2 |
+
import { getLanguages } from './src/lib/i18n/index.ts';
|
| 3 |
+
|
| 4 |
+
const getLangCodes = async () => {
|
| 5 |
+
const languages = await getLanguages();
|
| 6 |
+
return languages.map((l) => l.code);
|
| 7 |
+
};
|
| 8 |
+
|
| 9 |
+
export default {
|
| 10 |
+
contextSeparator: '_',
|
| 11 |
+
createOldCatalogs: false,
|
| 12 |
+
defaultNamespace: 'translation',
|
| 13 |
+
defaultValue: '',
|
| 14 |
+
indentation: 2,
|
| 15 |
+
keepRemoved: false,
|
| 16 |
+
keySeparator: false,
|
| 17 |
+
lexers: {
|
| 18 |
+
svelte: ['JavascriptLexer'],
|
| 19 |
+
js: ['JavascriptLexer'],
|
| 20 |
+
ts: ['JavascriptLexer'],
|
| 21 |
+
|
| 22 |
+
default: ['JavascriptLexer']
|
| 23 |
+
},
|
| 24 |
+
lineEnding: 'auto',
|
| 25 |
+
locales: await getLangCodes(),
|
| 26 |
+
namespaceSeparator: false,
|
| 27 |
+
output: 'src/lib/i18n/locales/$LOCALE/$NAMESPACE.json',
|
| 28 |
+
pluralSeparator: '_',
|
| 29 |
+
input: 'src/**/*.{js,svelte}',
|
| 30 |
+
sort: true,
|
| 31 |
+
verbose: true,
|
| 32 |
+
failOnWarnings: false,
|
| 33 |
+
failOnUpdate: false,
|
| 34 |
+
customValueTemplate: null,
|
| 35 |
+
resetDefaultValueLocale: null,
|
| 36 |
+
i18nextOptions: null,
|
| 37 |
+
yamlOptions: null
|
| 38 |
+
};
|
kubernetes/helm/README.md
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Helm Charts
|
| 2 |
+
Open WebUI Helm Charts are now hosted in a separate repo, which can be found here: https://github.com/open-webui/helm-charts
|
| 3 |
+
|
| 4 |
+
The charts are released at https://helm.openwebui.com.
|
package-lock.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|