Skip to content

Instantly share code, notes, and snippets.

@suensummit
Last active November 23, 2020 10:05
Show Gist options
  • Save suensummit/1833750ed786b3d4713411c7f552fb5a to your computer and use it in GitHub Desktop.
Save suensummit/1833750ed786b3d4713411c7f552fb5a to your computer and use it in GitHub Desktop.
A Complete Installation Guide for `bigsnpr`(https://github.com/privefl/bigsnpr) on Azure Windows Server.
  • Install R, Rtools (Required), RStudio (Optional).
  • Install Git for Windows for retrive the latest version of xgboost.
  • Install Visual Studio Community, for c++ development environment.
    • Select Workload: Desktop/Mobile/Linux Development with C++ to obtain C++ CMake tool

Screen Shot 2020-11-23 at 12 18 37 PM

Screen Shot 2020-11-23 at 12 18 52 PM

  • Install xgboost, follow this official installation guide, note that:
    • Add Rtools to your PATH, or your windows will not able to find the cmake:
      • C:\rtools40\usr\bin
      • C:\rtools40\mingw64\bin For more detail could check this reference.
    • It's recommand to use Developer Powershell for VS 2019 for running the following CLI commands: (With your correct Visual Studio & R versions)
      git clone --recursive https://github.com/dmlc/xgboost
      cd xgboost
      git submodule init
      git submodule update
      mkdir build
      cd build
      cmake .. -G"Visual Studio 16 2019" -A x64 -DR_LIB=ON -DR_VERSION=4 -DLIBR_EXECUTABLE="C:/Program Files/R/R-4.0.3/bin/x64/R.exe"
      cmake --build . --target install --config Release
      

Screen Shot 2020-11-23 at 1 18 08 PM

Screen Shot 2020-11-23 at 1 18 41 PM

Screen Shot 2020-11-23 at 1 18 46 PM

Screen Shot 2020-11-23 at 1 19 03 PM

Screen Shot 2020-11-23 at 1 19 09 PM

  • Your are done with the installation of xgboost! If you encounter some errors please check also this document.
  • Install bigsnpr in R:
    install.packages("remotes")
    remotes::install_github("privefl/bigsnpr")
    
  • Happy coding <3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment