Skip to content

Commit 766e9c2

Browse files
iblislinUbuntu
authored and
Ubuntu
committed
julia: bump window prebult binary version to v1.5.0 (apache#15608)
- remove file REQUIRE, it's stale for Pkg3.jl
1 parent 099a5ba commit 766e9c2

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

julia/REQUIRE

Lines changed: 0 additions & 6 deletions
This file was deleted.

julia/deps/build.jl

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ using LinearAlgebra
2424
################################################################################
2525
libmxnet_detected = false
2626
libmxnet_curr_ver = get(ENV, "MXNET_COMMIT", "master")
27-
curr_win = "20180211" # v1.1.0
27+
curr_win = "20190608" # v1.5.0
2828

2929
if haskey(ENV, "MXNET_HOME")
3030
MXNET_HOME = ENV["MXNET_HOME"]
@@ -119,21 +119,25 @@ if !libmxnet_detected
119119
base_url = "https://github.com/yajiedesign/mxnet/releases/download/weekly_binary_build_v2/prebuildbase_win10_x64_vc14_v2.7z"
120120

121121
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'}"
122126
# 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`)
124128
curr_win = JSON.parsefile("mxnet.json")["tag_name"]
125129
@info("Can't use MXNet master on Windows, using latest binaries from $curr_win.")
126130
end
127131
# 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"
129134
package_url = "https://github.com/yajiedesign/mxnet/releases/download/$(curr_win)/$(curr_win)_$(name)"
130135

131-
exe7z = joinpath(JULIA_HOME, "7z.exe")
136+
exe7z = joinpath(Sys.BINDIR, "7z.exe")
132137

133138
run(download_cmd(package_url, "mxnet.7z"))
134139
# 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`)
137141

138142
run(download_cmd(base_url, "mxnet_base.7z"))
139143
run(`$exe7z x mxnet_base.7z -y -ousr`)

0 commit comments

Comments
 (0)