Skip to content

Commit 6f56b03

Browse files
committed
correct render_args() to include binary path
1 parent 602084e commit 6f56b03

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tools/server/server-models.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,8 @@ void server_presets::render_args(server_model_meta & meta) {
214214
}
215215
}
216216
meta.args = preset.to_args();
217+
// add back the binary path at the front
218+
meta.args.insert(meta.args.begin(), get_server_exec_path().string());
217219
}
218220

219221
//
@@ -510,6 +512,8 @@ void server_models::load(const std::string & name) {
510512
{
511513
SRV_INF("spawning server instance with name=%s on port %d\n", inst.meta.name.c_str(), inst.meta.port);
512514

515+
presets.render_args(inst.meta); // update meta.args
516+
513517
std::vector<std::string> child_args = inst.meta.args; // copy
514518
std::vector<std::string> child_env = base_env; // copy
515519
child_env.push_back("LLAMA_SERVER_ROUTER_PORT=" + std::to_string(base_params.port));

0 commit comments

Comments
 (0)