mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 11:16:30 +00:00
read cdn yaml config from api
automate tensorrt model conversion in case of no existing one for user's gpu
This commit is contained in:
@@ -89,21 +89,20 @@ public partial class App
|
||||
{
|
||||
new ConfigUpdater().CheckConfig();
|
||||
var secureAppConfig = ReadSecureAppConfig();
|
||||
var apiDir = secureAppConfig.DirectoriesConfig.ApiResourcesDirectory;
|
||||
_inferenceClient = new InferenceClient(new OptionsWrapper<InferenceClientConfig>(secureAppConfig.InferenceClientConfig));
|
||||
_resourceLoader = new ResourceLoader(_inferenceClient);
|
||||
var login = new Login();
|
||||
|
||||
login.CredentialsEntered += async (_, credentials) =>
|
||||
{
|
||||
credentials.Folder = secureAppConfig.DirectoriesConfig.ApiResourcesDirectory;
|
||||
|
||||
_inferenceClient.Send(RemoteCommand.Create(CommandType.Login, credentials));
|
||||
_azaionApi = new AzaionApi(new HttpClient { BaseAddress = new Uri(SecurityConstants.API_URL) }, _cache, credentials, _hardwareService);
|
||||
|
||||
try
|
||||
{
|
||||
_securedConfig = _resourceLoader.LoadFile("config.secured.json");
|
||||
_systemConfig = _resourceLoader.LoadFile("config.system.json");
|
||||
_securedConfig = _resourceLoader.LoadFile("config.secured.json", apiDir);
|
||||
_systemConfig = _resourceLoader.LoadFile("config.system.json", apiDir);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -125,7 +124,7 @@ public partial class App
|
||||
{
|
||||
try
|
||||
{
|
||||
var stream = _resourceLoader.LoadFile($"{assemblyName}.dll");
|
||||
var stream = _resourceLoader.LoadFile($"{assemblyName}.dll", apiDir);
|
||||
return Assembly.Load(stream.ToArray());
|
||||
}
|
||||
catch (Exception e)
|
||||
|
||||
Reference in New Issue
Block a user