Modify the code to allow the docker container to start in an offline environment for versions >= 0.4.0.
backend/open_webui/retrieval/utils.py
Import OFFLINE_MODE from open_webui.env.
Set local_files_only to True when OFFLINE_MODE is enabled in snapshot_kwargs.
backend/open_webui/env.py
Add logic to set HF_HUB_OFFLINE environment variable to 1 when OFFLINE_MODE is enabled.
README.md
Document setting HF_HUB_OFFLINE environment variable to 1 for offline environments.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/open-webui/open-webui/pull/8184
**Author:** [@vishwamartur](https://github.com/vishwamartur)
**Created:** 12/29/2024
**Status:** ✅ Merged
**Merged:** 12/29/2024
**Merged by:** [@tjbck](https://github.com/tjbck)
**Base:** `dev` ← **Head:** `fix-offline-docker`
---
### 📝 Commits (1)
- [`00e6ffe`](https://github.com/open-webui/open-webui/commit/00e6ffe83c3f1d6383fee03f1d8162e6052d34f4) Fix offline docker container startup issue
### 📊 Changes
**3 files changed** (+15 additions, -1 deletions)
<details>
<summary>View changed files</summary>
📝 `README.md` (+8 -0)
📝 `backend/open_webui/env.py` (+3 -0)
📝 `backend/open_webui/retrieval/utils.py` (+4 -1)
</details>
### 📄 Description
Related to #7207
Modify the code to allow the docker container to start in an offline environment for versions >= 0.4.0.
* **backend/open_webui/retrieval/utils.py**
- Import `OFFLINE_MODE` from `open_webui.env`.
- Set `local_files_only` to `True` when `OFFLINE_MODE` is enabled in `snapshot_kwargs`.
* **backend/open_webui/env.py**
- Add logic to set `HF_HUB_OFFLINE` environment variable to `1` when `OFFLINE_MODE` is enabled.
* **README.md**
- Document setting `HF_HUB_OFFLINE` environment variable to `1` for offline environments.
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/8184
Author: @vishwamartur
Created: 12/29/2024
Status: ✅ Merged
Merged: 12/29/2024
Merged by: @tjbck
Base:
dev← Head:fix-offline-docker📝 Commits (1)
00e6ffeFix offline docker container startup issue📊 Changes
3 files changed (+15 additions, -1 deletions)
View changed files
📝
README.md(+8 -0)📝
backend/open_webui/env.py(+3 -0)📝
backend/open_webui/retrieval/utils.py(+4 -1)📄 Description
Related to #7207
Modify the code to allow the docker container to start in an offline environment for versions >= 0.4.0.
backend/open_webui/retrieval/utils.py
OFFLINE_MODEfromopen_webui.env.local_files_onlytoTruewhenOFFLINE_MODEis enabled insnapshot_kwargs.backend/open_webui/env.py
HF_HUB_OFFLINEenvironment variable to1whenOFFLINE_MODEis enabled.README.md
HF_HUB_OFFLINEenvironment variable to1for offline environments.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.