-
Notifications
You must be signed in to change notification settings - Fork 231
Expand file tree
/
Copy pathappsettings.json
More file actions
160 lines (130 loc) · 7.8 KB
/
Copy pathappsettings.json
File metadata and controls
160 lines (130 loc) · 7.8 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
{
"Logging": {
// System logger settings. Note the LogLevel set for each category is the minimum log level that
// will be logged. The order of log levels is:
// Trace = 0, Debug = 1, Information = 2, Warning = 3, Error = 4, Critical = 5, and None = 6.
"LogLevel": {
"Default": "Information",
"Microsoft": "Error",
"System": "Error"
},
// Settings for our server-specific logger
"AIServer": {
"LoggingDir": "logs", // Directory where logs are stored, relative to root
"FileTemplate": "log-%Y-%m-%d.txt", // Template for daily logging file
"MaxLogsToStoreMB": 20, // Maximum amount of logs to store in MB. Once this is hit old log files get dumped (not trimmed, dumped)
"LogLevels": {
"Information": "White",
"Warning": "Cyan",
"Error": "Red",
"Critical": "Magenta"
},
// Independent gate for what gets written to disk (see FileLogLevels on
// ServerLoggerConfiguration). If empty, falls back to LogLevels above. Colors here are
// unused for file output but kept as the dictionary value type for consistency.
"FileLogLevels": {
"Warning": "Cyan",
"Error": "Red",
"Critical": "Magenta"
}
}
},
// Kestrel
"AllowedHosts": "*",
"ForceHttps": false,
// Request queue settings.
"QueueProcessingOptions": {
"ResponseTimeout": "00:00:30",
"CommandDequeueTimeout": "00:00:10",
"MaxQueueLength": 1024
},
"MeshOptions": {
"Enable": false,
"EnableStatusBroadcast": true,
"EnableStatusMonitoring": true,
"AcceptForwardedRequests": true,
"AllowRequestForwarding": true,
"KnownMeshHostnames": [ ]
},
"ServerOptions": {
// Allow the server to make calls to check for updates or get downloadable module lists.
"AllowInternetAccess": true,
// Whether or not to disable port 5000 (5500 on mac) so it's free for something else
"DisableLegacyPort": false,
// Whether or not to disable IPv6 support.
"DisableIPv6": false,
// URLs and Endpoints on CodeProject.com
// "ServerVersionCheckUrl": "https://www.codeproject.com/ai/version.aspx", // Check for latest version
// "ServerDownloadUrl": "https://www.codeproject.com/ai/latest.aspx", // Link to download latest server
// URLs and Endpoints on GitHub.io
"ServerVersionCheckUrl": "https://codeproject.github.io/codeproject.ai/config/version.json",
"ServerDownloadUrl": "https://codeproject.github.io/codeproject.ai/latest.html", // Link to download latest server
// These key/values are added to the set of environment variables when the backend analysis
// modules are launched.
"EnvironmentVariables": {
"CPAI_PORT": 32168, // Port for API client to use
"CPAI_APPROOTPATH": "%ROOT_PATH%" // Root path of server application
}
},
"ModuleOptions": {
// Will we be launching the backend analysis modules when the server starts? (handy to disable
// for debugging the modules separately)
"LaunchModules": true,
// The delay between starting the server and starting the background modules in seconds. Ensures
// the server is fully running before we attempt to launch the backend modules.
"DelayBeforeLaunchingModulesSecs": 3,
// The delay between stopping the background services and passing control back to the server so
// it can stop. Ensures modules have time to stop properly.
"DelayAfterStoppingModulesSecs": 3,
// This needs to be set to allow module uploads and installs via the API
"InstallPassword": null,
// The time allowed for a module to be installed. 20 mins should be plenty, but for a Raspberry
// or Orange Pi, or slow internet, it will need longer.
"ModuleInstallTimeout": "00:20:00",
// URLs and Endpoints on CodeProject.com
// "ModuleListUrl": "https://www.codeproject.com/ai/modules/list", // Location of the JSON list of modules that can be downloaded
// "ModelListUrl": "https://www.codeproject.com/ai/models/list", // Location of the JSON list of models that can be downloaded
// "AssetStorageUrl": "https://www.codeproject.com/ai/download/server/assets/", // Location of downloadable models
// "ModuleStorageUrl": "https://www.codeproject.com/kb/Articles/5348853/", // Location of downloadable module install packages
// URLs on Bunny.net
// "ModuleListUrl": "https://codeproject-ai-bunny.b-cdn.net/modules/modules.json",
// "ModelListUrl": "https://codeproject-ai-bunny.b-cdn.net/models/models.json",
"AssetStorageUrl": "https://codeproject-ai-bunny.b-cdn.net/server/assets/",
"ModuleStorageUrl": "https://codeproject-ai-bunny.b-cdn.net/modules/",
// URLs on github.io
// "AssetStorageUrl": "https://codeproject.github.io/codeproject.ai/assets/",
"ModuleListUrl": "https://codeproject.github.io/codeproject.ai/config/modules.json",
"ModelListUrl": "https://codeproject.github.io/codeproject.ai/config/modules.json",
// "ModuleStorageUrl": "https://codeproject.github.io/codeproject.ai/modules/",
// The location of the AI modules (pre-installed and downloaded/side-loaded)
"ModuleInstallerScriptsDirPath": "%ROOT_PATH%", // Where the installer scripts (setup.bat/.sh) live
"RuntimesDirPath": "%ROOT_PATH%/runtimes", // ** %RUNTIMES_PATH% will expand to this value
// Modules can run from 4 places: src/modules by default. /app/preinstalled-modules for pre-
// installed modules in docker. /src/demos/modules for demo modules in dev code, and finally, an
// external folder for modules in standalone projects / Git repos.
"ModulesDirPath": "%ROOT_PATH%/modules", // ** %MODULES_PATH% will expand to this value
"PreInstalledModulesDirPath": "%ROOT_PATH%/preinstalled-modules", // ** %PREINSTALLED_MODULES_PATH% will expand to this value
"DemoModulesDirPath": "%ROOT_PATH%/src/demos/modules", // ** %DEMO_MODULES_PATH% will expand to this value
"ExternalModulesDirPath": "%ROOT_PATH%/../CodeProject.AI-Modules", // ** %EXTERNAL_MODULES_PATH% will expand to this value
// Downloads for modules and models go here
"DownloadedModulePackagesDirPath": "%ROOT_PATH%/downloads/modules/packages", // Where module packages are downloaded to
"DownloadedModelsPackagesDirPath": "%ROOT_PATH%/downloads/models", // Where models are downloaded to
// The template location of the Python interpreter for use when the Runtime for a module is
// set as 'Python'. In Development mode, the Python folder will go under an OS specific
// folder. This allows the same python modules to run under Windows and Linux in the same repo
// (Handy if you run Windows and WSL against the same code). %PYTHON_NAME% will be replaced
// with a value based on the module's Python version (eg Python3.9 will mean PYTHON_NAME is
// replaced with python39).
// TODO: Have 'runtime' plugins register runtimes and their launcher's paths to remove the need
// for this hardcoding.
"PythonRelativeInterpreterPath": "/bin/%OS_NAME%/%PYTHON_NAME%/venv/Scripts/python", // ** %PYTHON_PATH% will expand to this value
// Whether or not to install the initial set of modules concurrently or one by one.
"ConcurrentInitialInstalls": false,
// Whether or not to install the initial set of modules on first run.
"InstallInitialModules": true,
// The list of Modules to install on Initial run. The format for the list of initial modules is
// "moduleid:version; moduleid:version, ...", with the version being optional. If the version is
// not specified, the latest version will be installed.
"InitialModules": "FaceProcessing; ObjectDetectionYOLOv5Net; ObjectDetectionYOLOv5-6.2"
}
}