Skip to content

Commit

Permalink
Merge pull request #149 from johnolafenwa/john/windows-bug-fix
Browse files Browse the repository at this point in the history
fixed errors with windows versions
  • Loading branch information
johnolafenwa authored Jan 22, 2022
2 parents 8c3d040 + 68edb29 commit 5da0520
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
4 changes: 2 additions & 2 deletions download_dependencies.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ function Download($URL, $NAME){
Download -URL "https://deepquest.sfo2.digitaloceanspaces.com/deepstack/shared-files/sharedfiles.zip" -NAME "sharedfiles"
Download -URL "https://deepquest.sfo2.digitaloceanspaces.com/deepstack/shared-files/interpreter.zip" -NAME "interpreter"
Download -URL "https://deepquest.sfo2.digitaloceanspaces.com/deepstack/shared-files/redis.zip" -NAME "redis"
Download -URL "https://deepquest.sfo2.digitaloceanspaces.com/deepstack/gpu_env.zip" -NAME "windows_env_gpu"
Download -URL "https://deepquest.sfo2.digitaloceanspaces.com/deepstack/cpu_env.zip" -NAME "windows_env_cpu"
Download -URL "https://deepquest.sfo2.digitaloceanspaces.com/deepstack/windows_packages_cpu.zip" -NAME "windows_packages_cpu"
Download -URL "https://deepquest.sfo2.digitaloceanspaces.com/deepstack/windows_packages_gpu.zip" -NAME "windows_packages_gpu"
Download -URL "https://deepquest.sfo2.digitaloceanspaces.com/deepstack/shared-files/windows_setup.zip" -NAME "windows_setup"
5 changes: 2 additions & 3 deletions generate_windows_setup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,12 @@ $setup_script += "`nSource: ""$PSScriptRoot\sharedfiles\yolov5m.pt""; DestDir: "
$setup_script += "`nSource: ""$PSScriptRoot\sharedfiles\bebygan_x4.pth""; DestDir: ""{app}\sharedfiles""; Flags: ignoreversion"

if($Platform -eq "CPU"){
$setup_script += "`nSource: ""$PSScriptRoot\windows_env_cpu\*""; DestDir: ""{app}\windows_env""; Flags: ignoreversion recursesubdirs createallsubdirs"
$setup_script += "`nSource: ""$PSScriptRoot\windows_packages_cpu\*""; DestDir: ""{app}\windows_packages""; Flags: ignoreversion recursesubdirs createallsubdirs"
}
elseif($Platform -eq "GPU"){
$setup_script += "`nSource: ""$PSScriptRoot\windows_env_gpu\*""; DestDir: ""{app}\windows_env""; Flags: ignoreversion recursesubdirs createallsubdirs"
$setup_script += "`nSource: ""$PSScriptRoot\windows_packages_gpu\*""; DestDir: ""{app}\windows_packages""; Flags: ignoreversion recursesubdirs createallsubdirs"
}

$setup_script += "`nSource: ""$PSScriptRoot\run_script.bat""; DestDir: ""{app}""; Flags: ignoreversion"
$setup_script += "`nSource: ""$PSScriptRoot\logo.ico""; DestDir: ""{app}""; Flags: ignoreversion"
$setup_script += "`nSource: ""$PSScriptRoot\init.py""; DestDir: ""{app}""; Flags: ignoreversion"

Expand Down
3 changes: 0 additions & 3 deletions run_script.bat

This file was deleted.

4 changes: 2 additions & 2 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -997,7 +997,7 @@ func main() {
if PROFILE == "windows_native" {

APPDIR = "C://DeepStack"
interpreter = "C://DeepStack//run_script.bat"
interpreter = filepath.Join(APPDIR, "interpreter", "python.exe")
redis_server = filepath.Join(APPDIR, "redis", "redis-server.exe")

os.Setenv("VISION-FACE", visionFace)
Expand Down Expand Up @@ -1262,7 +1262,7 @@ func main() {

modelcmd := exec.CommandContext(ctx, "bash", "-c", interpreter+" "+detectionScript+" --model "+file+" --name "+model_name)
if PROFILE == "windows_native" {
modelcmd = exec.CommandContext(ctx, interpreter, detectionScript, file, model_name)
modelcmd = exec.CommandContext(ctx, interpreter, detectionScript, "--model", file, "--name", model_name)
}
startedProcesses = append(startedProcesses, modelcmd)
modelcmd.Dir = filepath.Join(APPDIR, "intelligencelayer/shared")
Expand Down

0 comments on commit 5da0520

Please sign in to comment.