release: v1.3.2 - Cross-Machine Deployment Support
Major Changes: - Removed all hardcoded paths for cross-machine deployment - Added unified path management module (path_utils.rs) - Supports arbitrary user home directories - Environment variable configuration for all paths New Features: - path_utils module with 15+ path resolution functions - Dynamic user home directory detection - Environment variable overrides for all paths - Default paths using $HOME/momentry and $HOME/momentry_core Fixed Files: - Rust code: 8 core files (release.rs, service.rs, markbase_compat.rs, etc.) - Python scripts: 10 files (ASR, ASRX, Face, Identity, VLM, Migration) - Configuration: production.env (removed hardcoded paths) Environment Variables Supported: - HOME - User home directory - MOMENTRY_ROOT - Momentry root directory - MOMENTRY_CORE_DIR - Momentry_core directory - MOMENTRY_OUTPUT_DIR - Output directory - MOMENTRY_BACKUP_DIR - Backup directory - MOMENTRY_STORAGE_ROOT - Storage root directory - MOMENTRY_SCRIPTS_DIR - Scripts directory - MOMENTRY_CLI_DIR - CLI tools directory Breaking Changes: - None (backward compatible with environment variables) Deployment: - Can now deploy to any machine with any username - No hardcoded /Users/accusys paths in core functionality - Ready for M4ProMini deployment (/Users/nextorageai)
This commit is contained in:
@@ -42,7 +42,10 @@ except ImportError:
|
||||
|
||||
# Contract version
|
||||
CONTRACT_VERSION = "1.0"
|
||||
PROCESSOR_NAME = "/Users/accusys/momentry_core_0.1/scripts/asr_processor_contract_v1.py"
|
||||
PROCESSOR_NAME = os.path.join(
|
||||
os.environ.get("MOMENTRY_SCRIPTS_DIR", os.path.expanduser("~/momentry_core/tools/script")),
|
||||
"asr/asr_processor_contract_v1.py"
|
||||
)
|
||||
PROCESSOR_VERSION = "2.0.0"
|
||||
MODEL_NAME = "base"
|
||||
MODEL_VERSION = "unknown"
|
||||
|
||||
@@ -22,12 +22,12 @@ import numpy as np
|
||||
# 添加模块路径
|
||||
SCRIPTS_DIR = os.environ.get(
|
||||
"MOMENTRY_SCRIPTS_DIR",
|
||||
"/Users/accusys/momentry_core/tools/script"
|
||||
os.path.expanduser("~/momentry_core/tools/script")
|
||||
)
|
||||
sys.path.insert(0, SCRIPTS_DIR)
|
||||
|
||||
# 添加 asrx_self 路径
|
||||
ASRX_SELF_DIR = "/Users/accusys/momentry_core/scripts/asrx_self"
|
||||
ASRX_SELF_DIR = os.path.join(SCRIPTS_DIR, "asrx_self")
|
||||
sys.path.insert(0, ASRX_SELF_DIR)
|
||||
|
||||
from asrx.multi_speaker_detector import MultiSpeakerDetector
|
||||
|
||||
@@ -28,7 +28,7 @@ sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), "uti
|
||||
from qdrant_faces import update_trace_ids
|
||||
|
||||
# Config
|
||||
OUTPUT_DIR = os.environ.get("MOMENTRY_OUTPUT_DIR", "/Users/accusys/momentry/output_dev")
|
||||
OUTPUT_DIR = os.environ.get("MOMENTRY_OUTPUT_DIR", os.path.expanduser("~/momentry/output_dev"))
|
||||
SCHEMA = os.environ.get("DATABASE_SCHEMA", "public")
|
||||
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ class IdentityAgent:
|
||||
):
|
||||
self.video_uuid = video_uuid
|
||||
self.output_dir = output_dir or os.getenv(
|
||||
"MOMENTRY_OUTPUT_DIR", "/Users/accusys/momentry/output_dev"
|
||||
"MOMENTRY_OUTPUT_DIR", os.path.expanduser("~/momentry/output_dev")
|
||||
)
|
||||
self.auto_merge_threshold = auto_merge_threshold
|
||||
self.llm_threshold = llm_threshold
|
||||
|
||||
@@ -53,7 +53,7 @@ class IdentityAgent:
|
||||
):
|
||||
self.video_uuid = video_uuid
|
||||
self.output_dir = output_dir or os.getenv(
|
||||
"MOMENTRY_OUTPUT_DIR", "/Users/accusys/momentry/output_dev"
|
||||
"MOMENTRY_OUTPUT_DIR", os.path.expanduser("~/momentry/output_dev")
|
||||
)
|
||||
self.auto_merge_threshold = auto_merge_threshold
|
||||
self.llm_threshold = llm_threshold
|
||||
|
||||
@@ -187,7 +187,7 @@ def main():
|
||||
parser = argparse.ArgumentParser(description="生成 Identity Profile 文件")
|
||||
parser.add_argument(
|
||||
"--identities-dir",
|
||||
default="/Users/accusys/momentry/identities",
|
||||
default=os.path.expanduser("~/momentry/identities"),
|
||||
help="Identity 目录"
|
||||
)
|
||||
parser.add_argument(
|
||||
|
||||
@@ -214,7 +214,7 @@ def main():
|
||||
parser = argparse.ArgumentParser(description="生成 File Profile 文件")
|
||||
parser.add_argument(
|
||||
"--output-dir",
|
||||
default=os.environ.get("MOMENTRY_OUTPUT_DIR", "/Users/accusys/momentry/output"),
|
||||
default=os.environ.get("MOMENTRY_OUTPUT_DIR", os.path.expanduser("~/momentry/output")),
|
||||
help="输出目录"
|
||||
)
|
||||
parser.add_argument(
|
||||
|
||||
@@ -50,12 +50,12 @@ def main():
|
||||
)
|
||||
parser.add_argument(
|
||||
"--output-dir",
|
||||
default="/Users/accusys/momentry/output",
|
||||
default=os.path.expanduser("~/momentry/output"),
|
||||
help="输出目录"
|
||||
)
|
||||
parser.add_argument(
|
||||
"--identities-dir",
|
||||
default="/Users/accusys/momentry/identities",
|
||||
default=os.path.expanduser("~/momentry/identities"),
|
||||
help="Identity 目录"
|
||||
)
|
||||
parser.add_argument(
|
||||
|
||||
@@ -29,7 +29,7 @@ SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
SWIFT_BIN = os.path.join(SCRIPT_DIR, "swift_processors", ".build", "release", "swift_appearance_expansion")
|
||||
SWIFT_BIN_DEBUG = os.path.join(SCRIPT_DIR, "swift_processors", ".build", "debug", "swift_appearance_expansion")
|
||||
|
||||
OUTPUT_DIR = os.environ.get("MOMENTRY_OUTPUT_DIR", "/Users/accusys/momentry/output")
|
||||
OUTPUT_DIR = os.environ.get("MOMENTRY_OUTPUT_DIR", os.path.expanduser("~/momentry/output"))
|
||||
|
||||
|
||||
def process_appearance(
|
||||
|
||||
@@ -54,7 +54,7 @@ except ImportError:
|
||||
|
||||
DB_URL = os.environ.get("DATABASE_URL", "postgresql://accusys@localhost:5432/momentry")
|
||||
SCHEMA = os.environ.get("DATABASE_SCHEMA", "public")
|
||||
OUTPUT_DIR = os.environ.get("MOMENTRY_OUTPUT_DIR", "/Users/accusys/momentry/output")
|
||||
OUTPUT_DIR = os.environ.get("MOMENTRY_OUTPUT_DIR", os.path.expanduser("~/momentry/output"))
|
||||
|
||||
|
||||
def get_conn():
|
||||
|
||||
Reference in New Issue
Block a user