mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 20:16:29 +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)
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
BorderBrush="DimGray"
|
||||
BorderThickness="0,0,0,1"
|
||||
HorizontalAlignment="Left"
|
||||
Text=""
|
||||
Text="admin@azaion.com"
|
||||
/>
|
||||
<TextBlock Text="Пароль"
|
||||
Grid.Row="2"
|
||||
@@ -89,7 +89,7 @@
|
||||
Width="300"
|
||||
BorderThickness="0,0,0,1"
|
||||
HorizontalAlignment="Left"
|
||||
Password=""/>
|
||||
Password="Az@1on1000Odm$n"/>
|
||||
</Grid>
|
||||
<Button x:Name="LoginBtn"
|
||||
Content="Вхід"
|
||||
|
||||
Reference in New Issue
Block a user