forked from janhq/cortex.cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathengine_install_cmd.h
More file actions
40 lines (33 loc) · 1.07 KB
/
engine_install_cmd.h
File metadata and controls
40 lines (33 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#pragma once
#include <string>
#include "services/engine_service.h"
namespace commands {
class EngineInstallCmd {
public:
explicit EngineInstallCmd(std::shared_ptr<EngineService> engine_service,
const std::string& host, int port, bool show_menu)
: engine_service_{engine_service},
host_(host),
port_(port),
show_menu_(show_menu),
hw_inf_{
system_info_utils::GetSystemInfo(), //sysinfo
{}, //cpu_info
system_info_utils::GetDriverAndCudaVersion()
.second //cuda_driver_version
} {};
bool Exec(const std::string& engine, const std::string& version = "latest",
const std::string& src = "");
private:
std::shared_ptr<EngineService> engine_service_;
std::string host_;
int port_;
bool show_menu_;
struct HardwareInfo {
std::unique_ptr<system_info_utils::SystemInfo> sys_inf;
cortex::cpuid::CpuInfo cpu_inf;
std::string cuda_driver_version;
};
HardwareInfo hw_inf_;
};
} // namespace commands