x
This commit is contained in:
@@ -20,14 +20,25 @@ if not CONFIG_PATH.exists():
|
|||||||
LOCAL_MODEL_DIR = os.getenv("LOCAL_MODEL_DIR", "/opt/model")
|
LOCAL_MODEL_DIR = os.getenv("LOCAL_MODEL_DIR", "/opt/model")
|
||||||
|
|
||||||
# Load configuration from config.json
|
# Load configuration from config.json
|
||||||
|
print(f"DEBUG: Looking for config at {CONFIG_PATH}")
|
||||||
|
print(f"DEBUG: Config file exists: {CONFIG_PATH.exists()}")
|
||||||
|
if not CONFIG_PATH.exists():
|
||||||
|
print(f"ERROR: Config file not found at {CONFIG_PATH}")
|
||||||
|
print(f"ERROR: Please mount config.json to /config/config.json")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
with open(CONFIG_PATH, "r") as f:
|
with open(CONFIG_PATH, "r") as f:
|
||||||
config_data = json.load(f)
|
config_data = json.load(f)
|
||||||
MODEL_TABLE = config_data["models"]
|
MODEL_TABLE = config_data["models"]
|
||||||
DEFAULT_MODEL = config_data["default_model"]
|
DEFAULT_MODEL = config_data["default_model"]
|
||||||
MODELS_TO_RUN = list(MODEL_TABLE.keys())
|
MODELS_TO_RUN = list(MODEL_TABLE.keys())
|
||||||
|
print(f"DEBUG: Loaded {len(MODELS_TO_RUN)} models from config")
|
||||||
|
print(f"DEBUG: Default model: {DEFAULT_MODEL}")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Error: Could not load config.json: {e}")
|
print(f"Error: Could not load config.json: {e}")
|
||||||
|
import traceback
|
||||||
|
traceback.print_exc()
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
# Results file path
|
# Results file path
|
||||||
|
|||||||
Reference in New Issue
Block a user