@@ -901,6 +901,7 @@ func main() {
901901 var mode string
902902 var certPath string
903903 var sendLogs string
904+ var threadcount int
904905
905906 if os .Getenv ("PROFILE" ) == "" {
906907 os .Chdir ("C://DeepStack//server" )
@@ -942,6 +943,13 @@ func main() {
942943 flag .Float64Var (& request_timeout , "TIMEOUT" , floatTimeoutVal , "request timeout in seconds" )
943944 }
944945
946+ intThreadcountVal , err := strconv .Atoi (os .Getenv ("THREADCOUNT" ))
947+ if err != nil {
948+ flag .IntVar (& threadcount , "THREADCOUNT" , 5 , "number of threads to use for each endpoint" )
949+ } else {
950+ flag .IntVar (& threadcount , "THREADCOUNT" , intThreadcountVal , "number of threads to use for each endpoint" )
951+ }
952+
945953 mode_val , mode_set := os .LookupEnv ("MODE" )
946954
947955 if mode_set {
@@ -989,7 +997,7 @@ func main() {
989997 if PROFILE == "windows_native" {
990998
991999 APPDIR = "C://DeepStack"
992- interpreter = filepath . Join ( APPDIR , "interpreter" , "python.exe" )
1000+ interpreter = "C://DeepStack//run_script.bat"
9931001 redis_server = filepath .Join (APPDIR , "redis" , "redis-server.exe" )
9941002
9951003 os .Setenv ("VISION-FACE" , visionFace )
@@ -998,6 +1006,7 @@ func main() {
9981006 os .Setenv ("VISION-ENHANCE" , visionEnhance )
9991007 os .Setenv ("APPDIR" , APPDIR )
10001008 os .Setenv ("MODE" , mode )
1009+ os .Setenv ("THREADCOUNT" , strconv .Itoa (threadcount ))
10011010 }
10021011
10031012 if DATA_DIR == "" {
@@ -1253,7 +1262,7 @@ func main() {
12531262
12541263 modelcmd := exec .CommandContext (ctx , "bash" , "-c" , interpreter + " " + detectionScript + " --model " + file + " --name " + model_name )
12551264 if PROFILE == "windows_native" {
1256- modelcmd = exec .CommandContext (ctx , interpreter , detectionScript , "--model" , file , "--name" , model_name )
1265+ modelcmd = exec .CommandContext (ctx , interpreter , detectionScript , file , model_name )
12571266 }
12581267 startedProcesses = append (startedProcesses , modelcmd )
12591268 modelcmd .Dir = filepath .Join (APPDIR , "intelligencelayer/shared" )
0 commit comments