From f1ec971ce0c691d4f98f234c326f6ade855fdc48 Mon Sep 17 00:00:00 2001 From: vansangpfiev Date: Wed, 11 Dec 2024 08:35:59 +0700 Subject: [PATCH] fix: load engine linux --- engine/services/engine_service.cc | 4 +++- engine/utils/config_yaml_utils.cc | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/engine/services/engine_service.cc b/engine/services/engine_service.cc index 4f2122f6b..a477f07b5 100644 --- a/engine/services/engine_service.cc +++ b/engine/services/engine_service.cc @@ -759,15 +759,17 @@ void EngineService::RegisterEngineLibPath() { } auto engine_dir_path = engine_dir_path_res.value().first; auto custom_engine_path = engine_dir_path_res.value().second; + auto cuda_path = file_manager_utils::GetCudaToolkitPath(ne); auto dylib = std::make_unique(engine_dir_path.string(), "engine"); - auto cuda_path = file_manager_utils::GetCudaToolkitPath(ne); // init auto func = dylib->get_function("get_engine"); auto engine = func(); std::vector paths{}; + paths.push_back(std::move(cuda_path)); + paths.push_back(std::move(engine_dir_path)); auto register_opts = EngineI::RegisterLibraryOption{ .paths = paths, }; diff --git a/engine/utils/config_yaml_utils.cc b/engine/utils/config_yaml_utils.cc index c7a696df4..8fbfe1dbe 100644 --- a/engine/utils/config_yaml_utils.cc +++ b/engine/utils/config_yaml_utils.cc @@ -84,7 +84,8 @@ CortexConfig CortexConfigMgr::FromYaml(const std::string& path, !node["proxyUsername"] || !node["proxyPassword"] || !node["verifyPeerSsl"] || !node["verifyHostSsl"] || !node["verifyProxySsl"] || !node["verifyProxyHostSsl"] || - !node["sslCertPath"] || !node["sslKeyPath"] || !node["noProxy"]); + !node["supportedEngines"] || !node["sslCertPath"] || + !node["sslKeyPath"] || !node["noProxy"]); CortexConfig config = { .logFolderPath = node["logFolderPath"] @@ -172,6 +173,10 @@ CortexConfig CortexConfigMgr::FromYaml(const std::string& path, : default_cfg.sslCertPath, .sslKeyPath = node["sslKeyPath"] ? node["sslKeyPath"].as() : default_cfg.sslKeyPath, + .supportedEngines = + node["supportedEngines"] + ? node["supportedEngines"].as>() + : default_cfg.supportedEngines, }; if (should_update_config) { l.unlock();