@@ -24,7 +24,7 @@ using LinearAlgebra
24
24
# ###############################################################################
25
25
libmxnet_detected = false
26
26
libmxnet_curr_ver = get (ENV , " MXNET_COMMIT" , " master" )
27
- curr_win = " 20180211 " # v1.1 .0
27
+ curr_win = " 20190608 " # v1.5 .0
28
28
29
29
if haskey (ENV , " MXNET_HOME" )
30
30
MXNET_HOME = ENV [" MXNET_HOME" ]
@@ -119,21 +119,25 @@ if !libmxnet_detected
119
119
base_url = " https://github.com/yajiedesign/mxnet/releases/download/weekly_binary_build_v2/prebuildbase_win10_x64_vc14_v2.7z"
120
120
121
121
if libmxnet_curr_ver == " master"
122
+ _cmd = " {
123
+ [System.Net.ServicePointManager]::SecurityProtocol='tls12';
124
+ Invoke-WebRequest -Uri 'https://api.github.com/repos/yajiedesign/mxnet/releases/latest'
125
+ -OutFile 'mxnet.json'}"
122
126
# download_cmd uses powershell 2, but we need powershell 3 to do this
123
- run (` powershell -NoProfile -Command Invoke-WebRequest -Uri "https://api.github.com/repos/yajiedesign/mxnet/releases/latest" -OutFile "mxnet.json" ` )
127
+ run (` powershell -NoProfile -Command $_cmd ` )
124
128
curr_win = JSON. parsefile (" mxnet.json" )[" tag_name" ]
125
129
@info (" Can't use MXNet master on Windows, using latest binaries from $curr_win ." )
126
130
end
127
131
# TODO : Get url from JSON.
128
- name = " mxnet_x64_vc14_$(HAS_CUDA ? " gpu" : " cpu" ) .7z"
132
+ # TODO : detect cuda version and select corresponding url.
133
+ name = " mxnet_x64_$(HAS_CUDA ? " vc141_gpu_cu101" : " vc14_cpu" ) .7z"
129
134
package_url = " https://github.com/yajiedesign/mxnet/releases/download/$(curr_win) /$(curr_win) _$(name) "
130
135
131
- exe7z = joinpath (JULIA_HOME , " 7z.exe" )
136
+ exe7z = joinpath (Sys . BINDIR , " 7z.exe" )
132
137
133
138
run (download_cmd (package_url, " mxnet.7z" ))
134
139
# this command will create the dir "usr\\lib"
135
- run (` $exe7z x mxnet.7z build lib -y -ousr` )
136
- run (` cmd /c copy "usr\\ build\\ *.dll" "usr\\ lib"` )
140
+ run (` $exe7z e mxnet.7z *\\ build\\ * *\\ lib\\ * -y -ousr\\ lib` )
137
141
138
142
run (download_cmd (base_url, " mxnet_base.7z" ))
139
143
run (` $exe7z x mxnet_base.7z -y -ousr` )
0 commit comments