mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-16 03:47:49 +01:00
Fix offline docker container startup issue
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.
This commit is contained in:
@@ -392,3 +392,6 @@ else:
|
||||
####################################
|
||||
|
||||
OFFLINE_MODE = os.environ.get("OFFLINE_MODE", "false").lower() == "true"
|
||||
|
||||
if OFFLINE_MODE:
|
||||
os.environ["HF_HUB_OFFLINE"] = "1"
|
||||
|
||||
Reference in New Issue
Block a user