mirror of
https://github.com/deepmodeling/Uni-Lab-OS
synced 2026-05-24 10:59:57 +00:00
fix(server): update path configuration for asset directories
This commit is contained in:
@@ -42,18 +42,18 @@ logger = logging.getLogger(__name__)
|
|||||||
STATIC_DIR = Path(__file__).parent / "static"
|
STATIC_DIR = Path(__file__).parent / "static"
|
||||||
|
|
||||||
# 可配置路径
|
# 可配置路径
|
||||||
# LeapLab 仓库根目录(layout_optimizer 的父目录)
|
# __file__ -> Uni-Lab-OS/unilabos/layout_optimizer/server.py
|
||||||
_REPO_ROOT = Path(__file__).resolve().parent.parent
|
_UNILABOS_DIR = Path(__file__).resolve().parent.parent # .../Uni-Lab-OS/unilabos/
|
||||||
|
|
||||||
UNI_LAB_ASSETS_DIR = Path(
|
UNI_LAB_ASSETS_DIR = Path(
|
||||||
os.getenv("UNI_LAB_ASSETS_DIR", str(_REPO_ROOT.parent / "uni-lab-assets"))
|
os.getenv("UNI_LAB_ASSETS_DIR", str(_UNILABOS_DIR.parent.parent.parent / "uni-lab-assets"))
|
||||||
)
|
)
|
||||||
UNI_LAB_ASSETS_MODELS_DIR = UNI_LAB_ASSETS_DIR / "device_models"
|
UNI_LAB_ASSETS_MODELS_DIR = UNI_LAB_ASSETS_DIR / "device_models"
|
||||||
UNI_LAB_ASSETS_DATA_JSON = UNI_LAB_ASSETS_DIR / "data.json"
|
UNI_LAB_ASSETS_DATA_JSON = UNI_LAB_ASSETS_DIR / "data.json"
|
||||||
UNI_LAB_OS_DEVICE_MESH_DIR = Path(
|
UNI_LAB_OS_DEVICE_MESH_DIR = Path(
|
||||||
os.getenv(
|
os.getenv(
|
||||||
"UNI_LAB_OS_DEVICE_MESH_DIR",
|
"UNI_LAB_OS_DEVICE_MESH_DIR",
|
||||||
str(_REPO_ROOT / "Uni-Lab-OS" / "unilabos" / "device_mesh" / "devices"),
|
str(_UNILABOS_DIR / "device_mesh" / "devices"),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user