git clone --recursive https://github.com/dmlc/mxnet
The --recursive
is to clone all the submodules used by MXNet.
Please download mxnet_x64_vc14_gpu.7z
and prebuildbase_win10_x64_vc14.7z
from https://github.com/yajiedesign/mxnet/releases
Please download cuDNN from https://developer.nvidia.com/cudnn
-
Please mkdir the folder structure:
./R-package/inst/libs/x64
; -
Copy the following dlls into
./R-package/inst/libs/x64
:
cublas64_80.dll
cudart64_80.dll
cudnn64_5.dll
curand64_80.dll
libgcc_s_seh-1.dll
libgfortran-3.dll
libmxnet.dll
libmxnet.lib
libopenblas.dll
libquadmath-0.dll
nvrtc64_80.dll
These dlls can be found in prebuildbase_win10_x64_vc14/3rdparty/cudart
, prebuildbase_win10_x64_vc14/3rdparty/openblas/bin
, mxnet_x64_vc14_gpu/build
, mxnet_x64_vc14_gpu/lib
and the cuDNN
downloaded from NVIDIA.
-
Please mkdir the folder structure:
./R-package/inst/include
; -
Copy the header files from
dmlc
,mxnet
andnnvm
into./R-package/inst/include
. It should look like:
./R-package/inst
└── include
├── dmlc
├── mxnet
└── nnvm
Now please open the Windows CMD and change the directory to the mxnet
folder. Then use the following commands
to build R package:
echo import(Rcpp) > R-package\NAMESPACE
echo import(methods) >> R-package\NAMESPACE
Rscript -e "install.packages('devtools', repos = 'https://cloud.r-project.org')"
cd R-package
Rscript -e "library(devtools); library(methods); options(repos=c(CRAN='https://cran.rstudio.com')); install_deps(dependencies = TRUE)"
cd ..
R CMD INSTALL --no-multiarch R-package
Rscript -e "require(mxnet); mxnet:::mxnet.export('R-package')"
rm R-package/NAMESPACE
Rscript -e "require(devtools); install_version('roxygen2', version = '5.0.1', repos = 'https://cloud.r-project.org/', quiet = TRUE)"
Rscript -e "require(roxygen2); roxygen2::roxygenise('R-package')"
R CMD INSTALL --build --no-multiarch R-package
The installation guide has been test on a EC2 instance with GPU and Windows Server 2012.