fix: don't import bentoml at setup (#41)

Signed-off-by: Frost Ming <me@frostming.com>
This commit is contained in:
Frost Ming
2025-02-04 19:18:53 +08:00
committed by GitHub
parent f54ff9aa92
commit d15c4c54ad
+4 -4
View File
@@ -22,12 +22,12 @@ def _get_workspace() -> tuple[Path, dict]:
import hashlib
import json
from bentoml._internal.configuration.containers import BentoMLContainer
bentoml_home = os.getenv(
"BENTOML_HOME", os.path.join(os.path.expanduser("~"), "bentoml")
)
checksum = hashlib.md5(SNAPSHOT.strip().encode("utf8")).hexdigest()
wp = (
Path(BentoMLContainer.bentoml_home.get()) / "run" / "comfy_workspace" / checksum
)
wp = Path(bentoml_home) / "run" / "comfy_workspace" / checksum
wp.parent.mkdir(parents=True, exist_ok=True)
return wp, json.loads(SNAPSHOT)