-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Installation instructions consolidation #12388
Conversation
docs/install/build_from_source.md
Outdated
@@ -28,184 +32,102 @@ You need C++ build tools and BLAS library to build MXNet shared library. If you | |||
for Windows) to build the library. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A C++ compiler that supports C++ 11.
G++ (4.8 or later), Clang or Visual Studio 2015 (on Windows) is required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we also make CMake the default (instead of GNU Make and cmake only for Windows)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be happy to do that, but so many other downstream instructions use make
. Are we ready to update all of those too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, maybe it can wait then and be done in a separate PR
docs/install/build_from_source.md
Outdated
``` | ||
MXNet relies on the | ||
[BLAS](https://en.wikipedia.org/wiki/Basic_Linear_Algebra_Subprograms) (Basic | ||
Linear Algebra Subprograms) library for numerical computations. You can install |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... library for numerical computations. Those can be extended with the LAPACK (Linear Algebra Package) - an additional set of mathematical functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems like this would be a good spot to mention mkl-dnn? Also could link to those instructions within the project... wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely
docs/install/build_from_source.md
Outdated
Linear Algebra Subprograms) library for numerical computations. You can install | ||
any one among [ATLAS](http://math-atlas.sourceforge.net/), | ||
[OpenBLAS](http://www.openblas.net/) and | ||
[MKL](https://software.intel.com/en-us/intel-mkl). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Accelerate](https://developer.apple.com/documentation/accelerate) on MAC OSX.
docs/install/build_from_source.md
Outdated
</div> | ||
### Other Linux | ||
Installing both `git` and `make` by following instructions on the websites is | ||
straightforward. Here we provide the instructions to build `gcc-4.8` from source codes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we sure that we need instructions how to build gcc? Is there any use case where it can not be installed with a package manager?
Say: sudo apt install gcc-4.8
or sudo apt install gcc-4.9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, with Caffe2 on CentOS, I had to build gcc from scratch. I haven't tried MXNet on CentOS yet, but I wonder if whoever wrote this ran into a similar issue.
Since this is for "other linux" the apt
instructions won't cut it.
My preference would be to split out a separate page for CentOS and have thorough, tested instructions. (maybe as a separate PR?)
docs/install/build_from_source.md
Outdated
|
||
In Visual Studio, open the solution file,```.sln```, and compile it. | ||
These commands produce a library called ```mxnet.dll``` in the ```./build/Release/``` or ```./build/Debug``` folder. | ||
* Build on macOS with the default BLAS library and clang installed with `xcode` (OPENMP is disabled because it is not supported in default by clang): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To use OpenMP on MacOS you need to install the Clang compiler brew install llvm
(the one provided by Apple does not support OpenMP)
docs/install/build_from_source.md
Outdated
|
||
</div> | ||
```bash | ||
make USE_OPENCV=0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this would be a good place to put the BLAS libraries explanation from #11148. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This caused me to rearrange the page for a better flow. This is all good info. It should be double-checked in case it is only for cmake and won't work for make.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, yes you're right
**Experimental Choice** If You would like to install mxnet with Intel MKL, try the experimental pip package with MKL: | ||
```bash | ||
$ pip install mxnet-mkl | ||
$ pip install mxnet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not mxnet-mkl anymore? There are a lot of other options as well: https://pypi.org/search/?q=mxnet Maybe add some recommendation or at least list some options here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome
docs/install/index.md
Outdated
|
||
- [G++ (4.8 or later)](https://gcc.gnu.org/gcc-4.8/). Make sure to use gcc 4 and not 5 or 6 as there |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang 3.9 - 6 as well
docs/install/index.md
Outdated
-DUSE_SIGNAL_HANDLER=ON \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-GNinja .. | ||
ninja -j1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-j $(nproc)
|
||
```bash | ||
$ cd python | ||
$ pip install -e . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that the `-e` flag is optional. It is equivalent to `--editable` and means that if you edit the source files, these changes will be reflected in the package installed.
@lebeg thanks for the review! I've addressed most of you comments. Please take a look at the build from source page again since I made a lot of changes after incorporating your cmake documentation on BLAS. That was all really good stuff to add here! A big update would be to switch using cmake as the default and change all of the examples, but I think we should hold off until your cmake PR is merged, right? |
Yes, absolutely. |
docs/install/build_from_source.md
Outdated
Both JDK and Maven are required to build the Scala package. | ||
|
||
<div class="ubuntu"> | ||
* Build on **macOS** with the default BLAS library and clang installed with `xcode` (OPENMP is disabled because it is not supported in default by clang): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Build on macOS with the default BLAS library and Clang installed with xcode
(OpenMP is disabled because it is not supported by default by Apple version of Clang):
This PR also fixes #10020 |
* initial edits for c++ instructions * consolidation and reorg of install docs * simplify python section * fix url rewrite to allow for testing * further simplify install * fix render issues * adjust formatting * adjust formatting * fix python/gpu/master * install footers * update footers * add mac dev setup link for osx * adjust formatting for footer * separate validation page * add toc * adjust formatting * break out julia and perl * fix pypi link * fix formatting * fix formatting * fix formatting * add build from source link * updating from PR feedback * add c++ and clojure to ubuntu guide; clarify c++ setup * added pip chart to install; updates from PR feedback * correct reference to c infer api
This PR broke the installation guide nightly test: http://jenkins.mxnet-ci.amazon-ml.com/blue/organizations/jenkins/NightlyTests/detail/master/79/pipeline |
I'll take a look. I removed the virtualenv section so it should be an easy fix. |
* initial edits for c++ instructions * consolidation and reorg of install docs * simplify python section * fix url rewrite to allow for testing * further simplify install * fix render issues * adjust formatting * adjust formatting * fix python/gpu/master * install footers * update footers * add mac dev setup link for osx * adjust formatting for footer * separate validation page * add toc * adjust formatting * break out julia and perl * fix pypi link * fix formatting * fix formatting * fix formatting * add build from source link * updating from PR feedback * add c++ and clojure to ubuntu guide; clarify c++ setup * added pip chart to install; updates from PR feedback * correct reference to c infer api
Description
Different installation pages were out of date or out of sync. The install page was over-complicated. The build from source instructions weren't really working.
This PR consolidates install info, directs users to where the more recent updates happen to be, and simplifies the basic user install. I started off just trying to fix the C++ setup info, but found so many other issues, I worked on those too.
Features
Preview
http://34.201.8.176/versions/cplusplus_install/install/index.html