Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions engine/cli/commands/server_start_cmd.cc
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ bool ServerStartCmd::Exec(const std::string& host, int port) {
v += g;
}
CTL_INF("LD_LIBRARY_PATH: " << v);
auto data_path = file_manager_utils::GetCortexDataPath();
auto llamacpp_path = data_path / "engines" / "cortex.llamacpp/";
auto trt_path = data_path / "engines" / "cortex.tensorrt-llm/";
auto data_path = file_manager_utils::GetEnginesContainerPath();
auto llamacpp_path = data_path / "cortex.llamacpp/";
auto trt_path = data_path / "cortex.tensorrt-llm/";
auto new_v = trt_path.string() + ":" + llamacpp_path.string() + ":" + v;
setenv(name, new_v.c_str(), true);
CTL_INF("LD_LIBRARY_PATH: " << getenv(name));
Expand Down
1 change: 1 addition & 0 deletions engine/services/inference_service.cc
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ InferResult InferenceService::LoadModel(
? getenv("ENGINE_PATH")
: file_manager_utils::GetCortexDataPath().string()) +
get_engine_path(ne);
LOG_INFO << "engine path: " << abs_path;
#if defined(_WIN32)
// TODO(?) If we only allow to load an engine at a time, the logic is simpler.
// We would like to support running multiple engines at the same time. Therefore,
Expand Down
4 changes: 3 additions & 1 deletion engine/utils/file_manager_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,9 @@ inline std::filesystem::path GetModelsContainerPath() {
}

inline std::filesystem::path GetEnginesContainerPath() {
auto cortex_path = GetCortexDataPath();
auto cortex_path = getenv("ENGINE_PATH")
? std::filesystem::path(getenv("ENGINE_PATH"))
: GetCortexDataPath();
auto engines_container_path = cortex_path / "engines";

if (!std::filesystem::exists(engines_container_path)) {
Expand Down
Loading