Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit f1ec971

Browse files
sangjanainamchuai
authored andcommitted
fix: load engine linux
1 parent 4a839b4 commit f1ec971

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

engine/services/engine_service.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -759,15 +759,17 @@ void EngineService::RegisterEngineLibPath() {
759759
}
760760
auto engine_dir_path = engine_dir_path_res.value().first;
761761
auto custom_engine_path = engine_dir_path_res.value().second;
762+
auto cuda_path = file_manager_utils::GetCudaToolkitPath(ne);
762763

763764
auto dylib = std::make_unique<cortex_cpp::dylib>(engine_dir_path.string(),
764765
"engine");
765766

766-
auto cuda_path = file_manager_utils::GetCudaToolkitPath(ne);
767767
// init
768768
auto func = dylib->get_function<EngineI*()>("get_engine");
769769
auto engine = func();
770770
std::vector<std::filesystem::path> paths{};
771+
paths.push_back(std::move(cuda_path));
772+
paths.push_back(std::move(engine_dir_path));
771773
auto register_opts = EngineI::RegisterLibraryOption{
772774
.paths = paths,
773775
};

engine/utils/config_yaml_utils.cc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ CortexConfig CortexConfigMgr::FromYaml(const std::string& path,
8484
!node["proxyUsername"] || !node["proxyPassword"] ||
8585
!node["verifyPeerSsl"] || !node["verifyHostSsl"] ||
8686
!node["verifyProxySsl"] || !node["verifyProxyHostSsl"] ||
87-
!node["sslCertPath"] || !node["sslKeyPath"] || !node["noProxy"]);
87+
!node["supportedEngines"] || !node["sslCertPath"] ||
88+
!node["sslKeyPath"] || !node["noProxy"]);
8889

8990
CortexConfig config = {
9091
.logFolderPath = node["logFolderPath"]
@@ -172,6 +173,10 @@ CortexConfig CortexConfigMgr::FromYaml(const std::string& path,
172173
: default_cfg.sslCertPath,
173174
.sslKeyPath = node["sslKeyPath"] ? node["sslKeyPath"].as<std::string>()
174175
: default_cfg.sslKeyPath,
176+
.supportedEngines =
177+
node["supportedEngines"]
178+
? node["supportedEngines"].as<std::vector<std::string>>()
179+
: default_cfg.supportedEngines,
175180
};
176181
if (should_update_config) {
177182
l.unlock();

0 commit comments

Comments
 (0)