Skip to content

Commit

Permalink
update prebuilt binary link to v1.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
iblislin committed Jul 19, 2019
1 parent 2fbe8d9 commit 73e0fba
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
6 changes: 0 additions & 6 deletions REQUIRE

This file was deleted.

18 changes: 11 additions & 7 deletions deps/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ using LinearAlgebra
# First try to detect and load existing libmxnet
################################################################################
libmxnet_detected = false
libmxnet_curr_ver = get(ENV, "MXNET_COMMIT", "master")
curr_win = "20180211" # v1.1.0
libmxnet_curr_ver = get(ENV, "MXNET_COMMIT", "1.5.0")
curr_win = "20190608" # v1.5.0

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

if libmxnet_curr_ver == "master"
_cmd = "{
[System.Net.ServicePointManager]::SecurityProtocol='tls12';
Invoke-WebRequest -Uri 'https://api.github.com/repos/yajiedesign/mxnet/releases/latest'
-OutFile 'mxnet.json'}"
# download_cmd uses powershell 2, but we need powershell 3 to do this
run(`powershell -NoProfile -Command Invoke-WebRequest -Uri "https://api.github.com/repos/yajiedesign/mxnet/releases/latest" -OutFile "mxnet.json"`)
run(`powershell -NoProfile -Command $_cmd`)
curr_win = JSON.parsefile("mxnet.json")["tag_name"]
@info("Can't use MXNet master on Windows, using latest binaries from $curr_win.")
end
# TODO: Get url from JSON.
name = "mxnet_x64_vc14_$(HAS_CUDA ? "gpu" : "cpu").7z"
# TODO: detect cuda version and select corresponding url.
name = "mxnet_x64_$(HAS_CUDA ? "vc141_gpu_cu101" : "vc14_cpu").7z"
package_url = "https://github.com/yajiedesign/mxnet/releases/download/$(curr_win)/$(curr_win)_$(name)"

exe7z = joinpath(JULIA_HOME, "7z.exe")
exe7z = joinpath(Sys.BINDIR, "7z.exe")

run(download_cmd(package_url, "mxnet.7z"))
# this command will create the dir "usr\\lib"
run(`$exe7z x mxnet.7z build lib -y -ousr`)
run(`cmd /c copy "usr\\build\\*.dll" "usr\\lib"`)
run(`$exe7z e mxnet.7z *\\build\\* *\\lib\\* -y -ousr\\lib`)

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

2 comments on commit 73e0fba

@iblislin
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/2132

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if Julia TagBot is installed, or can be done manually through the github interface, or via:

git tag -a v1.5.0 -m "<description of version>" 73e0fba911539bf074ee9de71d09541ec5368480
git push origin v1.5.0

Also, note the warning: Version 1.5.0 skips over 1.0.0
This can be safely ignored. However, if you want to fix this you can do so. Call register() again after making the fix. This will update the Pull request.

Please sign in to comment.