feat: support suppressing version checks

This commit is contained in:
guenhter
2025-07-02 15:20:43 +02:00
parent 7adb15d4b0
commit 34ddd62951
6 changed files with 14 additions and 10 deletions
+4 -1
View File
@@ -529,11 +529,14 @@ else:
# OFFLINE_MODE
####################################
ENABLE_VERSION_UPDATE_CHECK = (
os.environ.get("ENABLE_VERSION_UPDATE_CHECK", "true").lower() == "true"
)
OFFLINE_MODE = os.environ.get("OFFLINE_MODE", "false").lower() == "true"
if OFFLINE_MODE:
os.environ["HF_HUB_OFFLINE"] = "1"
ENABLE_VERSION_UPDATE_CHECK = False
####################################
# AUDIT LOGGING